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 when cursor is in table doesn't give properties #685

Closed
JohnnyMorganz opened this issue Sep 28, 2022 · 2 comments · Fixed by #1155
Closed

Autocomplete when cursor is in table doesn't give properties #685

JohnnyMorganz opened this issue Sep 28, 2022 · 2 comments · Fixed by #1155
Labels
enhancement New feature or request

Comments

@JohnnyMorganz
Copy link
Contributor

Consider the following situation:

type Properties = {
    TextScaled: boolean,
    Text: string
}

local function create(props: Properties)
end

create({
    |
})

If autocompletion is triggered, it is treated as a general expression and properties are not included.

If autocompletion is triggered after typing starts, then it is correct

create({
    T|
})
@JohnnyMorganz JohnnyMorganz added the bug Something isn't working label Sep 28, 2022
@vegorov-rbx vegorov-rbx added enhancement New feature or request and removed bug Something isn't working labels Oct 5, 2022
@helgoboss
Copy link

Is there any chance this can be added? Auto-completion in table literals without prior typing is super helpful. This works in LuaLS, but I would prefer Luau types because in most other aspects the Luau type system seems to be way more elaborate.

@JohnnyMorganz Is this a missing feature in Luau or in Luau Language Server?

@JohnnyMorganz
Copy link
Contributor Author

Is this a missing feature in Luau or in Luau Language Server?

The former, we rely on Luau Analysis's autocomplete support directly in the language server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging a pull request may close this issue.

3 participants