-
Notifications
You must be signed in to change notification settings - Fork 273
Closed
Description
Describe the bug
Rename a symbol that is present in two files.
When the server sends back the two textEdits they are properly applied.
However, the follow up didChange notice for both documents contains the text content from the first file.
Environment
- neovim/vim version (
nvim --versionorvim --version): NVIM v0.3.0 - This plugin version (
git rev-parse --short HEAD): 95608f5 - This plugin's binary version (
bin/languageclient --version): languageclient 0.1.127 - Minimal vimrc content (A minimal vimrc is the smallest vimrc that could
reproduce the issue. Refer to an example here): - Language server link and version: https://github.com/snoe/clojure-lsp release-20181120T050154
To Reproduce
text of test.clj = "(defn foo [])"
text of thing.clj = "(declare foo)"
rename to produce a change like this (see lc-errors.log[0] line 279):
{"jsonrpc":"2.0","result":{"changes":{"file:///private/tmp/test.clj":[{"newText":"foobar","range":{"end":{"character":9,"line":0},"start":{"character":6,"line":0}}}],"file:///private/tmp/thing.clj":[{"newText":"foobar","range":{"end":{"character":12,"line":0},"start":{"character":9,"line":0}}}]}},"id":5}
Current behavior (see lc.errors.log[0] lines 332 and 319)
didChange.text of test.clj = "(defn foobar [])"
didChange.text of thing.clj = "(defn foobar [])"
Expected behavior
didChange.text of test.clj = "(defn foobar [])"
didChange.text of thing.clj = "(declare foobar)"
Additional context
Lines 313-316 look suspicious, it seems LSP#text() is being run and getting the current buffer's text?
23:07:51 INFO main src/languageclient.rs:49 gather_args: [LanguageId, Filename] = [String("clojure"), String("/private/tmp/thing.clj")]
23:07:51 INFO main src/languageclient.rs:30 Some arguments are not available. Requesting from vim. Keys: ["text"]. Exps: ["LSP#text()"]
23:07:51 INFO main src/vim.rs:92 => None {"jsonrpc":"2.0","method":"eval","params":["[LSP#text()]"],"id":53}
23:07:51 INFO reader-main src/vim.rs:390 <= None {"id": 53, "jsonrpc": "2.0", "result": [["(defn foobar [])", ""]]}
Metadata
Metadata
Assignees
Labels
No labels