We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Visual Studio Code Extension (sumneko.lua)
Windows
Annotations
This type alias should parse as { [1]: string } | number.
{ [1]: string } | number
---@alias Some ---| { [1]: string } ---| number local x ---@type Some print(x)
The type alias can't be parsed and is left as a free Some type.
Some
x
Following the LSP's expected X hovers, it completes itself to an alias like { [1|number]: "type name" }.
expected X
{ [1|number]: "type name" }
---@alias Some ---| { [1]: string } ---| number]: "type name" } local x ---@type Some print(x)
It looks like everything after { [1 is ignored and the rest of the line is treated as a comment.
{ [1
This can be circumvented by putting all the types on one line.
---@alias Some { [1]: string } | number
lua-language-server.log
The text was updated successfully, but these errors were encountered:
76c7098
No branches or pull requests
How are you using the lua-language-server?
Visual Studio Code Extension (sumneko.lua)
Which OS are you using?
Windows
What is the issue affecting?
Annotations
Expected Behaviour
This type alias should parse as
{ [1]: string } | number
.Actual Behaviour
The type alias can't be parsed and is left as a free
Some
type.Reproduction steps
Some
can't be parsed and is left as a free type, shown whenx
is hovered overAdditional Notes
Following the LSP's
expected X
hovers, it completes itself to an alias like{ [1|number]: "type name" }
.It looks like everything after
{ [1
is ignored and the rest of the line is treated as a comment.This can be circumvented by putting all the types on one line.
---@alias Some { [1]: string } | number
Log File
lua-language-server.log
The text was updated successfully, but these errors were encountered: