summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-16 15:49:51 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-16 15:49:51 +0800
commit2dd1bdb05cb317613cd634208953d8450acf4d52 (patch)
tree5c3536b5fd338d83aff5d3920fc4e237b570bad1 /script
parent5f48be0b6f61a83dd898687db468a9011313e8de (diff)
downloadlua-language-server-2dd1bdb05cb317613cd634208953d8450acf4d52.zip
don't show `any` as field node
Diffstat (limited to 'script')
-rw-r--r--script/core/hover/name.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/core/hover/name.lua b/script/core/hover/name.lua
index f8473638..59e639d6 100644
--- a/script/core/hover/name.lua
+++ b/script/core/hover/name.lua
@@ -20,6 +20,9 @@ local function asField(source, oop)
local class
if source.node.type ~= 'getglobal' then
class = vm.getInfer(source.node):viewClass()
+ if class == 'any' then
+ class = nil
+ end
end
local node = class
or buildName(source.node, false)