-
-
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 in file from another path does not work #521
Comments
Do you have some other Python linter or formatter set with coc-diagnostic? |
Negative, no other linter or formatter set coc-settings.json:
|
Uninstalling coc-diagnostic does not help |
Tested coc-pyright with coc-diagnostic, can't reproduce. |
Started with a fully clean slate for coc (manually removed the coc directory), installed coc-pyright as a single coc plugin, same result. So it must be something external to coc (?).
|
Try minimal vimrc, with coc/coc-pyright only. |
Issue description updated with minimal configuration |
|
Excerpt (full file: pyright.log)
|
OK, reduced this further. The problem appears if the file, for example, is opened from another sub-root directory:
But wiill work if:
Also will work if:
However, there is something else as there are cases when this does not work even when opened from the same directory. Trying to figure this out... |
@dsirov If Try this. https://github.com/neoclide/coc.nvim/wiki/Using-workspaceFolders#resolve-workspace-folder e.g: autocmd FileType python let b:coc_root_patterns = ['.git', '.env', 'venv', '.venv', 'setup.cfg', 'setup.py', 'pyproject.toml', 'pyrightconfig.json'] Related issue: |
There was an error in |
Problem
When opening a file from another sub-root path and trying to rename a method/variable, the following error is received
[coc.nvim] Invalid position for rename
Seems exactly like in #474, but I do not have coc-python installed.
Minimal Environment
Fully-cleaning coc
~/.config/nvim/init.vim
installing coc-pyright
/tmp/test/test.py
Opening the file
Attempting to Rename
Attempt to rename the name of the function test when standing on any of its letters (
,rn
)Versioning
:CocCommand pyright.version
:CocInfo
:version
Debugging
:checkhealth
The text was updated successfully, but these errors were encountered: