summaryrefslogtreecommitdiff
path: root/script/vm/compiler.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-08-01 18:03:57 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-08-01 18:04:01 +0800
commit5fb08df5d27425ce1c0858d34c2ec62ddd567b38 (patch)
tree6e3cf72072a5cdb559e3655b25a17b1880bc644b /script/vm/compiler.lua
parent93dab3c51a0d5f006d152595b6baa8242cd8f5b2 (diff)
downloadlua-language-server-5fb08df5d27425ce1c0858d34c2ec62ddd567b38.zip
don't show constructor in hover
Diffstat (limited to 'script/vm/compiler.lua')
-rw-r--r--script/vm/compiler.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index cd114bd1..a6b95b7c 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -11,6 +11,7 @@ local vm = require 'vm.vm'
---@field _node vm.node
---@field cindex integer
---@field func parser.object
+---@field hideView boolean
-- 该函数有副作用,会给source绑定node!
---@param source parser.object
@@ -28,6 +29,12 @@ function vm.bindDocs(source)
end
if doc.type == 'doc.class' then
vm.setNode(source, vm.compileNode(doc))
+ for j = i + 1, #docs do
+ local overload = docs[j]
+ if overload.type == 'doc.overload' then
+ overload.overload.hideView = true
+ end
+ end
return true
end
if doc.type == 'doc.param' then