diff --git a/neovim/.config/nvim/after/plugin/lsp/config.lua b/neovim/.config/nvim/after/plugin/lsp/config.lua index 800f2f9..d51a5f0 100644 --- a/neovim/.config/nvim/after/plugin/lsp/config.lua +++ b/neovim/.config/nvim/after/plugin/lsp/config.lua @@ -54,6 +54,11 @@ vim.api.nvim_create_autocmd("LspAttach", { if not vim.lsp.buf.range_code_action == nil then vim.keymap.set("v", ".", vim.lsp.buf.range_code_action, opts) end + + if client and client:supports_method("textDocument/codeLens") then + vim.lsp.codelens.enable(true, { bufnr = ev.buf }) + vim.keymap.set("n", "c", vim.lsp.codelens.run, opts) + end end, }) diff --git a/neovim/.config/nvim/after/plugin/lsp/go.lua b/neovim/.config/nvim/after/plugin/lsp/go.lua index 5bb856c..025faed 100644 --- a/neovim/.config/nvim/after/plugin/lsp/go.lua +++ b/neovim/.config/nvim/after/plugin/lsp/go.lua @@ -7,6 +7,9 @@ vim.lsp.config.gopls = { root_markers = root_markers, settings = { gopls = { + codelenses = { + test = true, + }, linksInHover = true, usePlaceholders = false, -- just to ensure it's off, incase in the future go team decides to toggle it on by default completeUnimported = true,