diff options
Diffstat (limited to '.config/nvim/lua/lsp.lua')
-rw-r--r-- | .config/nvim/lua/lsp.lua | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/.config/nvim/lua/lsp.lua b/.config/nvim/lua/lsp.lua index 2591a8b..cd1f6f5 100644 --- a/.config/nvim/lua/lsp.lua +++ b/.config/nvim/lua/lsp.lua @@ -118,6 +118,7 @@ local lsputils = lspconfig.util lspconfig.tsserver.setup({ on_attach = on_attach; root_dir = lsputils.root_pattern("package.json", "tsconfig.json"); + single_file_mode = false; settings = { typescript = { inlayHints = { @@ -144,27 +145,31 @@ lspconfig.tsserver.setup({ }; }) -deno_nvim.setup({ - server = { - -- Uncomment to allow all js/ts files, not just in a deno context - -- root_dir = vim.loop.cwd; - capabilities = capabilities; - on_attach = on_attach; - settings = { - deno = { - unstable = true; - inlayHints = { - enumMemberValues = { enabled = true }; - functionLikeReturnTypes = { enabled = true }; - parameterNames = { enabled = "all" }; - parameterTypes = { enabled = true }; - propertyDeclarationTypes = { enabled = true }; - variableTypes = { enabled = true; suppressWhenTypeMatchesName = false }; +-- Temporarily disable +if false then + deno_nvim.setup({ + server = { + -- Uncomment to allow all js/ts files, not just in a deno context + -- root_dir = vim.loop.cwd; + root_dir = lsputils.root_pattern("deno.json", "deno.jsonc", "!package.json"); + capabilities = capabilities; + on_attach = on_attach; + settings = { + deno = { + unstable = true; + inlayHints = { + enumMemberValues = { enabled = true }; + functionLikeReturnTypes = { enabled = true }; + parameterNames = { enabled = "all" }; + parameterTypes = { enabled = true }; + propertyDeclarationTypes = { enabled = true }; + variableTypes = { enabled = true; suppressWhenTypeMatchesName = false }; + }; }; }; }; - }; -}); + }); +end lspconfig.rust_analyzer.setup({ capabilities = capabilities; |