diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-09-27 15:45:21 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-09-27 15:45:21 +0800 |
commit | 8dda772869b35778be3178c7e12d3a268e8d08af (patch) | |
tree | f40cbdd4aab0c8d21dc88441bab6589fd74e6c0e | |
parent | bddbb7095d2d4977dcf3259489a188eba9e2d321 (diff) | |
download | lua-language-server-8dda772869b35778be3178c7e12d3a268e8d08af.zip |
no need to check for duplicate requests
-rw-r--r-- | script/provider/provider.lua | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua index ff9296d6..668e4eb2 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -168,9 +168,6 @@ end) proto.on('textDocument/hover', function (params) local doc = params.textDocument local uri = doc.uri - await.close 'hover' - await.setID 'hover' - await.setID('update:' .. uri) if not workspace.isReady() then local count, max = workspace.getLoadProcess() return { @@ -359,9 +356,6 @@ end) proto.on('textDocument/completion', function (params) local uri = params.textDocument.uri - await.close 'completion' - await.setID 'completion' - await.setID('update:' .. uri) if not workspace.isReady() then local count, max = workspace.getLoadProcess() return { @@ -479,9 +473,6 @@ proto.on('completionItem/resolve', function (item) end local id = item.data.id local uri = item.data.uri - await.close 'completion.resolve' - await.setID 'completion.resolve' - await.setID('update:' .. uri) --await.setPriority(1000) local resolved = core.resolve(id) if not resolved then @@ -519,9 +510,6 @@ proto.on('textDocument/signatureHelp', function (params) if not files.exists(uri) then return nil end - await.close('signatureHelp') - await.setID('signatureHelp') - await.setID('update:' .. uri) local pos = converter.unpackPosition(uri, params.position) local core = require 'core.signature' local results = core(uri, pos) @@ -651,10 +639,6 @@ proto.on('workspace/symbol', function (params) local _ <close> = progress.create(lang.script.WINDOW_PROCESSING_WS_SYMBOL, 0.5) local core = require 'core.workspace-symbol' - await.close('workspace/symbol') - await.setID('workspace/symbol') - await.setID('files.version') - local symbols = core(params.query) if not symbols or #symbols == 0 then return nil @@ -682,8 +666,6 @@ end) proto.on('textDocument/semanticTokens/full', function (params) local uri = params.textDocument.uri - await.close('textDocument/semanticTokens/full') - await.setID('textDocument/semanticTokens/full') workspace.awaitReady() local _ <close> = progress.create(lang.script.WINDOW_PROCESSING_SEMANTIC_FULL, 0.5) local core = require 'core.semantic-tokens' @@ -699,8 +681,6 @@ end) proto.on('textDocument/semanticTokens/range', function (params) local uri = params.textDocument.uri - await.close('textDocument/semanticTokens/range') - await.setID('textDocument/semanticTokens/range') workspace.awaitReady() local _ <close> = progress.create(lang.script.WINDOW_PROCESSING_SEMANTIC_RANGE, 0.5) local core = require 'core.semantic-tokens' @@ -725,9 +705,6 @@ proto.on('textDocument/foldingRange', function (params) if not files.exists(uri) then return nil end - await.close('textDocument/foldingRange') - await.setID('textDocument/foldingRange') - await.setID('update:' .. uri) local regions = core(uri) if not regions then return nil @@ -830,13 +807,9 @@ end) -- Hint do local function updateHint(uri) - local awaitID = 'hint:' .. uri - await.close(awaitID) if not config.get 'Lua.hint.enable' then return end - await.setID(awaitID) - await.setID('update:' .. uri) workspace.awaitReady() local visibles = files.getVisibles(uri) if not visibles then |