summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-09-20 20:01:18 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-09-20 20:01:18 +0800
commitf01679bde3a0e132bd862f959d24d07d3b343aff (patch)
tree24136391aa727bcdbf22b99ff1729d0c30e1d160
parentc95d940166d90aef9fdb6206d6bfabb25b178c90 (diff)
downloadlua-language-server-f01679bde3a0e132bd862f959d24d07d3b343aff.zip
small fix
-rw-r--r--script/library.lua1
-rw-r--r--script/provider/provider.lua2
2 files changed, 3 insertions, 0 deletions
diff --git a/script/library.lua b/script/library.lua
index 017b3e20..a7b06e97 100644
--- a/script/library.lua
+++ b/script/library.lua
@@ -555,6 +555,7 @@ end)
files.watch(function (ev, uri)
if ev == 'update'
or ev == 'dll' then
+ await.sleep(1)
check3rd(uri)
end
end)
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index a312bf1e..823abae5 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -946,6 +946,7 @@ client.event(function (ev)
log.debug('textDocument/semanticTokens/full')
local uri = files.getRealUri(params.textDocument.uri)
workspace.awaitReady(uri)
+ await.sleep(0.0)
local _ <close> = progress.create(uri, lang.script.WINDOW_PROCESSING_SEMANTIC_FULL, 0.5)
local core = require 'core.semantic-tokens'
local results = core(uri, 0, math.huge)
@@ -974,6 +975,7 @@ m.register 'textDocument/semanticTokens/range' {
local uri = files.getRealUri(params.textDocument.uri)
workspace.awaitReady(uri)
local _ <close> = progress.create(uri, lang.script.WINDOW_PROCESSING_SEMANTIC_RANGE, 0.5)
+ await.sleep(0.0)
local core = require 'core.semantic-tokens'
local start, finish = converter.unpackRange(uri, params.range)
local results = core(uri, start, finish)