rktjmp / lush.nvim

Create Neovim themes with real-time feedback, export anywhere.
MIT License
1.4k stars 46 forks source link

How to specify treesitter highlight groups? #108

Closed antistic closed 1 year ago

antistic commented 1 year ago

:h treesitter-highlight-groups describes highlight groups such as @comment @comment.lua.

Lua doesn't allow symbols like @ and . in names, so you can't do:

local lush = require('lush')
return lush(function()
    return {
        @comment { },
        @comment.lua { },
    }
end)

For @comment the workaround is using the default link TSComment or Comment instead, but I can't work out if there's a similar workaround for language specific groups.

rktjmp commented 1 year ago

Dupe #107

rktjmp commented 1 year ago

See https://github.com/rktjmp/lush.nvim/issues/109 for fix.