diff options
author | Damjan 9000 <damjan.9000@gmail.com> | 2024-05-03 00:11:56 +0200 |
---|---|---|
committer | Damjan 9000 <damjan.9000@gmail.com> | 2024-05-03 00:11:56 +0200 |
commit | 9fb3891d63e2a34bd63f3ee76ad00c4c20832937 (patch) | |
tree | 5f3145310bf7b6a8b44fe85fb91396746ac47b41 /lua | |
parent | 60d893f8c5d65573fb84bc18b4e0aa1cd141f755 (diff) | |
parent | 6f6f38a6b5059787d8d92b313f6e1b2c722389b0 (diff) |
Merge 'upstream' Move LspDetach handler near kickstart-lsp-highlight group
Diffstat (limited to 'lua')
-rw-r--r-- | lua/kickstart/plugins/lspconfig.lua | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lua/kickstart/plugins/lspconfig.lua b/lua/kickstart/plugins/lspconfig.lua index 6d87d0f..5f9220b 100644 --- a/lua/kickstart/plugins/lspconfig.lua +++ b/lua/kickstart/plugins/lspconfig.lua @@ -117,6 +117,14 @@ return { group = highlight_augroup, callback = vim.lsp.buf.clear_references, }) + + vim.api.nvim_create_autocmd('LspDetach', { + group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }), + callback = function(event2) + vim.lsp.buf.clear_references() + vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event2.buf } + end, + }) end -- The following autocommand is used to enable inlay hints in your @@ -131,14 +139,6 @@ return { end, }) - vim.api.nvim_create_autocmd('LspDetach', { - group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }), - callback = function(event) - vim.lsp.buf.clear_references() - vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event.buf } - end, - }) - -- LSP servers and clients are able to communicate to each other what features they support. -- By default, Neovim doesn't support everything that is in the LSP specification. -- When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities. |