require'nvim-treesitter.configs'.setup { highlight = { enable = true, custom_captures = { -- Highlight the @foo.bar capture group with the "Identifier" highlight group. ['variable'] = 'Text', ['variable.builtin'] = 'Text', ['variable.declaration'] = 'Text', ['function.declaration'] = 'Text', ['object.identifier'] = 'ObjectHead', ['object.key'] = 'Key', ['object.colon'] = 'Delimiter', ['object.brace'] = 'ObjectBrace', ['array.bracket'] = 'Red_FG', ['boolean.false'] = 'Red_FG', ['keyword.secondary'] = 'KeywordSec', ['keyword.export'] = 'KeywordSec', ['exception.error'] = 'Red_FG', }, } }