neovim: don't start codelens for specific lsps

This commit is contained in:
2026-03-30 21:44:31 +03:00
parent 33c85f56fc
commit 7f7f000c4e

View File

@@ -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