diff options
| author | sigmaSd <bedisnbiba@gmail.com> | 2022-07-17 10:11:06 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-17 02:11:06 -0700 |
| commit | 5d77a4e0bccbe43471abd0578e066b0bbdafe3ab (patch) | |
| tree | b92aacfa008a719d946939d786d0a1ae398b4ef8 /lua | |
| parent | fix(denolos): ignore caching error #2009 (diff) | |
| download | nvim-lspconfig-5d77a4e0bccbe43471abd0578e066b0bbdafe3ab.tar nvim-lspconfig-5d77a4e0bccbe43471abd0578e066b0bbdafe3ab.tar.gz nvim-lspconfig-5d77a4e0bccbe43471abd0578e066b0bbdafe3ab.tar.bz2 nvim-lspconfig-5d77a4e0bccbe43471abd0578e066b0bbdafe3ab.tar.lz nvim-lspconfig-5d77a4e0bccbe43471abd0578e066b0bbdafe3ab.tar.xz nvim-lspconfig-5d77a4e0bccbe43471abd0578e066b0bbdafe3ab.tar.zst nvim-lspconfig-5d77a4e0bccbe43471abd0578e066b0bbdafe3ab.zip | |
fix(denols): jumping to definition then returning breaks lsp #2000
- remove unneeded lsp attach
- default to single_file_support=true
fix https://github.com/neovim/nvim-lspconfig/issues/1998
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/denols.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lua/lspconfig/server_configurations/denols.lua b/lua/lspconfig/server_configurations/denols.lua index 6b83d6f0..8e503e45 100644 --- a/lua/lspconfig/server_configurations/denols.lua +++ b/lua/lspconfig/server_configurations/denols.lua @@ -13,7 +13,7 @@ local function virtual_text_document_handler(uri, result) return nil end - for client_id, res in pairs(result) do + for _, res in pairs(result) do -- Error might be present because of race, deno server will eventually send a result. #1995 if res.error ~= nil then require('vim.lsp.log').warn( @@ -32,7 +32,6 @@ local function virtual_text_document_handler(uri, result) vim.api.nvim_buf_set_option(bufnr, 'readonly', true) vim.api.nvim_buf_set_option(bufnr, 'modified', false) vim.api.nvim_buf_set_option(bufnr, 'modifiable', false) - lsp.buf_attach_client(bufnr, client_id) end end end @@ -67,6 +66,8 @@ end return { default_config = { cmd = { 'deno', 'lsp' }, + -- single file support is required for now to make the lsp work correctly, see #2000 + single_file_support = true, filetypes = { 'javascript', 'javascriptreact', |
