summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-04-26 10:41:03 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-04-26 10:41:03 +0800
commit881e16b99cc1dd35d0e50af4b14d43635d0a474d (patch)
treee830877b3c2420dd04ff8874319671747245e87f /script
parent02d43a59203e1d04aaaae3eacdaae5110da6b06d (diff)
downloadlua-language-server-881e16b99cc1dd35d0e50af4b14d43635d0a474d.zip
don't merge comments from `setlocal`
fix #2077
Diffstat (limited to 'script')
-rw-r--r--script/core/hover/init.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/core/hover/init.lua b/script/core/hover/init.lua
index fb5f7cd5..ed596b3d 100644
--- a/script/core/hover/init.lua
+++ b/script/core/hover/init.lua
@@ -86,7 +86,8 @@ local function getHover(source)
else
addHover(source, true, oop)
for _, def in ipairs(vm.getDefs(source)) do
- if def.type == 'global' then
+ if def.type == 'global'
+ or def.type == 'setlocal' then
goto CONTINUE
end
if guide.isOOP(def) then