Closed weirdgiraffe closed 1 month ago
Looked through the tests. Failures looks not relevant to my changes. Or am I wrong?
The doc says server_ready
is deprecated...
maybe use LspAttach autocmd and add a function to check whether gopls
is ready and enable codelens if it is.
Hi, @weirdgiraffe Is it possible we can merge edfadae first and create a separate PR for gopls inlay? I am not quite sure what causing the test failure with the gopls changes. So lets create a dedicated PR for it. Thanks!
Ok. will split
Hello! I created a PR: https://github.com/ray-x/go.nvim/pull/445
It seems like we try to fix the same issue. I tested my solution and it works fine (requiring a lot less code changes)
Maybe I'm wrong and missing something, but it looks like it's enough to find LSP for current buffer without checking it's status.
I've noticed that I'm constantly getting an error related to codelens when I go to the definion for the first time.
my neovim version:
This PR fixes this error by checking if lsp servers are ready when
go.nvim
is trying to refresh codelenses:I've also changed a bit the behavior of
refresh()
andclear()
to deal only with current buffer and only with codelens provided by gopls.Additionally, this PR does a bit of cleanups (unify usage of
codelens
andlog
withing codelens.lua) and refactors the module a bit to output possible errors more precisely.