diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-01-10 20:18:14 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-01-10 20:18:14 +0800 |
commit | 14760a600837ec760fd9874bcc1076db4cfeb7dc (patch) | |
tree | b67a5fbc215e289fd1207640ac23bff1855212dc /script/provider | |
parent | 08ebbadd2a0502d028f7f248724a04acdb6996c0 (diff) | |
download | lua-language-server-14760a600837ec760fd9874bcc1076db4cfeb7dc.zip |
don't compute full file for first range
Diffstat (limited to 'script/provider')
-rw-r--r-- | script/provider/provider.lua | 10 |
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 |