diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-15 03:23:39 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-15 03:23:39 +0800 |
commit | c45d862d3a3f0e0588a27b9e7cd8ba84afd454a8 (patch) | |
tree | 7ca0779c82a4fd32959add38b6f25adc755f654f /script | |
parent | 89631834c454f1b87e767af6a576180e2bb6e145 (diff) | |
download | lua-language-server-c45d862d3a3f0e0588a27b9e7cd8ba84afd454a8.zip |
fix semantic
Diffstat (limited to 'script')
-rw-r--r-- | script/core/semantic-tokens.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/script/core/semantic-tokens.lua b/script/core/semantic-tokens.lua index 5917a1a3..568bb222 100644 --- a/script/core/semantic-tokens.lua +++ b/script/core/semantic-tokens.lua @@ -165,7 +165,11 @@ local Care = util.switch() -- 5. Class declaration -- only search this local if loc.bindDocs then - for i, doc in ipairs(loc.bindDocs) do + for i = #loc.bindDocs, 1, -1 do + local doc = loc.bindDocs[i] + if doc.type == 'doc.type' then + break + end if doc.type == "doc.class" and doc.bindSources then for _, src in ipairs(doc.bindSources) do if src == loc then |