-
-
Notifications
You must be signed in to change notification settings - Fork 47
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
Rename provider not found #344
Comments
What does |
(by the way, is there a way to get the output of that command non-interactively?) |
@hejops Are you setting This setting has been "deprecated" in coc-pyright, but if it is set, it may have a bad effect. If you have it set, please delete the setting and try again. |
The only settings I have set in coc-settings.json are sh related. |
In my environment, "Rename" works fine in both Vim8 and Neovim. I can't reproduce it. |
I remember rename working on my other machine; I'll try to figure out what's different over there. Could I be missing a dependency (I installed For posterity, here are the contents of package.json and coc-settings.json:
And rope (according to pip) is located in |
In coc-pyright, To check if there is a conflict with coc-diagnostic, you can uninstall coc-diagnostic temporarily. If the "workspace folder" is not resolved correctly, "rename" may not work. Check this wiki page to make sure your "workspace folder" (project root) is set up properly. https://github.com/neoclide/coc.nvim/wiki/Using-workspaceFolders |
I managed to trace my git history and pinpoint the cause of the error. Turns out it was due to some issues between using
Hopefully this is of use to anyone with the same issue in future. |
For me it helped to install rope manually in my virtualenv. Weird, but ok. |
This seems to happen intermittently for me on
|
Indeed, I recently encountered an "Invalid position for rename" error, and |
I can confirm that rename doesn't work. I get the following message when trying to rename: Here is my coc-settings.json:
This is happening with |
@fannheyward Could you consider reopening this? |
@dcordb Can't reproduce this, please checkout |
I checked this with a minimal
Rename still won't work, from Could it be that something has changed in the last update of pyright that affects coc-pyright renaming? |
When the rename doesn't work for you, does goto definitions and other coc-pyright features still work? Asking since if so, and if doing It feels like initial setup causes this rename bug to show up, then afterwards if the coc server is restarted at least once, it never happens again. |
@liquiddandruff yes, while rename doesn't work everything else does (go to definition, auto completion, etc). Well everything except Restarting |
If the workspace folder (project root) is not detected correctly, you may not be able to "Rename" it. It may work correctly if you put |
Supplement: {} |
This is an example of a case where Rename is not possible. Directory example
[NG] Edit files with "absolute" paths.[OK] Edit files with "relative" pathsIn order to make "Rename" work with absolute paths, I think you still need to configure the workspace folder related settings. Ref: https://github.com/neoclide/coc.nvim/wiki/Using-workspaceFolders |
@yaegassy thanks for your explanation, yes this now works for me. I didn't know that in order to perform a rename I should be inside of a workspace. In fact, as you said, in the case when the rename fails I ran Also I just tested this for C++ and it works with either absolute or relative paths (it seems that it doesn't matter if it's inside a workspace or not). It's worth noting that for C++ I'm not using a So I'm assuming that being in a workspace is a requirement for |
@dcordb I think each language server behaves differently. I also think the situation is different depending on the project structure. For example, in the case of a "monorepo" structure, it is common for the |
I experienced the same issue with 'rename'. I changed in my |
I'm having a similar issue as mentioned here: #51 (comment)
Completion, diagnostics and formatting work normally.
versions
vim version: VIM - Vi IMproved 8.2 8022489
node version: v15.8.0
coc.nvim version: 0.0.80-8e7635b6a0
coc.nvim directory: /home/user/.vim/plugged/coc.nvim
term: dumb
platform: linux
Log of coc.nvim
The text was updated successfully, but these errors were encountered: