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

Wrong colorizing with generic pattern and long string annotations #3032

Open
TIMONz1535 opened this issue Jan 6, 2025 · 0 comments
Open

Comments

@TIMONz1535
Copy link
Contributor

TIMONz1535 commented Jan 6, 2025

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

{54A2ED2A-62EC-44C1-A93B-D793EC085E01}

Reproduction steps

  1. Copy the code from 'Expected Behaviour'
  2. See the colorizing in the VS Code

Additional Notes

No response

Log File

No response

@TIMONz1535 TIMONz1535 changed the title Wrong colorizing with generic pattern and multiline annotations Wrong colorizing with generic pattern and long string annotations Jan 9, 2025
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

No branches or pull requests

1 participant