diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-01-27 20:09:57 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-01-27 20:09:57 +0800 |
commit | 9da178541151a664dd131164bb1c7c2393da3172 (patch) | |
tree | 4abbf35f9c0afdd278c8e2f14a822ec8721dc57a /script/provider/provider.lua | |
parent | 2d63a946faebbda3fc7f4a1e87d8e8453fc727eb (diff) | |
download | lua-language-server-9da178541151a664dd131164bb1c7c2393da3172.zip |
Organize the startup process
Diffstat (limited to 'script/provider/provider.lua')
-rw-r--r-- | script/provider/provider.lua | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua index e65fb440..3447c9cd 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -98,7 +98,7 @@ proto.on('initialize', function (params) end) proto.on('initialized', function (params) - local _ <close> = progress.create('正在初始化...', 1) + local _ <close> = progress.create('正在初始化...', 0.5) updateConfig() proto.awaitRequest('client/registerCapability', { registrations = { @@ -218,8 +218,8 @@ end) proto.on('textDocument/hover', function (params) await.close 'hover' await.setID 'hover' - local _ <close> = progress.create('正在处理悬浮提示...', 1) workspace.awaitReady() + local _ <close> = progress.create('正在处理悬浮提示...', 0.5) local core = require 'core.hover' local doc = params.textDocument local uri = doc.uri @@ -248,8 +248,8 @@ proto.on('textDocument/hover', function (params) end) proto.on('textDocument/definition', function (params) - local _ <close> = progress.create('正在处理转到定义...', 1) workspace.awaitReady() + local _ <close> = progress.create('正在处理转到定义...', 0.5) local core = require 'core.definition' local uri = params.textDocument.uri if not files.exists(uri) then @@ -277,8 +277,8 @@ proto.on('textDocument/definition', function (params) end) proto.on('textDocument/references', function (params) - local _ <close> = progress.create('正在处理转到引用...', 1) workspace.awaitReady() + local _ <close> = progress.create('正在处理转到引用...', 0.5) local core = require 'core.reference' local uri = params.textDocument.uri if not files.exists(uri) then @@ -321,8 +321,8 @@ proto.on('textDocument/documentHighlight', function (params) end) proto.on('textDocument/rename', function (params) - local _ <close> = progress.create('正在处理重命名...', 1) workspace.awaitReady() + local _ <close> = progress.create('正在处理重命名...', 0.5) local core = require 'core.rename' local uri = params.textDocument.uri if not files.exists(uri) then @@ -365,8 +365,8 @@ proto.on('textDocument/prepareRename', function (params) end) proto.on('textDocument/completion', function (params) - local _ <close> = progress.create('正在处理自动完成...', 1) workspace.awaitReady() + local _ <close> = progress.create('正在处理自动完成...', 0.5) --log.info(util.dump(params)) local core = require 'core.completion' --log.debug('textDocument/completion') @@ -490,8 +490,8 @@ proto.on('textDocument/signatureHelp', function (params) if not config.config.signatureHelp.enable then return nil end - local _ <close> = progress.create('正在处理参数提示...', 1) workspace.awaitReady() + local _ <close> = progress.create('正在处理参数提示...', 0.5) local uri = params.textDocument.uri if not files.exists(uri) then return nil @@ -531,8 +531,8 @@ proto.on('textDocument/signatureHelp', function (params) end) proto.on('textDocument/documentSymbol', function (params) - local _ <close> = progress.create('正在处理文件符号...', 1) local core = require 'core.document-symbol' + local _ <close> = progress.create('正在处理文件符号...', 0.5) local uri = params.textDocument.uri while not files.exists(uri) do await.sleep(0.1) @@ -616,8 +616,8 @@ proto.on('workspace/executeCommand', function (params) end) proto.on('workspace/symbol', function (params) - local _ <close> = progress.create('正在处理工作区符号...', 1) workspace.awaitReady() + local _ <close> = progress.create('正在处理工作区符号...', 0.5) local core = require 'core.workspace-symbol' await.close('workspace/symbol') @@ -649,8 +649,8 @@ end) proto.on('textDocument/semanticTokens/full', function (params) - local _ <close> = progress.create('正在处理全量语义着色...', 1) workspace.awaitReady() + local _ <close> = progress.create('正在处理全量语义着色...', 0.5) local core = require 'core.semantic-tokens' local uri = params.textDocument.uri log.debug('semanticTokens/full', uri) @@ -666,8 +666,8 @@ proto.on('textDocument/semanticTokens/full', function (params) end) proto.on('textDocument/semanticTokens/range', function (params) - local _ <close> = progress.create('正在处理差量语义着色...', 1) workspace.awaitReady() + local _ <close> = progress.create('正在处理差量语义着色...', 0.5) local core = require 'core.semantic-tokens' local uri = params.textDocument.uri log.debug('semanticTokens/range', uri) |