summaryrefslogtreecommitdiff
path: root/script/provider/provider.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-07 20:32:44 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-07 20:32:44 +0800
commit428d32055f1b7b5bce8a0fd75eeedf4114f8a7ec (patch)
tree228cebacdc651b297be60b48a7fe6555021101a3 /script/provider/provider.lua
parentf1b5ad2ee92ea9d1656a82fb4dbd0be32cb91ea8 (diff)
downloadlua-language-server-428d32055f1b7b5bce8a0fd75eeedf4114f8a7ec.zip
cleanup
Diffstat (limited to 'script/provider/provider.lua')
-rw-r--r--script/provider/provider.lua7
1 files changed, 1 insertions, 6 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index c3a1113a..ae389b70 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -40,7 +40,7 @@ end
proto.on('initialize', function (params)
client.init(params)
- workspace.init(params.rootUri)
+ workspace.initPath(params.rootUri)
return {
capabilities = cap.getIniter(),
serverInfo = {
@@ -130,7 +130,6 @@ proto.on('workspace/didChangeWatchedFiles', function (params)
if files.isLua(uri)
and not files.isOpen(uri)
and (not workspace.isIgnored(uri) or files.isLibrary(uri)) then
- plugin.awaitReady()
files.setText(uri, pub.awaitTask('loadFile', uri), false)
else
local path = furi.decode(uri)
@@ -149,7 +148,6 @@ end)
proto.on('workspace/didCreateFiles', function (params)
log.debug('workspace/didCreateFiles', util.dump(params))
- plugin.awaitReady()
for _, file in ipairs(params.files) do
if files.isLua(file.uri) then
files.setText(file.uri, pub.awaitTask('loadFile', file.uri), false)
@@ -171,7 +169,6 @@ end)
proto.on('workspace/didRenameFiles', function (params)
log.debug('workspace/didRenameFiles', util.dump(params))
- plugin.awaitReady()
for _, file in ipairs(params.files) do
local text = files.getOriginText(file.oldUri)
if text then
@@ -199,7 +196,6 @@ proto.on('textDocument/didOpen', function (params)
local text = doc.text
log.debug('didOpen', uri)
files.open(uri)
- plugin.awaitReady()
if not files.isOpen(uri) then
return
end
@@ -220,7 +216,6 @@ proto.on('textDocument/didChange', function (params)
local doc = params.textDocument
local changes = params.contentChanges
local uri = doc.uri
- plugin.awaitReady()
if not files.isLua(uri) and not files.isOpen(uri) then
return
end