From 82c86091b4dd999761a0494408d30e39a51f49c2 Mon Sep 17 00:00:00 2001 From: Myuwi <42811084+myuwi@users.noreply.github.com> Date: Thu, 20 Oct 2022 23:15:40 +0300 Subject: [PATCH 1/5] fix: add support for `@*` treesitter highlight groups (#101) --- lua/rose-pine/theme.lua | 50 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/lua/rose-pine/theme.lua b/lua/rose-pine/theme.lua index 3fcc54a..a302196 100644 --- a/lua/rose-pine/theme.lua +++ b/lua/rose-pine/theme.lua @@ -250,6 +250,56 @@ function M.get(config) TSVariable = { fg = p.text, style = styles.italic }, TSVariableBuiltin = { fg = p.love }, + -- Treesitter + ['@annotation'] = { link = 'PreProc' }, + ['@attribute'] = { link = 'PreProc' }, + ['@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 }, + ['@namespace'] = { link = 'Include' }, + ['@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' }, + ['@symbol'] = { link = 'Identifier' }, + ['@tag'] = { fg = p.foam }, + ['@tag.attribute'] = { link = '@property' }, + ['@tag.delimiter'] = { fg = p.subtle }, + ['@text'] = { fg = p.text }, + ['@text.strong'] = { bold = true }, + ['@text.emphasis'] = { italic = true }, + ['@text.underline'] = { underline = true }, + ['@text.strike'] = { strikethrough = true }, + ['@text.math'] = { link = 'Special' }, + ['@text.environment'] = { link = 'Macro' }, + ['@text.environment.name'] = { link = 'Type' }, + ['@text.title'] = { fg = groups.headings.h1, style = 'bold' }, + ['@text.uri'] = { fg = groups.link }, + ['@text.note'] = { link = 'SpecialComment' }, + ['@text.warning'] = { link = 'Todo' }, + ['@text.danger'] = { link = 'WarningMsg' }, + ['@todo'] = { link = 'Todo' }, + ['@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 }, From 27a822e95b6581b706364e02fd8276d967438f82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Carre=C3=B1o?= <34664891+Pkcarreno@users.noreply.github.com> Date: Mon, 24 Oct 2022 13:26:41 -0400 Subject: [PATCH 2/5] fix: bufferline deprecated names (#102) --- lua/rose-pine/plugins/bufferline.lua | 238 ++++++++++++++------------- 1 file changed, 124 insertions(+), 114 deletions(-) diff --git a/lua/rose-pine/plugins/bufferline.lua b/lua/rose-pine/plugins/bufferline.lua index 118b871..db722cf 100644 --- a/lua/rose-pine/plugins/bufferline.lua +++ b/lua/rose-pine/plugins/bufferline.lua @@ -9,205 +9,215 @@ local p = require('rose-pine.palette') return { -- fill = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- background = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- tab = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- tab_selected = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- tab_close = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- close_button = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- close_button_visible = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- close_button_selected = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, buffer_visible = { - guifg = p.subtle, - guibg = p.base, + fg = p.subtle, + bg = p.base, }, buffer_selected = { - guifg = p.text, - guibg = p.surface, - gui = 'bold,italic', + fg = p.text, + bg = p.surface, + bold = true, + italic = true, }, -- diagnostic = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- diagnostic_visible = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- diagnostic_selected = { - -- guifg = '', - -- guibg = '', - -- gui = 'bold,italic', + -- fg = '', + -- bg = '', + -- bold = true, + -- italic = true, -- }, -- info = { - -- guifg = '', - -- guisp = '', - -- guibg = '', + -- fg = '', + -- sp = '', + -- bg = '', -- }, -- info_visible = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- info_selected = { - -- guifg = '', - -- guibg = '', - -- gui = 'bold,italic', - -- guisp = '', + -- fg = '', + -- bg = '', + -- bold = true, + -- italic = true, + -- sp = '', -- }, -- info_diagnostic = { - -- guifg = '', - -- guisp = '', - -- guibg = '', + -- fg = '', + -- sp = '', + -- bg = '', -- }, -- info_diagnostic_visible = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- info_diagnostic_selected = { - -- guifg = '', - -- guibg = '', - -- gui = 'bold,italic', - -- guisp = '', + -- fg = '', + -- bg = '', + -- bold = true, + -- italic = true, + -- sp = '', -- }, -- warning = { - -- guifg = '', - -- guisp = '', - -- guibg = '', + -- fg = '', + -- sp = '', + -- bg = '', -- }, -- warning_visible = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- warning_selected = { - -- guifg = '', - -- guibg = '', - -- gui = 'bold,italic', - -- guisp = '', + -- fg = '', + -- bg = '', + -- bold = true, + -- italic = true, + -- sp = '', -- }, -- warning_diagnostic = { - -- guifg = '', - -- guisp = '', - -- guibg = '', + -- fg = '', + -- sp = '', + -- bg = '', -- }, -- warning_diagnostic_visible = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- warning_diagnostic_selected = { - -- guifg = '', - -- guibg = '', - -- gui = 'bold,italic', - -- guisp = warning_diagnostic_fg, + -- fg = '', + -- bg = '', + -- bold = true, + -- italic = true, + -- sp = warning_diagnostic_fg, -- }, -- error = { - -- guifg = '', - -- guibg = '', - -- guisp = '', + -- fg = '', + -- bg = '', + -- sp = '', -- }, -- error_visible = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- error_selected = { - -- guifg = '', - -- guibg = '', - -- gui = 'bold,italic', - -- guisp = '', + -- fg = '', + -- bg = '', + -- bold = true, + -- italic = true, + -- sp = '', -- }, -- error_diagnostic = { - -- guifg = '', - -- guibg = '', - -- guisp = '', + -- fg = '', + -- bg = '', + -- sp = '', -- }, -- error_diagnostic_visible = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- error_diagnostic_selected = { - -- guifg = '', - -- guibg = '', - -- gui = 'bold,italic', - -- guisp = '', + -- fg = '', + -- bg = '', + -- bold = true, + -- italic = true, + -- sp = '', -- }, -- modified = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- modified_visible = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- modified_selected = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- duplicate_selected = { - -- guifg = '', - -- gui = 'italic', - -- guibg = '', + -- fg = '', + -- italic = true, + -- bg = '', -- }, -- duplicate_visible = { - -- guifg = '', - -- gui = 'italic', - -- guibg = '', + -- fg = '', + -- italic = true, + -- bg = '', -- }, -- duplicate = { - -- guifg = '', - -- gui = 'italic', - -- guibg = '', + -- fg = '', + -- italic = true, + -- bg = '', -- }, -- separator_selected = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- separator_visible = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- separator = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- indicator_selected = { - -- guifg = '', - -- guibg = '', + -- fg = '', + -- bg = '', -- }, -- pick_selected = { - -- guifg = '', - -- guibg = '', - -- gui = 'bold,italic', + -- fg = '', + -- bg = '', + -- italic = true, -- }, -- pick_visible = { - -- guifg = '', - -- guibg = '', - -- gui = 'bold,italic', + -- fg = '', + -- bg = '', + -- bold = true, + -- italic = true, -- }, -- pick = { - -- guifg = '', - -- guibg = '', - -- gui = 'bold,italic', + -- fg = '', + -- bg = '', + -- bold = true, + -- italic = true, -- }, } From 02fa3a0368ca452aa100f91addbb8f9c5bd6daba Mon Sep 17 00:00:00 2001 From: Slotos Date: Wed, 9 Nov 2022 03:39:38 +0200 Subject: [PATCH 3/5] Ease up diff backgrounds (#104) Lower the blend intensity to leave sufficient colour difference for the eye to catch on. --- lua/rose-pine/theme.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/rose-pine/theme.lua b/lua/rose-pine/theme.lua index a302196..c262f1a 100644 --- a/lua/rose-pine/theme.lua +++ b/lua/rose-pine/theme.lua @@ -29,10 +29,10 @@ function M.get(config) CursorLineNr = { fg = p.text }, DarkenedPanel = { bg = groups.panel }, DarkenedStatusline = { bg = groups.panel }, - DiffAdd = { bg = blend(groups.git_add, groups.background, 0.5) }, + DiffAdd = { bg = blend(groups.git_add, groups.background, 0.2) }, DiffChange = { bg = p.overlay }, - DiffDelete = { bg = blend(groups.git_delete, groups.background, 0.5) }, - DiffText = { bg = blend(groups.git_text, groups.background, 0.5) }, + DiffDelete = { bg = blend(groups.git_delete, groups.background, 0.2) }, + DiffText = { bg = blend(groups.git_text, groups.background, 0.2) }, diffAdded = { link = 'DiffAdd' }, diffChanged = { link = 'DiffChange' }, diffRemoved = { link = 'DiffDelete' }, From bfc2aa0006ad56f1a9792d6c52dc7f04fb4af94d Mon Sep 17 00:00:00 2001 From: Slotos Date: Wed, 9 Nov 2022 03:45:19 +0200 Subject: [PATCH 4/5] Ease up diff backgrounds (#104) Lower the blend intensity to leave sufficient colour difference for the eye to catch on. From 77b86d932746179a50246692612e889d1cdd72da Mon Sep 17 00:00:00 2001 From: numToStr <24727447+numToStr@users.noreply.github.com> Date: Sun, 20 Nov 2022 20:09:24 +0530 Subject: [PATCH 5/5] chore: rename colors/rose-pine.{vim => lua} (#105) --- colors/rose-pine.lua | 3 +++ colors/rose-pine.vim | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) create mode 100644 colors/rose-pine.lua delete mode 100644 colors/rose-pine.vim diff --git a/colors/rose-pine.lua b/colors/rose-pine.lua new file mode 100644 index 0000000..fd735a8 --- /dev/null +++ b/colors/rose-pine.lua @@ -0,0 +1,3 @@ +package.loaded['rose-pine.palette'] = nil + +require('rose-pine').colorscheme() diff --git a/colors/rose-pine.vim b/colors/rose-pine.vim deleted file mode 100644 index 0df6221..0000000 --- a/colors/rose-pine.vim +++ /dev/null @@ -1,3 +0,0 @@ -lua package.loaded['rose-pine.palette'] = nil - -lua require('rose-pine').colorscheme()