diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-07-16 16:27:49 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-07-16 16:27:49 +0800 |
commit | 025c4c5fb2ced70e448716391be70fc47e82b1fb (patch) | |
tree | d5acdab607e63e80b9eb046d3b588168e187aa32 /script/core | |
parent | 05c0b9a8894bb1c24a24e2ed26e61a3b47d12d89 (diff) | |
download | lua-language-server-025c4c5fb2ced70e448716391be70fc47e82b1fb.zip |
completion: supports enums in `fun()`
Diffstat (limited to 'script/core')
-rw-r--r-- | script/core/completion.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/script/core/completion.lua b/script/core/completion.lua index f7f1e2c7..7e95d663 100644 --- a/script/core/completion.lua +++ b/script/core/completion.lua @@ -1327,6 +1327,12 @@ local function getCallEnumsAndFuncs(source, index) end end end + if source.type == 'doc.type.function' then + local arg = source.args[index] + if arg then + return pushCallEnumsAndFuncs(vm.getDefs(arg.extends)) + end + end end local function findCall(ast, text, offset) |