diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-03-01 15:06:06 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-03-01 15:06:06 +0800 |
commit | 6a02e5c4b0c3bebf009fe4c455fe6b0f36cd7a52 (patch) | |
tree | ae067311c363568f7a4301a7d09d7659a51498e1 /script/provider | |
parent | 9898f87795b5c3cf096197c6f9c92e368addb2a3 (diff) | |
download | lua-language-server-6a02e5c4b0c3bebf009fe4c455fe6b0f36cd7a52.zip |
completion delays for 10 ms
Diffstat (limited to 'script/provider')
-rw-r--r-- | script/provider/provider.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua index 3fe7e691..9b43a4a2 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -429,8 +429,11 @@ proto.on('textDocument/prepareRename', function (params) placeholder = result.text, } end) - +require 'tracy'.enable() proto.on('textDocument/completion', function (params) + await.close('completion') + await.setID('completion') + await.sleep(0.01) workspace.awaitReady() local _ <close> = progress.create(lang.script.WINDOW_PROCESSING_COMPLETION, 0.5) --log.info(util.dump(params)) @@ -452,6 +455,8 @@ proto.on('textDocument/completion', function (params) if not result then return nil end + tracy.ZoneBeginN 'completion make' + local _ <close> = tracy.ZoneEnd local easy = false local items = {} for i, res in ipairs(result) do |