Open
Description
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?
Other
Expected Behaviour
Correct colorizing of generic pattern modifiers (optional, union, array) #3031
---@generic T
---@param a T[]?Comment
---@return T[]?
local function new(a) end
local obj = new({"Vehicle"})
---@generic T
---@param a T|integer? # the type
---@return T|integer?
local function new(a) end
local obj = new("Vehicle")
---@generic TC
---@param a `TC`[]?Comment
---@return TC[]?
local function new(a) end
local obj = new({"Vehicle"})
---@generic TC
---@param a `TC`|integer? # the type
---@return TC|integer?
local function new(a) end
local obj = new("Vehicle")
and long string annotations modifiers #3028
--[[@param a string[] ]]
local function new(a) end
--[===[@param a string[]]===]
local function new(a) end
Actual Behaviour
"string" color after code token
"comment" color of modifiers
Reproduction steps
- Copy the code from 'Expected Behaviour'
- See the colorizing in the VS Code
Additional Notes
No response
Log File
No response
Metadata
Metadata
Assignees
Labels
No labels