Closed eeriemyxi closed 5 months ago
Thanks for reporting! This is not really an issue of this plugin but it's caused due to the way the pyright LSP server responds to the textDocument/references
and textDocument/rename
requests. Pyright will report a reference at the import when the symbol under the cursor is the module name at the top, but it won't allow renaming (references which are used for highlights and expected result are different). In contrast, pylsp allows you to rename module names directly (references and expected result match).
So I would advise you to either report this to pyright or switch to pylsp. Alternatively, you can use both LSP servers at the same time (which also tends to give you better linting in my experience). In that case, pylsp allows you rename the import as expected.
https://github.com/smjonas/inc-rename.nvim/assets/86738916/e558107b-5b35-4670-bfa3-93ef7ca8b3bf
It worked when I tried to rename
parser
but it didn't work when I tried to renameargparse
. However, it does renameargparse
in the live preview.Neovim version: 0.9.5 Python version: 3.12.2