summaryrefslogtreecommitdiff
path: root/script/provider/provider.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-02-21 21:02:32 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-02-21 21:02:32 +0800
commitea83d3d8cd59bd626801be9acc2af132f81f92cc (patch)
tree26fc1e97f00aba0280348935fcabe17e58f0904e /script/provider/provider.lua
parent63cc7ff9f8c87f05f2d7bd00c39ea2ff7777462a (diff)
downloadlua-language-server-ea83d3d8cd59bd626801be9acc2af132f81f92cc.zip
fix #958
Diffstat (limited to 'script/provider/provider.lua')
-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 f5bace80..5672c10c 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