coc-pyright: Rename provider not found
I’m having a similar issue as mentioned here: https://github.com/fannheyward/coc-pyright/issues/51#issuecomment-737721095
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
CocInfo
2021-02-25T11:05:26.404 INFO (pid:846565) [services] - registered service "diagnostic-languageserver"
2021-02-25T11:05:26.469 INFO (pid:846565) [services] - registered service "pyright"
2021-02-25T11:05:26.469 INFO (pid:846565) [services] - Pyright Server state change: stopped => starting
2021-02-25T11:05:26.515 INFO (pid:846565) [plugin] - coc.nvim 0.0.80-8e7635b6a0 initialized with node: v15.8.0 after 216ms
2021-02-25T11:05:26.523 INFO (pid:846565) [language-client-index] - pyright started with 846599
2021-02-25T11:05:26.767 INFO (pid:846565) [services] - Pyright Server state change: starting => running
2021-02-25T11:05:26.774 INFO (pid:846565) [services] - service pyright started
2021-02-25T11:05:28.808 INFO (pid:846565) [attach] - receive notification: highlight []
2021-02-25T11:05:29.686 INFO (pid:846565) [attach] - receive notification: highlight []
2021-02-25T11:05:31.478 INFO (pid:846565) [attach] - receive notification: runCommand [ 'document.renameCurrentWord' ]
2021-02-25T11:05:31.784 INFO (pid:846565) [attach] - receive notification: highlight []
2021-02-25T11:05:34.419 INFO (pid:846565) [attach] - receive notification: showInfo []
CocOpenLog
2021-02-25T11:05:26.404 INFO (pid:846565) [services] - registered service "diagnostic-languageserver"
2021-02-25T11:05:26.469 INFO (pid:846565) [services] - registered service "pyright"
2021-02-25T11:05:26.469 INFO (pid:846565) [services] - Pyright Server state change: stopped => starting
2021-02-25T11:05:26.515 INFO (pid:846565) [plugin] - coc.nvim 0.0.80-8e7635b6a0 initialized with node: v15.8.0 after 216ms
2021-02-25T11:05:26.523 INFO (pid:846565) [language-client-index] - pyright started with 846599
2021-02-25T11:05:26.767 INFO (pid:846565) [services] - Pyright Server state change: starting => running
2021-02-25T11:05:26.774 INFO (pid:846565) [services] - service pyright started
2021-02-25T11:05:28.808 INFO (pid:846565) [attach] - receive notification: highlight []
2021-02-25T11:05:29.686 INFO (pid:846565) [attach] - receive notification: highlight []
2021-02-25T11:05:31.478 INFO (pid:846565) [attach] - receive notification: runCommand [ 'document.renameCurrentWord' ]
2021-02-25T11:05:31.784 INFO (pid:846565) [attach] - receive notification: highlight []
2021-02-25T11:05:34.419 INFO (pid:846565) [attach] - receive notification: showInfo []
2021-02-25T11:05:34.444 INFO (pid:846565) [attach] - receive request: CocAutocmd [ 'BufReadCmd', 'output', 'output:///info' ]
2021-02-25T11:05:34.875 INFO (pid:846565) [attach] - receive notification: highlight []
2021-02-25T11:05:41.086 INFO (pid:846565) [attach] - receive notification: highlight []
2021-02-25T11:05:42.221 INFO (pid:846565) [attach] - receive notification: highlight []
2021-02-25T11:06:00.897 INFO (pid:846565) [attach] - receive notification: highlight []
2021-02-25T11:06:03.514 INFO (pid:846565) [attach] - receive notification: openLog []
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 23 (9 by maintainers)
@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
.git
of the parent directory to be detected and the wrong workspace folder to be set, causing definition jumps and more… to not work properly.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” paths
In 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
This seems to happen intermittently for me on
coc-pyright
, but a:CocRestart
fixes it. Completion, gotos, etc all still work when this happens.