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

Autocompletion not working in function for nested class #562

Closed
asleire opened this issue Jun 13, 2021 · 2 comments
Closed

Autocompletion not working in function for nested class #562

asleire opened this issue Jun 13, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@asleire
Copy link

asleire commented Jun 13, 2021

Hi, sorry if someone else opened an issue like this. I wasn't sure what to search for.

Describe the bug
Autocomplete doesn't show myField in the method Root.Class:Print()

To Reproduce

---@class Root
Root = {}

---@class Root.Class
---@field myField string
Root.Class = {
    myField = ""
}

function Root.Class:Print() 
    print(self.) -- Autocomplete after self. doesn't show "myField"
end

Expected behavior
Autocomplete should show myField when typing self. in the method Root.Class:Print()

Screenshots
Autocomplete currently looks like this:
image

Autocomplete should look like this:
image

@sumneko sumneko added the bug Something isn't working label Jun 15, 2021
@MikuAuahDark
Copy link

I think you should use @field instead of @param, according to https://emmylua.github.io/annotations/field.html

@asleire
Copy link
Author

asleire commented Jun 18, 2021

I think you should use @field instead of @param, according to https://emmylua.github.io/annotations/field.html

Oops. Thanks. I've corrected my code snippet, but not the images. The bug remains the same

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

3 participants