From 52b4840d92a5873b6781061022d6f27ce4e6fbb6 Mon Sep 17 00:00:00 2001 From: myuwi Date: Thu, 20 Oct 2022 19:58:03 +0300 Subject: [PATCH] fix: add support for @* treesitter highlight groups See: https://github.com/nvim-treesitter/nvim-treesitter/pull/3656 --- lua/rose-pine/theme.lua | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/lua/rose-pine/theme.lua b/lua/rose-pine/theme.lua index 3fcc54a..6d37af2 100644 --- a/lua/rose-pine/theme.lua +++ b/lua/rose-pine/theme.lua @@ -250,6 +250,40 @@ function M.get(config) TSVariable = { fg = p.text, style = styles.italic }, TSVariableBuiltin = { fg = p.love }, + -- Treesitter + ['@boolean'] = { link = 'Boolean' }, + ['@character'] = { link = 'Character' }, + ['@comment'] = { link = 'Comment' }, + ['@conditional'] = { link = 'Conditional' }, + ['@constant'] = { fg = p.foam }, + ['@constant.builtin'] = { fg = p.love }, + ['@constructor'] = { fg = p.foam }, + ['@field'] = { fg = p.foam }, + ['@function'] = { fg = p.rose }, + ['@function.builtin'] = { fg = p.love }, + ['@include'] = { fg = p.pine }, + ['@keyword'] = { fg = p.pine }, + ['@keyword.operator'] = { fg = p.subtle }, + ['@label'] = { fg = p.foam }, + ['@number'] = { link = 'Number' }, + ['@operator'] = { fg = p.subtle }, + ['@parameter'] = { fg = p.iris, style = styles.italic }, + ['@property'] = { fg = p.iris, style = styles.italic }, + ['@punctuation.bracket'] = { fg = groups.punctuation }, + ['@punctuation.delimiter'] = { fg = groups.punctuation }, + ['@punctuation.special'] = { fg = groups.punctuation }, + ['@string'] = { link = 'String' }, + ['@string.escape'] = { fg = p.pine }, + ['@string.special'] = { link = '@string' }, + ['@tag'] = { fg = p.foam }, + ['@tag.delimiter'] = { fg = p.subtle }, + ['@text'] = { fg = p.text }, + ['@text.title'] = { fg = groups.headings.h1, style = 'bold' }, + ['@text.uri'] = { fg = groups.link }, + ['@type'] = { link = 'Type' }, + ['@variable'] = { fg = p.text, style = styles.italic }, + ['@variable.builtin'] = { fg = p.love }, + -- vim.lsp.buf.document_highlight() LspReferenceText = { bg = p.highlight_med }, LspReferenceRead = { bg = p.highlight_med },