Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on rename in tsx #64

Open
heygwangjin opened this issue Oct 5, 2024 · 5 comments
Open

Error on rename in tsx #64

heygwangjin opened this issue Oct 5, 2024 · 5 comments

Comments

@heygwangjin
Copy link

heygwangjin commented Oct 5, 2024

Hello!

Some errors occurred when renaming the tailwindcss utility class and text in the react component. (*.tsx)

Hopefully the video explains it better. I use noice.nvim

Screen.Recording.2024-10-06.at.1.21.59.AM.mov

This is the neovim version I'm running

NVIM v0.10.2
Build type: Release
LuaJIT 2.1.1727870382

This is my :LspInfo
Screenshot 2024-10-06 at 1 24 40 AM

@heygwangjin heygwangjin changed the title Doesn't work Error on rename in tsx Oct 5, 2024
@smjonas
Copy link
Owner

smjonas commented Oct 6, 2024

Hey, can you provide me with the project files so I can try reproducing this bug? I tried to rename it with the file in the recording, but didn't get an error:

inc-rename-tsx

Also, this seems to be a Neovim bug as the error is in a Nvim internal file, can you run please run :=vim.lsp.buf.rename("newname", {}) while your cursor is placed directly above "relative"?

If there is still an error, it means the error is not related to this plugin and you should report it to the Neovim repo directly.

@heygwangjin
Copy link
Author

heygwangjin commented Oct 7, 2024

Thanks for replying @smjonas

This is my github link of this project below. /src/app/layout.tsx
https://github.com/heygwangjin/v1

I ran this command :=vim.lsp.buf.rename("newname", {}) you said, but maybe it doesn't work well.

Should I report it to the Neovim repo?

Screen.Recording.2024-10-07.at.7.48.17.PM.mov

And why Argument required error occurs when I rename normal text like Hello?

@smjonas
Copy link
Owner

smjonas commented Oct 7, 2024

Yes, I think it would be best to report it to the Neovim repo using a minimal configuration + language server. You should also provide the full stacktrace which you can see using the :mes command.

And why Argument required error occurs when I rename normal text like Hello?

When does this occur?

@heygwangjin
Copy link
Author

And why Argument required error occurs when I rename normal text like Hello?

You can see the situation I mentioned at the first video I recorded. (from 0:00 ~ 0:03)

@smjonas
Copy link
Owner

smjonas commented Oct 9, 2024

This should only happen when you submit the command :IncRename directly without any arguments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants