-
-
Notifications
You must be signed in to change notification settings - Fork 15
coc -> Rename doesn't work across files #42
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
Comments
It seems it happens because coc doesn't handle to confirm this you can do a little hack in server to see if it works or not. locations = locations.map(x => ({
...x,
uri: x.uri
.split('/')
.filter(c => c !== '.')
.join('/'),
})); |
Yeah that worked... okay, gonna report that one on the coc-vim repo then. |
Okay, just so we know what we are talking about, this is how the paths look like for my specific rename query: [
{
"uri": "file:///Users/ryyppy/Projects/rescript-association/vim-rescript/examples/rescript-project/././src/polySyntax.res",
"range": {
"start": {
"line": 8,
"character": 28
},
"end": {
"line": 8,
"character": 32
}
}
},
{
"uri": "file:///Users/ryyppy/Projects/rescript-association/vim-rescript/examples/rescript-project/./src/recordExample.res",
"range": {
"start": {
"line": 9,
"character": 11
},
"end": {
"line": 9,
"character": 15
}
}
},
{
"uri": "file:///Users/ryyppy/Projects/rescript-association/vim-rescript/examples/rescript-project/./src/recordExample.res",
"range": {
"start": {
"line": 1,
"character": 12
},
"end": {
"line": 1,
"character": 16
}
}
}
] The first uri looks weird though: |
I've opened an issue neoclide/coc.nvim#3104
Yeah, worth checking what's happening in analysis binary |
This is fixed on coc.nvim's master. |
question is when this will be shipped in a new release.. not sure how to use that master version via |
this installs coc from master
I suggest to wait until it get released, they release regulary so it should be shipped soon. |
This is released on |
okay nice, just tried it. Works like a charm. |
There's an issue where a
coc-rename
over multiple files fails with[coc.nvim] Error on applyEdits: Cannot read property 'uri' of null
To reproduce, create the following files:
Then try to
coc-rename
MyFile1.a
toMyFile1.something
, and it will first ask to load 1 file from disk, and then fail with the error message mentioned above.My wild guess is that it's an issue with how coc interprets the rename command result. Either our LSP is not sticking to certain protocol conventions, or coc-vim is at fault. Hard to debug.
The text was updated successfully, but these errors were encountered: