summaryrefslogtreecommitdiff
path: root/script/provider
diff options
context:
space:
mode:
authorCppCXY <812125110@qq.com>2022-02-22 14:10:21 +0800
committerCppCXY <812125110@qq.com>2022-02-22 14:10:21 +0800
commitc920f9630e5a1aa88c993ad22e786a2f9232b21e (patch)
treee59992179500dc3b0bb961b4033be350cd5420a5 /script/provider
parentaa13abab66752f42081f8d61d7fb415d03953364 (diff)
parentd57c21e585e7285583b7379e9e955da3b1345508 (diff)
downloadlua-language-server-c920f9630e5a1aa88c993ad22e786a2f9232b21e.zip
Merge branch 'master' of https://github.com/sumneko/lua-language-server
Diffstat (limited to 'script/provider')
-rw-r--r--script/provider/provider.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index f516e1af..3e8fec24 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -425,10 +425,11 @@ m.register 'textDocument/documentHighlight' {
capability = {
documentHighlightProvider = true,
},
- abortByFileUpdate = true,
+ ---@async
function (params)
local core = require 'core.highlight'
local uri = files.getRealUri(params.textDocument.uri)
+ workspace.awaitReady(uri)
if not files.exists(uri) then
return nil
end
@@ -927,11 +928,11 @@ m.register 'textDocument/foldingRange' {
capability = {
foldingRangeProvider = true,
},
- abortByFileUpdate = true,
---@async
function (params)
local core = require 'core.folding'
local uri = files.getRealUri(params.textDocument.uri)
+ workspace.awaitReady(uri)
if not files.exists(uri) then
return nil
end