nvim: lsp: Refactor setting up of autocmd for code lens & document highlight

This commit is contained in:
Sanchayan Maity 2022-05-02 09:28:36 +05:30
parent fdc17306b7
commit 59b1696ffa

View file

@ -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)
@ -180,6 +179,7 @@ local on_attach = function(client, bufnr)
end,
})
end
end
end
local on_init = function(client)