smjonas / inc-rename.nvim

Incremental LSP renaming based on Neovim's command-preview feature.
MIT License
680 stars 10 forks source link

Plugins fails #67

Closed ajmasia closed 15 hours ago

ajmasia commented 2 days ago

When I call the plugin using LazyVim I get this error:

Error executing Lua callback: /opt/nvim-linux64/share/nvim/runtime/lua/vim/lsp/rpc.lua:291: Cannot serialise function: type not supported
stack traceback:
    [C]: in function 'encode'
    /opt/nvim-linux64/share/nvim/runtime/lua/vim/lsp/rpc.lua:291: in function 'encode_and_send'
    /opt/nvim-linux64/share/nvim/runtime/lua/vim/lsp/rpc.lua:338: in function 'request'
    /opt/nvim-linux64/share/nvim/runtime/lua/vim/lsp/client.lua:679: in function 'request'
    /opt/nvim-linux64/share/nvim/runtime/lua/vim/lsp.lua:877: in function 'buf_request'
    ...vim-lazyvim/lazy/inc-rename.nvim/lua/inc_rename/init.lua:516: in function 'perform_lsp_rename'
    ...vim-lazyvim/lazy/inc-rename.nvim/lua/inc_rename/init.lua:564: in function 'incremental_rename_execute'
    ...vim-lazyvim/lazy/inc-rename.nvim/lua/inc_rename/init.lua:577: in function <...vim-lazyvim/lazy/inc-rename.nvim/lua/inc_rename/init.lua:576>
tizot commented 2 days ago

Same for me:

Additionally, when I trigger a rename with the key binding, the floating window does not appear until I press another key. I don't know if it is a LazyVim or a IncRename issue though.

Edit: just reverted to the previous commit of IncRename and everything works just fine.

kvarenzn commented 2 days ago

same issue

changing not vim.fn.has("nvim-0.11") on line 157 of lua/inc_rename/init.lua to vim.fn.has("nvim-0.11") == 0 can temporarily solve this issue

joaomendoncaa commented 2 days ago

seems like this commit took us all out 😄

quick advice: you can change the commit hash on lazy.nvim to the previous commit 8ba77017ca468f3029bf88ef409c2d20476ea66b before the breaking changes — no need for forks/changes (don't forget to lazy sync afterwards). image

smjonas commented 2 days ago

Sorry guys, that shouldn't have happened :sweat_smile:

changing not vim.fn.has("nvim-0.11") on line 157 of lua/inc_rename/init.lua to vim.fn.has("nvim-0.11") == 0 can temporarily solve this issue

Thanks @kvarenzn, that must have slipped through during the last PR. I just pushed a hotfix changing it to vim.fn.has("nvim-0.11") == 0. Can anyone confirm that the issue is fixed now?

smjonas commented 2 days ago

Btw, which Neovim version are you using? It should not occur on the latest nightly version. If many user are using an older nightly version, I am thinking to revert the latest commit due to the high number of complaints.

ajmasia commented 1 day ago

Thanks guys!

tizot commented 1 day ago

Can anyone confirm that the issue is fixed now?

It works again. Thanks for the quick turnaround!