We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Refactoring class name Foo to Fo, with :call LanguageClient_textDocument_rename() fails in the code below:
#include <iostream> class Foo { public: int bar; }; int main(int argc, char* argv[]) { Foo foo; int a; std::cout << 9; }
From LanguageClient.log
2017-12-16T00:21:00.240679041+01:00 INFO languageclient::languageclient - => {"jsonrpc":"2.0","method":"textDocument/rename","params":{"newName":"Fo","position":{"character":4,"line":8},"textDocument":{"uri":"file_path_to_main.cpp"}},"id":38} 2017-12-16T00:21:00.241042531+01:00 INFO languageclient::languageclient - <= {"jsonrpc":"2.0","id":38,"result":{"documentChanges":[{"textDocument":{"uri":"file_path_to_main.cpp","version":0},"edits":[{"range":{"start":{"line":2,"character":6},"end":{"line":2,"character":9}},"newText":"Fo"},{"range":{"start":{"line":8,"character":4},"end":{"line":8,"character":7}},"newText":"Fo"}]}]}} 2017-12-16T00:21:00.242505962+01:00 ERROR languageclient::languageclient - Error handling message. Message: {"id": 4, "jsonrpc": "2.0", "method": "textDocument/rename", "params": {"character": 4, "handle": true, "languageId": "cpp", "line": 8, "buftype": "", "cword": "Foo", "filename": "file_path_to_main.cpp"}}. Error: Err(ErrorImpl { code: Message("missing field changes"), line: 0, column: 0 })
2017-12-16T00:21:00.240679041+01:00 INFO languageclient::languageclient - => {"jsonrpc":"2.0","method":"textDocument/rename","params":{"newName":"Fo","position":{"character":4,"line":8},"textDocument":{"uri":"file_path_to_main.cpp"}},"id":38}
2017-12-16T00:21:00.241042531+01:00 INFO languageclient::languageclient - <= {"jsonrpc":"2.0","id":38,"result":{"documentChanges":[{"textDocument":{"uri":"file_path_to_main.cpp","version":0},"edits":[{"range":{"start":{"line":2,"character":6},"end":{"line":2,"character":9}},"newText":"Fo"},{"range":{"start":{"line":8,"character":4},"end":{"line":8,"character":7}},"newText":"Fo"}]}]}}
2017-12-16T00:21:00.242505962+01:00 ERROR languageclient::languageclient - Error handling message. Message: {"id": 4, "jsonrpc": "2.0", "method": "textDocument/rename", "params": {"character": 4, "handle": true, "languageId": "cpp", "line": 8, "buftype": "", "cword": "Foo", "filename": "file_path_to_main.cpp"}}. Error: Err(ErrorImpl { code: Message("missing field changes"), line: 0, column: 0 })
changes
From the logs I see cquery responds correctly to the textDocument/rename request, but afterwards the LanguageClient runs into error for some reason.
The text was updated successfully, but these errors were encountered:
The issue seems like: changes? in WorkspaceEdit is optional.
changes?
WorkspaceEdit
Sorry, something went wrong.
Language Server Protocol v 2-x, seems changes are not optional in WorkspaceEdit. https://github.com/Microsoft/language-server-protocol/blob/master/versions/protocol-2-x.md#workspaceedit
@vargheseg LanguageClient-neovim supports 3.x version of the protocol
This plugin use a library that provide LSP Types in Rust but this lib seems to don't have the 3.0 version of WorkspaceEdit https://github.com/gluon-lang/languageserver-types/blob/master/src/lib.rs#L269
I will try to work on this tommorow
5e87609
No branches or pull requests
Installation Details:
Issue:
Refactoring class name Foo to Fo, with :call LanguageClient_textDocument_rename()
fails in the code below:
Logs
From LanguageClient.log
From the logs I see cquery responds correctly to the textDocument/rename request, but afterwards the LanguageClient runs into error for some reason.
The text was updated successfully, but these errors were encountered: