nvim: lsp: Refactor setting up of autocmd for code lens & document highlight
This commit is contained in:
parent
fdc17306b7
commit
59b1696ffa
1 changed files with 33 additions and 33 deletions
|
@ -144,7 +144,6 @@ local on_attach = function(client, bufnr)
|
|||
|
||||
if client.server_capabilities.codeLensProvider or client.server_capabilities.documentHighlightProvider then
|
||||
vim.api.nvim_create_augroup("LSP", {clear = true})
|
||||
end
|
||||
|
||||
if client.server_capabilities.codeLensProvider then
|
||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "<Leader>l", "<cmd>lua vim.lsp.codelens.run()<CR>", opts)
|
||||
|
@ -181,6 +180,7 @@ local on_attach = function(client, bufnr)
|
|||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local on_init = function(client)
|
||||
if client.config.settings then
|
||||
|
|
Loading…
Reference in a new issue