diff options
author | Arcanox <arcanox@arcanox.me> | 2021-09-26 14:49:55 -0500 |
---|---|---|
committer | Arcanox <arcanox@arcanox.me> | 2021-09-26 14:49:55 -0500 |
commit | b8feb6626cd4caefba683eaf4f99ca0600aab950 (patch) | |
tree | bf3d985f6c9120a720efe2ce91e65e8bf15cef77 /script/provider/provider.lua | |
parent | eeecff910ad67b759c0c0f997e1827cb69b37d23 (diff) | |
download | lua-language-server-b8feb6626cd4caefba683eaf4f99ca0600aab950.zip |
Put back thing that I didn't mean to commit
Diffstat (limited to 'script/provider/provider.lua')
-rw-r--r-- | script/provider/provider.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua index 05202c01..7a5ce558 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -702,7 +702,15 @@ proto.on('textDocument/semanticTokens/range', function (params) workspace.awaitReady() local _ <close> = progress.create(lang.script.WINDOW_PROCESSING_SEMANTIC_RANGE, 0.5) local core = require 'core.semantic-tokens' - local start, finish = converter.unpackRange(uri, params.range) + local cache = files.getOpenedCache(uri) + local start, finish + if cache and not cache['firstSemantic'] then + cache['firstSemantic'] = true + start = 0 + finish = #files.getText(uri) + else + start, finish = converter.unpackRange(uri, params.range) + end local results = core(uri, start, finish) return { data = results |