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

vim.lsp.get_active_clients() is deprecated, use vim.lsp.get_clients() instead #459

Closed jiangyinzuo closed 4 months ago

jiangyinzuo commented 4 months ago

NVIM v0.11.0-dev will report the following error:

vim.lsp.get_active_clients() is deprecated, use vim.lsp.get_clients() instead. :help deprecated
Feature will be removed in Nvim 0.12
stack traceback:
        /usr/share/nvim/runtime/lua/vim/lsp.lua:785: in function 'get_active_clients'
        /root/plugged/go.nvim/lua/go/lsp.lua:182: in function 'client'
        /root/plugged/go.nvim/lua/go/inlay.lua:318: in function 'set_inlay_hints'
        /root/plugged/go.nvim/lua/go/inlay.lua:69: in function ''
        vim/_editor.lua: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>
ray-x commented 4 months ago

I will need to refresh this later as this API(get_clients) is not available in 0.9.x. Maybe when 0.10.1 is out.

jiangyinzuo commented 4 months ago

This commit 8008d16 works well for me. Thanks!