fix: limit codelens refresh to current buffer (#476)

The behavior of `vim.lsp.codelens.refresh()` had been changed in
https://github.com/neovim/neovim/pull/27253 to refresh all open
buffers.

This changes the function calls to specify the current buffer to
maintain the old behavior.

Fixes https://github.com/ray-x/go.nvim/issues/472.
pull/479/head
Tzu-Yu Lee 4 months ago committed by GitHub
parent 204406c170
commit fca26b0569
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -53,7 +53,7 @@ function M.refresh()
return return
end end
if _GO_NVIM_CFG.lsp_codelens == true then if _GO_NVIM_CFG.lsp_codelens == true then
vim.lsp.codelens.refresh() vim.lsp.codelens.refresh({ bufnr = 0 })
else else
log('refresh codelens') log('refresh codelens')
vim.lsp.codelens.clear() vim.lsp.codelens.clear()

@ -39,7 +39,7 @@ local on_attach = function(client, bufnr)
end end
if _GO_NVIM_CFG.lsp_codelens then if _GO_NVIM_CFG.lsp_codelens then
vim.lsp.codelens.refresh() vim.lsp.codelens.refresh({ bufnr = 0 })
end end
local keymaps local keymaps
if _GO_NVIM_CFG.lsp_keymaps == true then if _GO_NVIM_CFG.lsp_keymaps == true then

Loading…
Cancel
Save