summaryrefslogtreecommitdiff
path: root/script/vm
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-25 01:56:00 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-25 01:56:00 +0800
commitafc5f4e128f17b70dd6f661394da1acfd924be14 (patch)
tree2823ab03cce20bcf0ed4a9d1c1f583636cdf0313 /script/vm
parent125d943a7faec97b7169d0088a12ba6a44a14c16 (diff)
downloadlua-language-server-afc5f4e128f17b70dd6f661394da1acfd924be14.zip
add completion and semantic for `@cast`
Diffstat (limited to 'script/vm')
-rw-r--r--script/vm/def.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/script/vm/def.lua b/script/vm/def.lua
index b66e8fda..a0cb501e 100644
--- a/script/vm/def.lua
+++ b/script/vm/def.lua
@@ -79,6 +79,13 @@ simpleSwitch = util.switch()
pushResult(source.node)
end
end)
+ : case 'doc.cast.name'
+ : call(function (source, pushResult)
+ local loc = guide.getLocal(source, source[1], source.start)
+ if loc then
+ pushResult(loc)
+ end
+ end)
local searchFieldSwitch = util.switch()
: case 'table'