From 1ca53c0a005613d874e5a783eb9cb3ebfa899fb3 Mon Sep 17 00:00:00 2001 From: ray-x Date: Sun, 31 Jul 2022 21:03:45 +1000 Subject: [PATCH] refresh codelens in on_attach --- lua/go/lsp.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/go/lsp.lua b/lua/go/lsp.lua index f28b52c..29dd0d4 100644 --- a/lua/go/lsp.lua +++ b/lua/go/lsp.lua @@ -64,6 +64,10 @@ local on_attach = function(client, bufnr) buf_set_keymap('n', 'ff', 'lua vim.lsp.buf.format({async = true})', opts) end + if _GO_NVIM_CFG.lsp_codelens then + vim.lsp.codelens.refresh() + end + -- local vim_version = vim.version().major * 100 + vim.version().minor * 10 + vim.version().patch elseif type(_GO_NVIM_CFG.lsp_keymaps) == 'function' then _GO_NVIM_CFG.lsp_keymaps(bufnr)