nvimdev / lspsaga.nvim

improve neovim lsp experience
MIT License
3.47k stars 288 forks source link

Rename not work #1195

Closed johnny-mh closed 1 year ago

johnny-mh commented 1 year ago

Describe the bug

Rename does nothing. I've tried with typescript

Steps to reproduce

  1. :Lspsaga rename
  2. replace name
  3. \<CR>
  4. Float closes but nothing happens

I tried :lua vim.lsp.buf.rename() but it works properly.

Expected behavior

Module name properly changed.

Neovim version (nvim -v)

v0.10.0-dev-653+gfbeef0d4e-Homebrew

lspsaga commit

20eef6

Terminal name/version

alacrittty 0.12.2

duongapollo commented 1 year ago

same for me. :lua vim.lsp.buf.rename() working :Lspsaga rename not working

Neovim version (latest) v0.9.1

LSPSaga (latest commit)

Languages used Typescript, Typescript React

Terminal used Alacritty 0.12.2

yorik1984 commented 1 year ago

Same for me :lua vim.lsp.buf.rename() work fine, but after command :Lspsaga rename stop working. Neovim version (latest) v0.9.1

LSPSaga (latest commit)

Languages used Lua

Nvim-Qt

johnny-mh commented 1 year ago

@glepnir Thanks! it works!

body20002 commented 1 year ago

@glepnir I'm on the latest commit https://github.com/nvimdev/lspsaga.nvim/commit/96d001721f5d4c47a6c5ed54124e3b604b7bbca8 and :Lspsaga rename not working with typescript, but works with python

Neovim version (latest)

v0.9.1

LSPSaga (latest commit)

https://github.com/nvimdev/lspsaga.nvim/commit/96d001721f5d4c47a6c5ed54124e3b604b7bbca8

Languages used

Typescript, Typescript React, python

Terminal used

kitty 0.28.1

glepnir commented 1 year ago

can't reproduce. ts react works fine .

body20002 commented 1 year ago

@glepnir when I try to rename I get this stack traceback after I press enter

Error executing vim.schedule lua callback: ...share/nvim/lazy/lspsaga.nvim/lua/lspsaga/rename/init.lua:176: attempt to index local 'result' (a nil value) stack traceback: ...share/nvim/lazy/lspsaga.nvim/lua/lspsaga/rename/init.lua:176: in function 'handler' /usr/share/nvim/runtime/lua/vim/lsp/buf.lua:321: in function 'handler' /usr/share/nvim/runtime/lua/vim/lsp.lua:1394: in function '' vim/_editor.lua: in function <vim/_editor.lua:0>

config

glepnir commented 1 year ago

how to reproduce . could you provide an example code I can't reproduce it on ts or react . update and retry.

body20002 commented 1 year ago

@glepnir It's working now after updating, thank you

gusallc commented 5 months ago

Has anyone tried it in Java, because it doesn't work for me :(

:lua vim.lsp.buf.rename() working :Lspsaga rename not working

Neovim version (latest) v0.9.5

LSPSaga (latest commit - 0e2e116)

Languages used Java

Terminal used Alacritty 0.13.2