From 5cd4a981f08b65152db2aca2217a8ed7181898c4 Mon Sep 17 00:00:00 2001 From: omar2205 Date: Tue, 31 Jan 2023 09:37:31 +0200 Subject: [PATCH 1/3] fix denolsp and tsserver --- after/plugin/lsp.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index 85cc34eb..a9abeef1 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -1,4 +1,5 @@ local lsp = require("lsp-zero") +local nvim_lsp = require('lspconfig') lsp.preset("recommended") @@ -19,6 +20,10 @@ lsp.configure('sumneko_lua', { } }) +lsp.configure('tsserver', { + root_dir = nvim_lsp.util.root_pattern("package.json"), + -- single_file_support = false, +}) local cmp = require('cmp') local cmp_select = {behavior = cmp.SelectBehavior.Select} From 6ec32b3dcbc04e9a667fcfbb2418c0f776302e6f Mon Sep 17 00:00:00 2001 From: omar2205 Date: Tue, 31 Jan 2023 09:49:18 +0200 Subject: [PATCH 2/3] change file mode to false --- after/plugin/lsp.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index a9abeef1..90052db3 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -22,7 +22,7 @@ lsp.configure('sumneko_lua', { lsp.configure('tsserver', { root_dir = nvim_lsp.util.root_pattern("package.json"), - -- single_file_support = false, + single_file_support = false, }) local cmp = require('cmp') From 3c36f9e9a6333f4566db686556e69485e6cf72a5 Mon Sep 17 00:00:00 2001 From: omar2205 Date: Wed, 8 Feb 2023 18:49:11 +0200 Subject: [PATCH 3/3] add denols root_dir --- after/plugin/lsp.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/after/plugin/lsp.lua b/after/plugin/lsp.lua index 90052db3..572b1aba 100644 --- a/after/plugin/lsp.lua +++ b/after/plugin/lsp.lua @@ -25,6 +25,13 @@ lsp.configure('tsserver', { single_file_support = false, }) +lsp.configure('denols', { + root_dir = nvim_lsp.util.root_pattern("deno.jsonc"), + init_options = { + lint = true, + }, +}) + local cmp = require('cmp') local cmp_select = {behavior = cmp.SelectBehavior.Select} local cmp_mappings = lsp.defaults.cmp_mappings({