diff options
Diffstat (limited to 'script-beta/core/completion.lua')
-rw-r--r-- | script-beta/core/completion.lua | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/script-beta/core/completion.lua b/script-beta/core/completion.lua index a19edb5e..b0f15f74 100644 --- a/script-beta/core/completion.lua +++ b/script-beta/core/completion.lua @@ -360,29 +360,15 @@ end]] end}, {'function', function (ast, text, start, results) if config.config.completion.keywordSnippet then - local spStart = skipSpace(text, start - 1) - local before = findWord(text, spStart) - if before == 'local' then - results[#results+1] = { - label = 'function ()', - kind = ckind.Snippet, - insertTextFormat = 2, - insertText = [[ -function ($1) - $0 -end]] - } - else - results[#results+1] = { - label = 'function ()', - kind = ckind.Snippet, - insertTextFormat = 2, - insertText = [[ + results[#results+1] = { + label = 'function ()', + kind = ckind.Snippet, + insertTextFormat = 2, + insertText = [[ function $1($2) $0 end]] - } - end + } end end}, {'goto'}, |