summaryrefslogtreecommitdiff
path: root/script/provider
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-08 14:39:52 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-08 14:39:52 +0800
commit42f8519bb66c69230f105a1135b33259ca653f7e (patch)
tree6ec01ae62424783592a3de3f1421c50150080928 /script/provider
parent428d32055f1b7b5bce8a0fd75eeedf4114f8a7ec (diff)
downloadlua-language-server-42f8519bb66c69230f105a1135b33259ca653f7e.zip
cleanup
Diffstat (limited to 'script/provider')
-rw-r--r--script/provider/provider.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index ae389b70..a8ef2c68 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -109,6 +109,7 @@ proto.on('workspace/didChangeConfiguration', function ()
end)
proto.on('workspace/didChangeWatchedFiles', function (params)
+ workspace.awaitReady()
for _, change in ipairs(params.changes) do
local uri = change.uri
if not workspace.isWorkspaceUri(uri) then
@@ -191,6 +192,7 @@ proto.on('workspace/didRenameFiles', function (params)
end)
proto.on('textDocument/didOpen', function (params)
+ workspace.awaitReady()
local doc = params.textDocument
local uri = doc.uri
local text = doc.text
@@ -213,6 +215,7 @@ proto.on('textDocument/didClose', function (params)
end)
proto.on('textDocument/didChange', function (params)
+ workspace.awaitReady()
local doc = params.textDocument
local changes = params.contentChanges
local uri = doc.uri