Skip to content

Conversation

hahn-kev
Copy link
Contributor

@hahn-kev hahn-kev commented Jun 27, 2022

Add support for auto complete in cases where using an array. A simple example is like these, more in unit tests

---@alias Option "AAA" | "BBB" | "CCC"

---@type Option[]
local l = {"<??>"}

---@class OptionObj
---@field a boolean
---@field b boolean

---@type OptionObj[]
local l = { {<??>} }

these 2 examples will autocomplete with either the expected enum for the first case, or the expected object fields in the second.

Also, I might have screwed up the merge for sub modules, but I think I did it right?

@sumneko
Copy link
Collaborator

sumneko commented Jun 27, 2022

Thanks for your work!
But please rebase your branch to avoid pushing changes of submodules.

@hahn-kev hahn-kev force-pushed the array-contents-support branch from eb0e2e4 to d0c242b Compare June 27, 2022 07:15
@hahn-kev
Copy link
Contributor Author

@sumneko submodules fixed.

@sumneko sumneko merged commit 4774c8c into LuaLS:master Jun 27, 2022
@sumneko
Copy link
Collaborator

sumneko commented Jun 27, 2022

Thank you!

@hahn-kev hahn-kev deleted the array-contents-support branch June 27, 2022 16:58
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