textmate / lua.tmbundle

TextMate support for Lua
56 stars 27 forks source link

`local` categorization (highlighting) #11

Open alekseyt opened 5 years ago

alekseyt commented 5 years ago

I've being looking into syntax highlighting for Lua in vscode and noticed this oddity (Light+ theme):

image

Note that in first case local is highlighted purple, but in second case local is highlighted blue.

I think this happens because first time local is categorized as "keyword.control" ("keyword.control.lua" actually), but in second case (function regex) it is categorized as "storage.modifier" ("storage.modifier.local.lua"). This isn't visible when "storage.modifier" and "keyword.control" has the same color.

vscode's Lua file claims that it was imported from https://github.com/textmate/lua.tmbundle/blob/master/Syntaxes/Lua.plist

Is it a bug or expected behavior?

Sainan commented 1 year ago

The fix would be as easy as removing local from the keyword.control capture. Although if you're gonna open a PR, maybe do it against https://github.com/LuaLS/lua.tmbundle since that's at least maintained.