LuaLS / LuaLS/lua-language-server
Wrong colorizing with generic pattern and long string annotations
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Lua
- Star
- 4.4k
- Fork
- 442
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Tái hiện các màu được báo cáo trong Visual Studio Code Lua extension bằng cách sử dụng các generic-pattern và long-string annotation snippets trong issue. Trước tiên, hãy lần theo hành vi tô màu annotation, sau đó xác minh rằng generic modifiers và long-string annotation modifiers nhận được các màu mong muốn mà không thay đổi cách tô màu các code-token thông thường.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- lua, vscode
- Lĩnh vực
- tooling
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100