diff options
author | sumneko <sumneko@hotmail.com> | 2022-01-23 05:17:35 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2022-01-23 05:17:35 +0800 |
commit | d9a7e4bf6b521d60aef110a62a053d417416af85 (patch) | |
tree | 3b7ea57ee190cf98426696520523e3cb11b215e3 /script/provider | |
parent | c4dd7789e723f28976dd5edd2e32e374ef937883 (diff) | |
download | lua-language-server-d9a7e4bf6b521d60aef110a62a053d417416af85.zip |
cleanup
Diffstat (limited to 'script/provider')
-rw-r--r-- | script/provider/provider.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua index 66999aa0..dc267dae 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -225,7 +225,9 @@ m.register 'textDocument/didOpen' { local uri = files.getRealUri(doc.uri) workspace.awaitReady(uri) local text = doc.text - files.setText(uri, text, true, doc.version) + files.setText(uri, text, true, function (file) + file.version = doc.version + end) files.open(uri) end } @@ -253,7 +255,9 @@ m.register 'textDocument/didChange' { local text = files.getOriginText(uri) or '' local rows = files.getCachedRows(uri) text, rows = tm(text, rows, changes) - files.setText(uri, text, true, doc.version) + files.setText(uri, text, true, function (file) + file.version = doc.version + end) files.setCachedRows(uri, rows) end } |