diff options
| author | nsfisis <nsfisis@gmail.com> | 2023-09-24 20:22:06 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2023-09-25 03:56:59 +0900 |
| commit | e0ede92edf877e1f0ae29ba6b1eff2de7bccf461 (patch) | |
| tree | 4b27df46b6c0070983e6dc9f692f734b917eb430 /.config/nvim/lua/vimrc | |
| parent | 0d65b41fde9db6ae1a3561b16af187e1de9a1063 (diff) | |
| download | dotfiles-e0ede92edf877e1f0ae29ba6b1eff2de7bccf461.tar.gz dotfiles-e0ede92edf877e1f0ae29ba6b1eff2de7bccf461.tar.zst dotfiles-e0ede92edf877e1f0ae29ba6b1eff2de7bccf461.zip | |
neovim/lsp: enable denols
Diffstat (limited to '.config/nvim/lua/vimrc')
| -rw-r--r-- | .config/nvim/lua/vimrc/plugins.lua | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/.config/nvim/lua/vimrc/plugins.lua b/.config/nvim/lua/vimrc/plugins.lua index 0dd0ac6..cc9d14f 100644 --- a/.config/nvim/lua/vimrc/plugins.lua +++ b/.config/nvim/lua/vimrc/plugins.lua @@ -663,8 +663,25 @@ return { config = function() local lspconfig = require('lspconfig') + -- TODO + -- Enable denols xor tsserver. + local is_deno_repo + if vim.fn.executable('deno') == 1 then + local get_deno_root_dir = lspconfig.util.root_pattern("deno.json", "deno.jsonc") + is_deno_repo = get_deno_root_dir(vim.api.nvim_buf_get_name(0)) ~= nil + else + is_deno_repo = false + end + if vim.fn.executable('typescript-language-server') == 1 then - lspconfig.tsserver.setup({}) + if not is_deno_repo then + lspconfig.tsserver.setup({}) + end + end + if vim.fn.executable('deno') == 1 then + if is_deno_repo then + lspconfig.denols.setup({}) + end end if vim.fn.executable('gopls') == 1 then lspconfig.gopls.setup({}) |
