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
|
if client.server_capabilities.codeLensProvider or client.server_capabilities.documentHighlightProvider then
|
||||||
vim.api.nvim_create_augroup("LSP", {clear = true})
|
vim.api.nvim_create_augroup("LSP", {clear = true})
|
||||||
end
|
|
||||||
|
|
||||||
if client.server_capabilities.codeLensProvider then
|
if client.server_capabilities.codeLensProvider then
|
||||||
vim.api.nvim_buf_set_keymap(bufnr, "n", "<Leader>l", "<cmd>lua vim.lsp.codelens.run()<CR>", opts)
|
vim.api.nvim_buf_set_keymap(bufnr, "n", "<Leader>l", "<cmd>lua vim.lsp.codelens.run()<CR>", opts)
|
||||||
|
@ -180,6 +179,7 @@ local on_attach = function(client, bufnr)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local on_init = function(client)
|
local on_init = function(client)
|
||||||
|
|
Loading…
Reference in a new issue