Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autocomplete default type definition on function code works intermittently #1403

Closed
muppet9010 opened this issue Jul 28, 2022 Discussed in #1400 · 0 comments
Closed

Autocomplete default type definition on function code works intermittently #1403

muppet9010 opened this issue Jul 28, 2022 Discussed in #1400 · 0 comments
Labels
bug Something isn't working

Comments

@muppet9010
Copy link

Discussed in #1400

In some cases when I had a function defined and on the preceding line I did --- it would auto suggest the params and returns and I could have it add the whole block including an empty comment.
image

In other cases it only auto suggests when I do the more complete text of "---@" and I only get the choice to select one tag type (params or return as relevant in this case).
image

It only appears the full function default type definition auto complete happens when the function declaration starts as [local] function, so the below does offer auto populate on "---" being added on the preceding line.

local function testFunc1(text)
    return text or "test"
end

The examples it doesn't work on that I have found are:

local testFunc2 = function(text)
    return text or "test"
end

and

local obj = {}

obj.testFunc3 = function(text)
    return text or "test"
end
@sumneko sumneko added the bug Something isn't working label Jul 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants