Skip to content

Italic font style for tables in Lua #3107

@Qwark-878

Description

@Qwark-878

Description:
Currently, there is no easy way to highlight tables (or specific types like tables) with a custom font style (e.g., italic) in Lua Language Server. This feature would be useful for better code readability, especially when working with complex data structures.

Steps to reproduce:
Define a table in Lua:
lua
Copy
local myTable = {}
Try to apply a custom font style (e.g., italic) to myTable using settings.json.
Expected behavior:
Ability to customize the font style for tables (or specific types) in Lua. For example:
json
Copy
{
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "meta.table.lua",
"settings": {
"fontStyle": "italic"
}
}
]
}
}
Actual behavior:
No built-in support for customizing font styles for tables.
Proposed solution:
Add support for customizing font styles for tables (or specific types) in Lua Language Server. This could be done through:
A new semantic token type for tables.
Enhanced TextMate grammar support for Lua.

VS Code
Ver: 1.98.0 (user setup)
Фиксация: 6609ac3d66f4eade5cf376d1cb76f13985724bcb
Data: 2025-03-04T21:06:18.612Z
Electron: 34.2.0
ElectronBuildId: 11044223
Chromium: 132.0.6834.196
Node.js: 20.18.2
V8: 13.2.152.36-electron.0
OS: Windows_NT x64 10.0.19045
LUA:
ID- sumneko.lua
Ver- 3.13.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions