summaryrefslogtreecommitdiff
path: root/script/core/completion/completion.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-14 22:23:32 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-14 22:23:32 +0800
commit75509a89ecc69c683c015a97c9844746c81e6057 (patch)
tree9d2b0784a10fbda18784c3e939b6b65987569ff3 /script/core/completion/completion.lua
parent7df9f807faf27e3faea33842ed599963e00cdb0b (diff)
downloadlua-language-server-75509a89ecc69c683c015a97c9844746c81e6057.zip
cheanup
Diffstat (limited to 'script/core/completion/completion.lua')
-rw-r--r--script/core/completion/completion.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/script/core/completion/completion.lua b/script/core/completion/completion.lua
index 33d8fc16..428c8e96 100644
--- a/script/core/completion/completion.lua
+++ b/script/core/completion/completion.lua
@@ -1724,7 +1724,7 @@ local function tryluaDocByErr(state, position, err, docState, results)
local label = {}
local insertText = {}
for i, arg in ipairs(func.args) do
- if arg[1] and not arg.dummy then
+ if arg[1] and arg.type ~= 'self' then
label[#label+1] = arg[1]
if #label == 1 then
insertText[#insertText+1] = ('%s ${%d:any}'):format(arg[1], #label)
@@ -1788,7 +1788,7 @@ local function buildluaDocOfFunction(func)
end
for n, arg in ipairs(args) do
local funcArg = func.args[n]
- if funcArg[1] and not funcArg.dummy then
+ if funcArg[1] and funcArg.type ~= 'self' then
index = index + 1
buf[#buf+1] = ('---@param %s ${%d:%s}'):format(
funcArg[1],