Skip to content

Conversation

@hahn-kev
Copy link
Contributor

@hahn-kev hahn-kev commented Aug 2, 2022

Example:

local function otherVal(test)
    return 1
end


local MyClass = {
    aFunction = function(self, param1)
        return 's'
    end,
    bfunction = otherVal,
}

local t = MyClass.<??>

if you do autocomplete at <??> you will normally get these results:

  • aFunction(self, param1) with a function icon
  • bfunction as just a simple field icon

this changes that so that bFunction shows up in autocomplete as a function too. In this case it would show up looking like this bFunction(test)

@sumneko
Copy link
Collaborator

sumneko commented Aug 2, 2022

Tests failed.

@hahn-kev
Copy link
Contributor Author

hahn-kev commented Aug 3, 2022

@sumneko fixed.

@sumneko sumneko merged commit e8f6fd3 into LuaLS:master Aug 3, 2022
@sumneko
Copy link
Collaborator

sumneko commented Aug 3, 2022

Thank you!

@hahn-kev hahn-kev deleted the function-field-show-params branch August 3, 2022 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants