summaryrefslogtreecommitdiff
path: root/script/provider
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-01-10 20:18:14 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-01-10 20:18:14 +0800
commit14760a600837ec760fd9874bcc1076db4cfeb7dc (patch)
treeb67a5fbc215e289fd1207640ac23bff1855212dc /script/provider
parent08ebbadd2a0502d028f7f248724a04acdb6996c0 (diff)
downloadlua-language-server-14760a600837ec760fd9874bcc1076db4cfeb7dc.zip
don't compute full file for first range
Diffstat (limited to 'script/provider')
-rw-r--r--script/provider/provider.lua10
1 files changed, 1 insertions, 9 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index f351b793..5401ff47 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -831,15 +831,7 @@ m.register 'textDocument/semanticTokens/range' {
workspace.awaitReady(uri)
local _ <close> = progress.create(workspace.getScope(uri), lang.script.WINDOW_PROCESSING_SEMANTIC_RANGE, 0.5)
local core = require 'core.semantic-tokens'
- local cache = files.getOpenedCache(uri)
- local start, finish
- if cache and not cache['firstSemantic'] then
- cache['firstSemantic'] = true
- start = 0
- finish = math.huge
- else
- start, finish = converter.unpackRange(uri, params.range)
- end
+ local start, finish = converter.unpackRange(uri, params.range)
local results = core(uri, start, finish)
return {
data = results