From 8f8ab4b968d08bd70ecda1f2909fb5e6177452ca Mon Sep 17 00:00:00 2001 From: Micah Halter Date: Thu, 30 May 2024 08:54:03 -0400 Subject: [PATCH 1/3] fix: add back compatibility with neovim v0.9 (#469) --- lua/go.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/go.lua b/lua/go.lua index f6979a9..c1e9448 100644 --- a/lua/go.lua +++ b/lua/go.lua @@ -169,7 +169,7 @@ _GO_NVIM_CFG = { local function reset_tbl(tbl) for k, _ in pairs(tbl) do if type(tbl[k]) == 'table' then - if vim.islist(tbl[k]) then + if (vim.islist or vim.tbl_islist)(tbl[k]) then tbl[k] = {} else reset_tbl(tbl[k]) From 204406c17022111160c6846887331fc2a73e90e0 Mon Sep 17 00:00:00 2001 From: Di Warachet S Date: Sat, 15 Jun 2024 10:28:57 +0700 Subject: [PATCH 2/3] Update playground README (#478) --- playground/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playground/README.md b/playground/README.md index 6422488..2dcb098 100644 --- a/playground/README.md +++ b/playground/README.md @@ -4,7 +4,7 @@ Start with (may need to restart nvim after the first time) ```shell cd sampleApp -nvim -u ../init.lua main.go +nvim -u ../init_lazy.lua main.go ``` From fca26b05699ad06c077721823a0b1a8e02539d5c Mon Sep 17 00:00:00 2001 From: Tzu-Yu Lee Date: Sat, 15 Jun 2024 03:34:12 +0000 Subject: [PATCH 3/3] 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. --- lua/go/codelens.lua | 2 +- lua/go/lsp.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/go/codelens.lua b/lua/go/codelens.lua index ed4b460..6428ea2 100644 --- a/lua/go/codelens.lua +++ b/lua/go/codelens.lua @@ -53,7 +53,7 @@ function M.refresh() return end if _GO_NVIM_CFG.lsp_codelens == true then - vim.lsp.codelens.refresh() + vim.lsp.codelens.refresh({ bufnr = 0 }) else log('refresh codelens') vim.lsp.codelens.clear() diff --git a/lua/go/lsp.lua b/lua/go/lsp.lua index cf66bef..bcdd6ef 100644 --- a/lua/go/lsp.lua +++ b/lua/go/lsp.lua @@ -39,7 +39,7 @@ local on_attach = function(client, bufnr) end if _GO_NVIM_CFG.lsp_codelens then - vim.lsp.codelens.refresh() + vim.lsp.codelens.refresh({ bufnr = 0 }) end local keymaps if _GO_NVIM_CFG.lsp_keymaps == true then