summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
authorBenjamin Valpey <36710691+bavalpey@users.noreply.github.com>2024-06-25 11:42:25 -0500
committerGitHub <noreply@github.com>2024-06-25 11:42:25 -0500
commit1f94d03093f0dec3eed058356857f5faa8e1e900 (patch)
treee9e09197af71af9b92793204af9651a043eda93c /script
parent2b37778416c1e858a6d2914eae234a24ce1b8fcb (diff)
parentffee37bfb5a2cc34ccd7eec8a819146b53ac4763 (diff)
downloadlua-language-server-1f94d03093f0dec3eed058356857f5faa8e1e900.zip
Merge branch 'master' into master
Diffstat (limited to 'script')
-rw-r--r--script/core/completion/postfix.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/script/core/completion/postfix.lua b/script/core/completion/postfix.lua
index 1331a0e4..b5f33315 100644
--- a/script/core/completion/postfix.lua
+++ b/script/core/completion/postfix.lua
@@ -220,6 +220,24 @@ register 'pairs' {
end
}
+register 'unpack' {
+ function (state, source, callback)
+ if source.type ~= 'getglobal'
+ and source.type ~= 'getfield'
+ and source.type ~= 'getmethod'
+ and source.type ~= 'getindex'
+ and source.type ~= 'getlocal'
+ and source.type ~= 'call'
+ and source.type ~= 'table' then
+ return
+ end
+ local subber = subString(state)
+ callback(string.format('unpack(%s)'
+ , subber(source.start + 1, source.finish)
+ ))
+ end
+}
+
register 'insert' {
function (state, source, callback)
if source.type ~= 'getglobal'