Skip to content

Commit 14760a6

Browse files
committed
don't compute full file for first range
1 parent 08ebbad commit 14760a6

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

script/provider/provider.lua

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -831,15 +831,7 @@ m.register 'textDocument/semanticTokens/range' {
831831
workspace.awaitReady(uri)
832832
local _ <close> = progress.create(workspace.getScope(uri), lang.script.WINDOW_PROCESSING_SEMANTIC_RANGE, 0.5)
833833
local core = require 'core.semantic-tokens'
834-
local cache = files.getOpenedCache(uri)
835-
local start, finish
836-
if cache and not cache['firstSemantic'] then
837-
cache['firstSemantic'] = true
838-
start = 0
839-
finish = math.huge
840-
else
841-
start, finish = converter.unpackRange(uri, params.range)
842-
end
834+
local start, finish = converter.unpackRange(uri, params.range)
843835
local results = core(uri, start, finish)
844836
return {
845837
data = results

0 commit comments

Comments
 (0)