Skip to content

Add support for treesitter highlight groups #26

@netfri25

Description

@netfri25

Recently, treesitter changed the highlight groups from something like TSFunction into @function, so I tried customizing it using the vim.g.gruvbox_theme variable, but it throws an error saying that Theme @... does not exist.
I'm not sure if I did something wrong but I don't think it should give that error.

this is my current gruvbox-flat config file:

vim.g.gruvbox_flat_style = 'dark'
vim.g.gruvbox_terminal_colors = true
vim.g.gruvbox_italic_comments = true
vim.g.gruvbox_italic_keywords = false
vim.g.gruvbox_italic_functions = false
vim.g.gruvbox_italic_variables = false
vim.g.gruvbox_transparent = false
vim.g.gruvbox_hide_inactive_statusline = false
vim.g.gruvbox_sidebars = { 'NvimTree' }
vim.g.gruvbox_dark_sidebar = true
vim.g.gruvbox_dark_float = true
vim.g.gruvbox_colors = {}
vim.g.gruvbox_theme = {
   -- ['@parameter'] = { fg = 'fg' },
   ['@field'] = { fg = 'red' },
   -- ['@constructor'] = { fg = 'fg' },
   ['@function.builtin'] = { fg = 'cyan' },
   ['@constant.builtin'] = { fg = 'orange' },
   ['@function.macro'] = { fg = 'cyan' },
   ['@variable.builtin'] = { fg = 'red' },
   ['@label'] = { fg = 'red' },
   ['@operator'] = { fg = '#818387' },
   ['@namespace'] = { fg = 'yellow' },
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions