ray-x / go.nvim

G'day Nvimer, Joyful Gopher: Discover the Feature-Rich Go Plugin for Neovim
MIT License
2.05k stars 123 forks source link

fix: specify buffer manually #445

Closed IlyasYOY closed 6 months ago

IlyasYOY commented 6 months ago

in my case this line fixes: https://github.com/ray-x/go.nvim/issues/434

previously we tried to call codelense for current buffer using gopls instance for different ones. This happened cause fresh gopls is started for external dependencies.

Here I used https://neovim.io/doc/user/lsp.html#vim.lsp.get_clients() to get LSP for a specific buffer.

IlyasYOY commented 6 months ago

I changed the code to stable API: https://github.com/ray-x/go.nvim/pull/445/commits/c9504cd18a08d8d2ef297bc89907e5e69f3a20a3

Previous method was absent in 0.9: https://github.com/ray-x/go.nvim/actions/runs/8423800179/job/23066264136#step:7:109