summaryrefslogtreecommitdiff
path: root/script/provider/provider.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-04-27 10:39:35 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-04-27 10:39:35 +0800
commit1fc3fe755cfe9d21b87f5e7a4facc2255251b519 (patch)
tree7bbdfcb4dfe817288e10eb0709bff6070d73c3ae /script/provider/provider.lua
parent2edb4ba72f5902367985648c3ec9343826535fc3 (diff)
downloadlua-language-server-1fc3fe755cfe9d21b87f5e7a4facc2255251b519.zip
apply changs immediately
#2062
Diffstat (limited to 'script/provider/provider.lua')
-rw-r--r--script/provider/provider.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index 2e6d8f75..ceabefea 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -292,13 +292,13 @@ m.register 'textDocument/didClose' {
m.register 'textDocument/didChange' {
---@async
function (params)
- local doc = params.textDocument
- local changes = params.contentChanges
+ local doc = params.textDocument
+ local changes = params.contentChange
local uri = files.getRealUri(doc.uri)
- workspace.awaitReady(uri)
- local text = files.getOriginText(uri)
+ local text = files.getOriginText(uri)
if not text then
- files.setText(uri, pub.awaitTask('loadFile', furi.decode(uri)), false)
+ text = util.loadFile(furi.decode(uri))
+ files.setText(uri, text, false)
return
end
local rows = files.getCachedRows(uri)