Skip to content

Commit ea83d3d

Browse files
committed
fix #958
1 parent 63cc7ff commit ea83d3d

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

changelog.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# changelog
22

3+
## 2.6.6
4+
* `FIX` [#958](https://github.com./sumneko/lua-language-server/issues/958)
5+
36
## 2.6.5
47
`2022-2-17`
58
* `FIX` telemetry is not disabled by default (since 2.6.0)

script/provider/provider.lua

+3-2
Original file line numberDiff line numberDiff line change
@@ -425,10 +425,11 @@ m.register 'textDocument/documentHighlight' {
425425
capability = {
426426
documentHighlightProvider = true,
427427
},
428-
abortByFileUpdate = true,
428+
---@async
429429
function (params)
430430
local core = require 'core.highlight'
431431
local uri = files.getRealUri(params.textDocument.uri)
432+
workspace.awaitReady(uri)
432433
if not files.exists(uri) then
433434
return nil
434435
end
@@ -927,11 +928,11 @@ m.register 'textDocument/foldingRange' {
927928
capability = {
928929
foldingRangeProvider = true,
929930
},
930-
abortByFileUpdate = true,
931931
---@async
932932
function (params)
933933
local core = require 'core.folding'
934934
local uri = files.getRealUri(params.textDocument.uri)
935+
workspace.awaitReady(uri)
935936
if not files.exists(uri) then
936937
return nil
937938
end

0 commit comments

Comments
 (0)