question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rename provider not found

See original GitHub issue

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 []

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:23 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
yaegassycommented, Mar 26, 2021

@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.

2reactions
yaegassycommented, Mar 26, 2021

This is an example of a case where Rename is not possible.

Directory example

tmp$ pwd
/tmp
tmp$ tree coc-pyright-issue344/
coc-pyright-issue344/
└── check.py

[NG] Edit files with “absolute” paths.

1_coc-pyright-issue344_ng

[OK] Edit files with “relative” paths

2_coc-pyright-issue344_ok


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

Read more comments on GitHub >

github_iconTop Results From Across the Web

[coc.nvim] Rename provider not found for current document
I can not use coc-rename in any file type CocInfo: versions vim version: NVIM v0.3.8 node version: v10.16.3 coc.nvim version: ...
Read more >
neoclide/coc.nvim - Gitter
and latest release of neovim (not master), on ArchLinux. ... I get an error [coc.nvim] Rename provider not found for current document when...
Read more >
Is there an easy way to rename a released TF Provider?
The only part you do not already have a solution for is that you will need to recreate the provider in the registry...
Read more >
ItemCmdletProviderIntrinsics.Rename Method (System ...
The path to the item to rename. It may be a drive or provider-qualified path and may include glob characters. newName: String. The...
Read more >
Language Server Protocol Specification - 3.17
This member MUST NOT exist if there was an error invoking the method. ... should not reorder textDocument/definition and textDocument/rename requests, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found