neovim: don't start codelens for specific lsps
This commit is contained in:
@@ -59,7 +59,13 @@ vim.api.nvim_create_autocmd("LspAttach", {
|
||||
vim.keymap.set("v", "<leader>.", vim.lsp.buf.range_code_action, opts)
|
||||
end
|
||||
|
||||
if client and client:supports_method("textDocument/codeLens") then
|
||||
local codelens_ignored_clients = { "yaml" }
|
||||
|
||||
if
|
||||
client
|
||||
and not vim.tbl_contains(codelens_ignored_clients, client.name)
|
||||
and client:supports_method("textDocument/codeLens")
|
||||
then
|
||||
vim.lsp.codelens.enable(true, { bufnr = ev.buf })
|
||||
vim.keymap.set("n", "<leader>c", vim.lsp.codelens.run, opts)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user