From 7829753fb9951f2de05a3ebec0e94b3164eb6b46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 19 Aug 2021 20:45:51 +0800 Subject: improve completion --- script/provider/provider.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'script/provider/provider.lua') 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 _ = 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 _ = 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 -- cgit v1.2.3