summaryrefslogtreecommitdiff
path: root/script/provider
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-08-19 20:45:51 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-08-19 20:45:51 +0800
commit7829753fb9951f2de05a3ebec0e94b3164eb6b46 (patch)
treed6af300d2453389a28e47acf2ccc7e6d6da84b36 /script/provider
parent0ec4d69bc4e34c3c11c85d17edc0e98e9a719c7e (diff)
downloadlua-language-server-7829753fb9951f2de05a3ebec0e94b3164eb6b46.zip
improve completion
Diffstat (limited to 'script/provider')
-rw-r--r--script/provider/provider.lua8
1 files changed, 7 insertions, 1 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index fe044fc5..09a031cc 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -470,7 +470,7 @@ proto.on('textDocument/completion', function (params)
items[i] = item
end
return {
- isIncomplete = true,
+ isIncomplete = not result.complete,
items = items,
}
end)
@@ -682,6 +682,8 @@ end)
proto.on('textDocument/semanticTokens/full', function (params)
workspace.awaitReady()
+ await.close('textDocument/semanticTokens/full')
+ await.setID('textDocument/semanticTokens/full')
local _ <close> = progress.create(lang.script.WINDOW_PROCESSING_SEMANTIC_FULL, 0.5)
local core = require 'core.semantic-tokens'
local uri = params.textDocument.uri
@@ -697,6 +699,8 @@ end)
proto.on('textDocument/semanticTokens/range', function (params)
workspace.awaitReady()
+ await.close('textDocument/semanticTokens/range')
+ await.setID('textDocument/semanticTokens/range')
local _ <close> = progress.create(lang.script.WINDOW_PROCESSING_SEMANTIC_RANGE, 0.5)
local core = require 'core.semantic-tokens'
local uri = params.textDocument.uri
@@ -722,6 +726,8 @@ proto.on('textDocument/foldingRange', function (params)
if not files.exists(uri) then
return nil
end
+ await.close('textDocument/foldingRange')
+ await.setID('textDocument/foldingRange')
local regions = core(uri)
if not regions then
return nil