From 64c5952bc734802f7507beb18e853798c08341f0 Mon Sep 17 00:00:00 2001 From: Brian Di Palma <1597820+briandipalma@users.noreply.github.com> Date: Mon, 14 Feb 2022 13:36:36 +0000 Subject: [PATCH 001/184] Update readme.md (#68) --- readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readme.md b/readme.md index 0e6f85d..7e72926 100644 --- a/readme.md +++ b/readme.md @@ -84,6 +84,8 @@ local colors = require("galaxyline.themes.colors")["rose-pine"] > Options should be set **before** colorscheme +Variant now respects `vim.o.background`, using dawn when light (`vim.cmd("set background=light")`) and dark_variant when dark + ```lua require('rose-pine').setup({ ---@usage 'main'|'moon' From 7c398c943c0621e2456b484ff19a8a98f6be6ff5 Mon Sep 17 00:00:00 2001 From: not Date: Mon, 14 Feb 2022 09:43:34 -0600 Subject: [PATCH 002/184] Update readme.md --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 7e72926..7b374bb 100644 --- a/readme.md +++ b/readme.md @@ -32,7 +32,7 @@ use({ - [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) - [barbar.nvim](https://github.com/romgrk/barbar.nvim) - [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) -- [mode.nvim](https://github.com/mvllow/modes.nvim) +- [modes.nvim](https://github.com/mvllow/modes.nvim) - [nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua) - [which-key.nvim](https://github.com/folke/which-key.nvim) - [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) From 64986b857df14c75d31f62b91c57554a4e8bf797 Mon Sep 17 00:00:00 2001 From: mvllow Date: Mon, 14 Feb 2022 15:20:28 -0600 Subject: [PATCH 003/184] fix user options not being applied closes #69 --- lua/rose-pine/init.lua | 7 ++++--- lua/rose-pine/palette.lua | 5 +++-- lua/rose-pine/theme.lua | 16 ++++++++-------- 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/lua/rose-pine/init.lua b/lua/rose-pine/init.lua index 4e10311..3aee931 100644 --- a/lua/rose-pine/init.lua +++ b/lua/rose-pine/init.lua @@ -167,13 +167,14 @@ function M.colorscheme() ---@param color string local function get_palette_color(color) + color = color:lower() local p = require('rose-pine.palette') - if color and not color:find('#') then - return p[color:lower()] + if color and not color:find('#') and color ~= 'none' then + return p[color] end - return color:lower() + return color end ---@param group string diff --git a/lua/rose-pine/palette.lua b/lua/rose-pine/palette.lua index ccb8b1c..03981f4 100644 --- a/lua/rose-pine/palette.lua +++ b/lua/rose-pine/palette.lua @@ -16,6 +16,7 @@ local variants = { highlight_med = '#403d52', highlight_high = '#524f67', opacity = 0.1, + none = 'NONE', }, moon = { base = '#232136', @@ -34,6 +35,7 @@ local variants = { highlight_med = '#44415a', highlight_high = '#56526e', opacity = 0.1, + none = 'NONE', }, dawn = { base = '#faf4ed', @@ -52,6 +54,7 @@ local variants = { highlight_med = '#dfdad9', highlight_high = '#cecacd', opacity = 0.05, + none = 'NONE', }, } @@ -63,6 +66,4 @@ else palette = variants[(vim.g.rose_pine_variant == 'moon' and 'moon') or 'main'] end -vim.tbl_deep_extend('force', palette, { none = 'NONE' }) - return palette diff --git a/lua/rose-pine/theme.lua b/lua/rose-pine/theme.lua index 35b256a..d34c95b 100644 --- a/lua/rose-pine/theme.lua +++ b/lua/rose-pine/theme.lua @@ -8,12 +8,12 @@ function M.get(config) local theme = {} local groups = config.groups or {} local styles = { - italic = (config.disable_italics and 'NONE') or 'italic', - vert_split = (config.bold_vert_split and p.surface) or p.none, + italic = (config.disable_italics and p.none) or 'italic', + vert_split = (config.bold_vert_split and groups.border) or p.none, background = (config.disable_background and p.none) or p.base, float_background = (config.disable_float_background and p.none) or p.surface, - nc_background = (config.dim_nc_background and p.surface) or p.base, } + styles.nc_background = (config.dim_nc_background and p.surface) or styles.background theme = { ColorColumn = { bg = p.highlight_high }, @@ -65,15 +65,15 @@ function M.get(config) SpellLocal = { sp = p.subtle, style = 'undercurl' }, SpellRare = { sp = p.subtle, style = 'undercurl' }, SignColumn = { fg = p.text, bg = styles.background }, - StatusLine = { fg = p.subtle, bg = p.surface }, - StatusLineNC = { fg = p.muted, bg = p.base }, + StatusLine = { fg = p.subtle, bg = styles.float_background }, + StatusLineNC = { fg = p.muted, bg = styles.background }, StatusLineTerm = { link = 'StatusLine' }, StatusLineTermNC = { link = 'StatusLineNC' }, - TabLine = { fg = p.subtle, bg = p.surface }, - TabLineFill = { bg = p.surface }, + TabLine = { fg = p.subtle, bg = styles.float_background }, + TabLineFill = { bg = styles.float_background }, TabLineSel = { fg = p.text, bg = p.overlay }, Title = { fg = p.text }, - VertSplit = { fg = p.overlay, bg = styles.vert_split }, + VertSplit = { fg = groups.border, bg = styles.vert_split }, Visual = { bg = p.highlight_med }, -- VisualNOS = {}, WarningMsg = { fg = p.gold }, From f3c534e4be0c8ce3515942df693a5d4aeb3c2bdf Mon Sep 17 00:00:00 2001 From: mvllow Date: Tue, 15 Feb 2022 22:37:52 -0600 Subject: [PATCH 004/184] update punctuation colour --- lua/rose-pine/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/rose-pine/init.lua b/lua/rose-pine/init.lua index 3aee931..634254a 100644 --- a/lua/rose-pine/init.lua +++ b/lua/rose-pine/init.lua @@ -104,7 +104,7 @@ local config = { border = 'highlight_med', comment = 'muted', link = 'iris', - punctuation = 'subtle', + punctuation = 'muted', error = 'love', hint = 'iris', From 3fb07a770fc240fa929f87206cffed64fdb3ffdc Mon Sep 17 00:00:00 2001 From: mvllow Date: Fri, 18 Feb 2022 11:13:00 -0600 Subject: [PATCH 005/184] fix named blend styles ref #70 --- lua/rose-pine/init.lua | 32 +++----------------------------- lua/rose-pine/util.lua | 42 ++++++++++++++++++++++++++++++++++++------ 2 files changed, 39 insertions(+), 35 deletions(-) diff --git a/lua/rose-pine/init.lua b/lua/rose-pine/init.lua index 634254a..af5bae4 100644 --- a/lua/rose-pine/init.lua +++ b/lua/rose-pine/init.lua @@ -1,3 +1,5 @@ +local util = require('rose-pine.util') + local M = {} local show_init_messages = true @@ -165,37 +167,9 @@ function M.colorscheme() show_init_messages = false end - ---@param color string - local function get_palette_color(color) - color = color:lower() - local p = require('rose-pine.palette') - - if color and not color:find('#') and color ~= 'none' then - return p[color] - end - - return color - end - - ---@param group string - ---@param color table - local function highlight(group, color) - local style = color.style and 'gui=' .. color.style or 'gui=NONE' - local fg = color.fg and 'guifg=' .. get_palette_color(color.fg) or 'guifg=NONE' - local bg = color.bg and 'guibg=' .. get_palette_color(color.bg) or 'guibg=NONE' - local sp = color.sp and 'guisp=' .. get_palette_color(color.sp) or '' - - local hl = 'highlight ' .. group .. ' ' .. style .. ' ' .. fg .. ' ' .. bg .. ' ' .. sp - - vim.cmd(hl) - if color.link then - vim.cmd('highlight! link ' .. group .. ' ' .. color.link) - end - end - local theme = require('rose-pine.theme').get(config) for group, color in pairs(theme) do - highlight(group, color) + util.highlight(group, color) end require('rose-pine.galaxyline.theme') diff --git a/lua/rose-pine/util.lua b/lua/rose-pine/util.lua index 67b5e08..113d673 100644 --- a/lua/rose-pine/util.lua +++ b/lua/rose-pine/util.lua @@ -1,25 +1,39 @@ local util = {} -local function get_byte(value, offset) +local function byte(value, offset) return bit.band(bit.rshift(value, offset), 0xFF) end -local function get_color(color) +local function rgb(color) color = vim.api.nvim_get_color_by_name(color) if color == -1 then color = vim.opt.background:get() == 'dark' and 000 or 255255255 end - return { get_byte(color, 16), get_byte(color, 8), get_byte(color, 0) } + return { byte(color, 16), byte(color, 8), byte(color, 0) } +end + +local function parse_color(color) + if color == nil then + return print('invalid color') + end + + color = color:lower() + + if not color:find('#') and color ~= 'none' then + color = require('rose-pine.palette')[color] or vim.api.nvim_get_color_by_name(color) + end + + return color end ---@param fg string foreground color ---@param bg string background color ---@param alpha number number between 0 (background) and 1 (foreground) -function util.blend(fg, bg, alpha) - bg = get_color(bg) - fg = get_color(fg) +util.blend = function(fg, bg, alpha) + fg = rgb(parse_color(fg)) + bg = rgb(parse_color(bg)) local function blend_channel(i) local ret = (alpha * fg[i] + ((1 - alpha) * bg[i])) @@ -29,4 +43,20 @@ function util.blend(fg, bg, alpha) return string.format('#%02X%02X%02X', blend_channel(1), blend_channel(2), blend_channel(3)) end +---@param group string +---@param color table +util.highlight = function(group, color) + local style = color.style and 'gui=' .. color.style or 'gui=NONE' + local fg = color.fg and 'guifg=' .. parse_color(color.fg) or 'guifg=NONE' + local bg = color.bg and 'guibg=' .. parse_color(color.bg) or 'guibg=NONE' + local sp = color.sp and 'guisp=' .. parse_color(color.sp) or '' + + vim.cmd(string.format('highlight %s %s %s %s %s', group, style, fg, bg, sp)) + + if color.link then + vim.cmd(string.format('highlight! link %s %s', group, color.link)) + -- vim.cmd('highlight! link ' .. group .. ' ' .. color.link) + end +end + return util From 2dea84a91f6ee4d9212002ab296a137cc2d87581 Mon Sep 17 00:00:00 2001 From: Will Leinweber Date: Wed, 9 Mar 2022 19:21:17 -0800 Subject: [PATCH 006/184] fix: Re-add nvim-notify highlights (#72) (#72) --- lua/rose-pine/theme.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lua/rose-pine/theme.lua b/lua/rose-pine/theme.lua index d34c95b..33df757 100644 --- a/lua/rose-pine/theme.lua +++ b/lua/rose-pine/theme.lua @@ -402,6 +402,23 @@ function M.get(config) TelescopeSelection = { fg = p.text, bg = p.overlay }, TelescopeSelectionCaret = { fg = p.rose, bg = p.overlay }, TelescopeTitle = { fg = p.subtle }, + + -- rcarriga/nvim-notify + NotifyINFOBorder = { fg = p.foam }, + NotifyINFOTitle = { link = 'NotifyINFOBorder' }, + NotifyINFOIcon = { link = 'NotifyINFOBorder' }, + NotifyWARNBorder = { fg = p.gold }, + NotifyWARNTitle = { link = 'NotifyWARNBorder' }, + NotifyWARNIcon = { link = 'NotifyWARNBorder' }, + NotifyDEBUGBorder = { fg = p.muted }, + NotifyDEBUGTitle = { link = 'NotifyDEBUGBorder' }, + NotifyDEBUGIcon = { link = 'NotifyDEBUGBorder' }, + NotifyTRACEBorder = { fg = p.iris }, + NotifyTRACETitle = { link = 'NotifyTRACEBorder' }, + NotifyTRACEIcon = { link = 'NotifyTRACEBorder' }, + NotifyERRORBorder = { fg = p.love }, + NotifyERRORTitle = { link = 'NotifyERRORBorder' }, + NotifyERRORIcon = { link = 'NotifyERRORBorder' }, } vim.g.terminal_color_0 = p.overlay -- black From 1346db5bde790358c49d85a3ecd65a6bbf58312a Mon Sep 17 00:00:00 2001 From: mvllow Date: Thu, 17 Mar 2022 13:41:33 -0400 Subject: [PATCH 007/184] add `groups.background` and `groups.panel` closes #73 --- lua/rose-pine/init.lua | 2 ++ lua/rose-pine/theme.lua | 34 +++++++++++++++++----------------- 2 files changed, 19 insertions(+), 17 deletions(-) diff --git a/lua/rose-pine/init.lua b/lua/rose-pine/init.lua index af5bae4..364952c 100644 --- a/lua/rose-pine/init.lua +++ b/lua/rose-pine/init.lua @@ -103,6 +103,8 @@ local config = { disable_italics = false, groups = { + background = 'base', + panel = 'surface', border = 'highlight_med', comment = 'muted', link = 'iris', diff --git a/lua/rose-pine/theme.lua b/lua/rose-pine/theme.lua index 33df757..d0da065 100644 --- a/lua/rose-pine/theme.lua +++ b/lua/rose-pine/theme.lua @@ -10,10 +10,10 @@ function M.get(config) local styles = { italic = (config.disable_italics and p.none) or 'italic', vert_split = (config.bold_vert_split and groups.border) or p.none, - background = (config.disable_background and p.none) or p.base, - float_background = (config.disable_float_background and p.none) or p.surface, + background = (config.disable_background and p.none) or groups.background, + float_background = (config.disable_float_background and p.none) or groups.panel, } - styles.nc_background = (config.dim_nc_background and p.surface) or styles.background + styles.nc_background = (config.dim_nc_background and groups.panel) or styles.background theme = { ColorColumn = { bg = p.highlight_high }, @@ -23,12 +23,12 @@ function M.get(config) -- CursorIM = {}, CursorLine = { bg = p.highlight_low }, CursorLineNr = { fg = p.text }, - DarkenedPanel = { bg = p.surface }, - DarkenedStatusline = { bg = p.surface }, - DiffAdd = { bg = blend(groups.git_add, p.base, 0.5) }, + DarkenedPanel = { bg = groups.panel }, + DarkenedStatusline = { bg = groups.panel }, + DiffAdd = { bg = blend(groups.git_add, groups.background, 0.5) }, DiffChange = { bg = p.overlay }, - DiffDelete = { bg = blend(groups.git_delete, p.base, 0.5) }, - DiffText = { bg = blend(groups.git_text, p.base, 0.5) }, + DiffDelete = { bg = blend(groups.git_delete, groups.background, 0.5) }, + DiffText = { bg = blend(groups.git_text, groups.background, 0.5) }, diffAdded = { link = 'DiffAdd' }, diffChanged = { link = 'DiffChange' }, diffRemoved = { link = 'DiffDelete' }, @@ -37,7 +37,7 @@ function M.get(config) ErrorMsg = { fg = p.love, style = 'bold' }, FloatBorder = { fg = groups.border }, FoldColumn = { fg = p.muted }, - Folded = { fg = p.text, bg = p.surface }, + Folded = { fg = p.text, bg = groups.panel }, IncSearch = { fg = p.base, bg = p.rose }, LineNr = { fg = p.muted }, MatchParen = { fg = p.text, bg = p.highlight_med }, @@ -175,10 +175,10 @@ function M.get(config) DiagnosticSignHint = { fg = groups.hint }, DiagnosticSignInfo = { fg = groups.info }, DiagnosticSignWarn = { fg = groups.warn }, - DiagnosticStatusLineError = { fg = groups.error, bg = p.surface }, - DiagnosticStatusLineHint = { fg = groups.hint, bg = p.surface }, - DiagnosticStatusLineInfo = { fg = groups.info, bg = p.surface }, - DiagnosticStatusLineWarn = { fg = groups.warn, bg = p.surface }, + DiagnosticStatusLineError = { fg = groups.error, bg = groups.panel }, + DiagnosticStatusLineHint = { fg = groups.hint, bg = groups.panel }, + DiagnosticStatusLineInfo = { fg = groups.info, bg = groups.panel }, + DiagnosticStatusLineWarn = { fg = groups.warn, bg = groups.panel }, DiagnosticUnderlineError = { sp = groups.error, style = 'undercurl' }, DiagnosticUnderlineHint = { sp = groups.hint, style = 'undercurl' }, DiagnosticUnderlineInfo = { sp = groups.info, style = 'undercurl' }, @@ -251,7 +251,7 @@ function M.get(config) BufferInactiveMod = { fg = p.foam }, BufferInactiveSign = { fg = p.muted }, BufferInactiveTarget = { fg = p.gold }, - BufferTabpageFill = { fg = p.base, bg = p.base }, + BufferTabpageFill = { fg = groups.background, bg = groups.background }, BufferVisible = { fg = p.subtle }, BufferVisibleIndex = { fg = p.subtle }, BufferVisibleMod = { fg = p.foam }, @@ -295,14 +295,14 @@ function M.get(config) NvimTreeOpenedFolderName = { fg = p.foam }, NvimTreeRootFolder = { fg = p.iris }, NvimTreeSpecialFile = { link = 'NvimTreeNormal' }, - NvimTreeWindowPicker = { fg = p.base, bg = p.iris }, + NvimTreeWindowPicker = { fg = groups.background, bg = p.iris }, -- folke/which-key.nvim WhichKey = { fg = p.iris }, WhichKeyGroup = { fg = p.foam }, WhichKeySeparator = { fg = p.subtle }, WhichKeyDesc = { fg = p.gold }, - WhichKeyFloat = { bg = p.surface }, + WhichKeyFloat = { bg = groups.panel }, WhichKeyValue = { fg = p.rose }, -- luka-reineke/indent-blankline.nvim @@ -361,7 +361,7 @@ function M.get(config) DefinitionIcon = { fg = p.rose }, DefintionPreviewTitle = { fg = p.rose, style = 'bold' }, LspFloatWinBorder = { fg = groups.border }, - LspFloatWinNormal = { bg = p.base }, + LspFloatWinNormal = { bg = groups.background }, LspSagaAutoPreview = { fg = p.subtle }, LspSagaCodeActionBorder = { fg = groups.border }, LspSagaCodeActionContent = { fg = p.foam }, From 2f7d4584141a3c9dbaf0f33cc061dd61730920a7 Mon Sep 17 00:00:00 2001 From: mvllow Date: Thu, 17 Mar 2022 13:42:41 -0400 Subject: [PATCH 008/184] docs: add `groups.background` and `groups.panel` --- readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readme.md b/readme.md index 7b374bb..d7769a6 100644 --- a/readme.md +++ b/readme.md @@ -97,6 +97,8 @@ require('rose-pine').setup({ disable_italics = false, ---@usage string hex value or named color from rosepinetheme.com/palette groups = { + background = 'base', + panel = 'surface', border = 'highlight_med', comment = 'muted', link = 'iris', From e153a6b7eb90965014b42cd8455ff33d17f6b425 Mon Sep 17 00:00:00 2001 From: not Date: Fri, 1 Apr 2022 11:28:34 -0500 Subject: [PATCH 009/184] add highlight groups (#74) --- lua/rose-pine/init.lua | 7 ++++++- readme.md | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lua/rose-pine/init.lua b/lua/rose-pine/init.lua index 364952c..8b3a2c1 100644 --- a/lua/rose-pine/init.lua +++ b/lua/rose-pine/init.lua @@ -134,6 +134,7 @@ local config = { h6 = 'foam', }, }, + highlight_groups = {}, } ---@param opts RosePineConfig @@ -171,7 +172,11 @@ function M.colorscheme() local theme = require('rose-pine.theme').get(config) for group, color in pairs(theme) do - util.highlight(group, color) + if config.highlight_groups[group] ~= nil then + util.highlight(group, config.highlight_groups[group]) + else + util.highlight(group, color) + end end require('rose-pine.galaxyline.theme') diff --git a/readme.md b/readme.md index d7769a6..d850687 100644 --- a/readme.md +++ b/readme.md @@ -119,6 +119,10 @@ require('rose-pine').setup({ } -- or set all headings at once -- headings = 'subtle' + }, + -- Change specific vim highlight groups + highlight_groups = { + ColorColumn = { bg = 'rose' } } }) From 49647d12b48dc4052512897e06828ef63201096d Mon Sep 17 00:00:00 2001 From: not Date: Sat, 9 Apr 2022 16:27:39 -0400 Subject: [PATCH 010/184] docs: update readme --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index d850687..cbffaa3 100644 --- a/readme.md +++ b/readme.md @@ -84,7 +84,7 @@ local colors = require("galaxyline.themes.colors")["rose-pine"] > Options should be set **before** colorscheme -Variant now respects `vim.o.background`, using dawn when light (`vim.cmd("set background=light")`) and dark_variant when dark +Variant respects `vim.o.background`, using dawn when light and `dark_variant` when dark ```lua require('rose-pine').setup({ From b10a5c3432f4d2507bb6f205b66962e94e2e0e08 Mon Sep 17 00:00:00 2001 From: Fitrah Muhammad <55179750+fitrh@users.noreply.github.com> Date: Mon, 11 Apr 2022 22:19:35 +0800 Subject: [PATCH 011/184] add `LspReferenceXXX` highlight group (#75) --- lua/rose-pine/theme.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lua/rose-pine/theme.lua b/lua/rose-pine/theme.lua index d0da065..b798bb6 100644 --- a/lua/rose-pine/theme.lua +++ b/lua/rose-pine/theme.lua @@ -240,6 +240,11 @@ function M.get(config) TSVariable = { fg = p.text, style = styles.italic }, TSVariableBuiltin = { fg = p.love }, + -- vim.lsp.buf.document_highlight() + LspReferenceText = { bg = p.highlight_med }, + LspReferenceRead = { bg = p.highlight_med }, + LspReferenceWrite = { bg = p.highlight_med }, + -- romgrk/barbar.nvim BufferCurrent = { fg = p.text, bg = p.overlay }, BufferCurrentIndex = { fg = p.text, bg = p.overlay }, From c38b23c02226fe0d8bae64f991dca8e610794803 Mon Sep 17 00:00:00 2001 From: not Date: Fri, 15 Apr 2022 09:16:03 -0400 Subject: [PATCH 012/184] add toggleterm highlights and initial bufferline highlights (#77) --- lua/rose-pine/plugins/bufferline.lua | 212 +++++++++++++++++++++++++++ lua/rose-pine/plugins/toggleterm.lua | 14 ++ readme.md | 29 ++++ 3 files changed, 255 insertions(+) create mode 100644 lua/rose-pine/plugins/bufferline.lua create mode 100644 lua/rose-pine/plugins/toggleterm.lua diff --git a/lua/rose-pine/plugins/bufferline.lua b/lua/rose-pine/plugins/bufferline.lua new file mode 100644 index 0000000..c95bc92 --- /dev/null +++ b/lua/rose-pine/plugins/bufferline.lua @@ -0,0 +1,212 @@ +---Rosé Pine +---@plugin akinsho/bufferline.nvim +---@usage +--- local highlights = require('rose-pine.plugins.bufferline') +--- require('bufferline').setup({ highlights = highlights }) + +local p = require('rose-pine.palette') + +return { + -- fill = { + -- guifg = '', + -- guibg = '', + -- }, + -- background = { + -- guifg = '', + -- guibg = '', + -- }, + -- tab = { + -- guifg = '', + -- guibg = '', + -- }, + -- tab_selected = { + -- guifg = tabline_sel_bg, + -- guibg = '', + -- }, + -- tab_close = { + -- guifg = '', + -- guibg = '', + -- }, + -- close_button = { + -- guifg = '', + -- guibg = '', + -- }, + -- close_button_visible = { + -- guifg = '', + -- guibg = '', + -- }, + -- close_button_selected = { + -- guifg = '', + -- guibg = '', + -- }, + buffer_visible = { + guifg = p.subtle, + guibg = p.base, + }, + buffer_selected = { + guifg = p.text, + guibg = p.surface, + gui = 'bold,italic', + }, + -- diagnostic = { + -- guifg = '', + -- guibg = '', + -- }, + -- diagnostic_visible = { + -- guifg = '', + -- guibg = '', + -- }, + -- diagnostic_selected = { + -- guifg = '', + -- guibg = '', + -- gui = 'bold,italic', + -- }, + -- info = { + -- guifg = '', + -- guisp = '', + -- guibg = '', + -- }, + -- info_visible = { + -- guifg = '', + -- guibg = '', + -- }, + -- info_selected = { + -- guifg = '', + -- guibg = '', + -- gui = 'bold,italic', + -- guisp = '', + -- }, + -- info_diagnostic = { + -- guifg = '', + -- guisp = '', + -- guibg = '', + -- }, + -- info_diagnostic_visible = { + -- guifg = '', + -- guibg = '', + -- }, + -- info_diagnostic_selected = { + -- guifg = '', + -- guibg = '', + -- gui = 'bold,italic', + -- guisp = '', + -- }, + -- warning = { + -- guifg = '', + -- guisp = '', + -- guibg = '', + -- }, + -- warning_visible = { + -- guifg = '', + -- guibg = '', + -- }, + -- warning_selected = { + -- guifg = '', + -- guibg = '', + -- gui = 'bold,italic', + -- guisp = '', + -- }, + -- warning_diagnostic = { + -- guifg = '', + -- guisp = '', + -- guibg = '', + -- }, + -- warning_diagnostic_visible = { + -- guifg = '', + -- guibg = '', + -- }, + -- warning_diagnostic_selected = { + -- guifg = '', + -- guibg = '', + -- gui = 'bold,italic', + -- guisp = warning_diagnostic_fg, + -- }, + -- error = { + -- guifg = '', + -- guibg = '', + -- guisp = '', + -- }, + -- error_visible = { + -- guifg = '', + -- guibg = '', + -- }, + -- error_selected = { + -- guifg = '', + -- guibg = '', + -- gui = 'bold,italic', + -- guisp = '', + -- }, + -- error_diagnostic = { + -- guifg = '', + -- guibg = '', + -- guisp = '', + -- }, + -- error_diagnostic_visible = { + -- guifg = '', + -- guibg = '', + -- }, + -- error_diagnostic_selected = { + -- guifg = '', + -- guibg = '', + -- gui = 'bold,italic', + -- guisp = '', + -- }, + -- modified = { + -- guifg = '', + -- guibg = '', + -- }, + -- modified_visible = { + -- guifg = '', + -- guibg = '', + -- }, + -- modified_selected = { + -- guifg = '', + -- guibg = '', + -- }, + -- duplicate_selected = { + -- guifg = '', + -- gui = 'italic', + -- guibg = '', + -- }, + -- duplicate_visible = { + -- guifg = '', + -- gui = 'italic', + -- guibg = '', + -- }, + -- duplicate = { + -- guifg = '', + -- gui = 'italic', + -- guibg = '', + -- }, + -- separator_selected = { + -- guifg = '', + -- guibg = '', + -- }, + -- separator_visible = { + -- guifg = '', + -- guibg = '', + -- }, + -- separator = { + -- guifg = '', + -- guibg = '', + -- }, + -- indicator_selected = { + -- guifg = '', + -- guibg = '', + -- }, + -- pick_selected = { + -- guifg = '', + -- guibg = '', + -- gui = 'bold,italic', + -- }, + -- pick_visible = { + -- guifg = '', + -- guibg = '', + -- gui = 'bold,italic', + -- }, + -- pick = { + -- guifg = '', + -- guibg = '', + -- gui = 'bold,italic', + -- }, +} diff --git a/lua/rose-pine/plugins/toggleterm.lua b/lua/rose-pine/plugins/toggleterm.lua new file mode 100644 index 0000000..d73bd18 --- /dev/null +++ b/lua/rose-pine/plugins/toggleterm.lua @@ -0,0 +1,14 @@ +---Rosé Pine +---@plugin akinsho/toggleterm.nvim +---@usage +--- local highlights = require('rose-pine.plugins.toggleterm') +--- require('toggleterm').setup({ highlights = highlights }) + +return { + Normal = { link = 'Normal' }, + NormalFloat = { link = 'Normal' }, + FloatBorder = { link = 'FloatBorder' }, + SignColumn = { link = 'SignColumn' }, + StatusLine = { link = 'StatusLine' }, + StatusLineNC = { link = 'StatusLineNC' }, +} diff --git a/readme.md b/readme.md index cbffaa3..ec02bf1 100644 --- a/readme.md +++ b/readme.md @@ -66,6 +66,35 @@ use({ local colors = require("galaxyline.themes.colors")["rose-pine"] ``` +- [bufferline.nvim](https://github.com/akinsho/bufferline.nvim) + +> PR's welcome to improve support + +```lua +use({ + 'akinsho/bufferline.nvim', + event = 'ColorScheme', + config = function() + local highlights = require('rose-pine.plugins.bufferline') + require('bufferline').setup({ highlights = highlights }) + end +}) +``` + +- [toggleterm.nvim](https://github.com/akinsho/toggleterm.nvim) + +```lua +require('toggleterm').setup({ highlights = highlights }) +use({ + 'akinsho/toggleterm.nvim', + event = 'ColorScheme', + config = function() + local highlights = require('rose-pine.plugins.toggleterm') + require('toggleterm').setup({ highlights = highlights }) + end +}) +``` + ## Gallery **Rosé Pine** From 853112468d7ed32dd8cf0f2a501233443a499d2c Mon Sep 17 00:00:00 2001 From: not Date: Fri, 15 Apr 2022 13:02:57 -0400 Subject: [PATCH 013/184] docs: remove duplicated usage --- readme.md | 1 - 1 file changed, 1 deletion(-) diff --git a/readme.md b/readme.md index ec02bf1..f301faa 100644 --- a/readme.md +++ b/readme.md @@ -84,7 +84,6 @@ use({ - [toggleterm.nvim](https://github.com/akinsho/toggleterm.nvim) ```lua -require('toggleterm').setup({ highlights = highlights }) use({ 'akinsho/toggleterm.nvim', event = 'ColorScheme', From de2a00774d8d551cace9b4671206b34360a145d6 Mon Sep 17 00:00:00 2001 From: Will Leinweber Date: Tue, 19 Apr 2022 07:07:45 -0700 Subject: [PATCH 014/184] chore: move image to github cdn (#78) --- readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/readme.md b/readme.md index f301faa..70c6d57 100644 --- a/readme.md +++ b/readme.md @@ -26,7 +26,7 @@ use({ ## Plugins -> PR's are more than welcome if your favourite plugin is missing +> PRs are more than welcome if your favourite plugin is missing - [neovim diagnostics](https://neovim.io/doc/user/lsp.html) - [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) @@ -98,15 +98,15 @@ use({ **Rosé Pine** -![Rosé Pine with Neovim](assets/rose-pine.png) +![Rosé Pine with Neovim](https://user-images.githubusercontent.com/1973/163921570-0f577baf-3199-4f09-9779-a7eb9238151a.png) **Rosé Pine Moon** -![Rosé Pine Moon with Neovim](assets/rose-pine-moon.png) +![Rosé Pine Moon with Neovim](https://user-images.githubusercontent.com/1973/163921620-d3acd0d2-d227-4d28-a5e8-97ff22e56c6d.png) **Rosé Pine Dawn** -![Rosé Pine Dawn with Neovim](assets/rose-pine-dawn.png) +![Rosé Pine Dawn with Neovim](https://user-images.githubusercontent.com/1973/163921656-644a2db3-c55c-4e89-9bdd-39cdd7a2681b.png) ## Options From c68bfa077bc871c364a8595309a602bcd5f52e2e Mon Sep 17 00:00:00 2001 From: not Date: Tue, 19 Apr 2022 09:09:57 -0500 Subject: [PATCH 015/184] Update readme.md --- readme.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/readme.md b/readme.md index 70c6d57..3769c6d 100644 --- a/readme.md +++ b/readme.md @@ -68,8 +68,6 @@ local colors = require("galaxyline.themes.colors")["rose-pine"] - [bufferline.nvim](https://github.com/akinsho/bufferline.nvim) -> PR's welcome to improve support - ```lua use({ 'akinsho/bufferline.nvim', From 1ef267ddccc67b7bd4e98701943367d606e51fa2 Mon Sep 17 00:00:00 2001 From: Fitrah Muhammad <55179750+fitrh@users.noreply.github.com> Date: Tue, 26 Apr 2022 04:32:28 +0800 Subject: [PATCH 016/184] add `LspCodelensXXX` highlight group (#80) --- lua/rose-pine/theme.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/rose-pine/theme.lua b/lua/rose-pine/theme.lua index b798bb6..4d0e9c5 100644 --- a/lua/rose-pine/theme.lua +++ b/lua/rose-pine/theme.lua @@ -245,6 +245,10 @@ function M.get(config) LspReferenceRead = { bg = p.highlight_med }, LspReferenceWrite = { bg = p.highlight_med }, + -- lsp-highlight-codelens + LspCodeLens = { fg = p.subtle }, -- virtual text of code lens + LspCodeLensSeparator = { fg = p.highlight_high }, -- separator between two or more code lens + -- romgrk/barbar.nvim BufferCurrent = { fg = p.text, bg = p.overlay }, BufferCurrentIndex = { fg = p.text, bg = p.overlay }, From 15894e3f213928ff97ba8d120172ffa4504a311c Mon Sep 17 00:00:00 2001 From: Will Leinweber Date: Fri, 6 May 2022 11:34:05 -0500 Subject: [PATCH 017/184] Add `CurSearch` highlight group (#81) --- lua/rose-pine/theme.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/rose-pine/theme.lua b/lua/rose-pine/theme.lua index 4d0e9c5..ae2b729 100644 --- a/lua/rose-pine/theme.lua +++ b/lua/rose-pine/theme.lua @@ -18,6 +18,7 @@ function M.get(config) theme = { ColorColumn = { bg = p.highlight_high }, Conceal = { bg = p.none }, + CurSearch = { link = 'IncSearch' }, -- Cursor = {}, CursorColumn = { bg = p.highlight_low }, -- CursorIM = {}, From aeec916cbaebe3387af60b96ccf053049720262d Mon Sep 17 00:00:00 2001 From: fvrests Date: Sat, 14 May 2022 11:58:12 -0400 Subject: [PATCH 018/184] link to packer.nvim --- readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/readme.md b/readme.md index 3769c6d..a65216d 100644 --- a/readme.md +++ b/readme.md @@ -13,6 +13,8 @@ ## Usage +> With [packer.nvim](https://github.com/wbthomason/packer.nvim) + ```lua use({ 'rose-pine/neovim', From 23685a0a2e011fbc6a046f88869bda48a95c2cae Mon Sep 17 00:00:00 2001 From: crows Date: Thu, 2 Jun 2022 23:07:52 +0800 Subject: [PATCH 019/184] feat: improve contrast of the `FloatTitle` (#83) --- lua/rose-pine/theme.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/rose-pine/theme.lua b/lua/rose-pine/theme.lua index ae2b729..1a029d1 100644 --- a/lua/rose-pine/theme.lua +++ b/lua/rose-pine/theme.lua @@ -37,6 +37,7 @@ function M.get(config) -- EndOfBuffer = {}, ErrorMsg = { fg = p.love, style = 'bold' }, FloatBorder = { fg = groups.border }, + FloatTitle = { fg = p.muted }, FoldColumn = { fg = p.muted }, Folded = { fg = p.text, bg = groups.panel }, IncSearch = { fg = p.base, bg = p.rose }, From a60b0e6581b51758a9b7007eb3481bb9d58d914b Mon Sep 17 00:00:00 2001 From: mvllow Date: Tue, 14 Jun 2022 11:34:50 -0400 Subject: [PATCH 020/184] feat: support `WildMenu` --- lua/rose-pine/theme.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/rose-pine/theme.lua b/lua/rose-pine/theme.lua index 1a029d1..b9bff01 100644 --- a/lua/rose-pine/theme.lua +++ b/lua/rose-pine/theme.lua @@ -80,7 +80,7 @@ function M.get(config) -- VisualNOS = {}, WarningMsg = { fg = p.gold }, -- Whitespace = {}, - -- WildMenu = {}, + WildMenu = { link = 'IncSearch' }, Boolean = { fg = p.rose }, Character = { fg = p.gold }, From bc07e549245e0c4ea844a839381693b9c55c9e8a Mon Sep 17 00:00:00 2001 From: mvllow Date: Tue, 14 Jun 2022 11:59:22 -0400 Subject: [PATCH 021/184] chore: reduce contrast of `ColorColumn` To override highlights: https://github.com/rose-pine/neovim#options --- lua/rose-pine/theme.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/rose-pine/theme.lua b/lua/rose-pine/theme.lua index b9bff01..faf258d 100644 --- a/lua/rose-pine/theme.lua +++ b/lua/rose-pine/theme.lua @@ -16,7 +16,7 @@ function M.get(config) styles.nc_background = (config.dim_nc_background and groups.panel) or styles.background theme = { - ColorColumn = { bg = p.highlight_high }, + ColorColumn = { bg = p.overlay }, Conceal = { bg = p.none }, CurSearch = { link = 'IncSearch' }, -- Cursor = {}, From 4a3b4512fce47b0acc5932eab95f538e6d9f5340 Mon Sep 17 00:00:00 2001 From: mvllow Date: Thu, 16 Jun 2022 00:38:30 -0400 Subject: [PATCH 022/184] refactor: format and remove unused values - update format rules - update plugin file headers - remove unused opacity from palette --- .editorconfig | 12 ++++++++++++ .stylua.toml | 4 +--- lua/rose-pine/palette.lua | 3 --- lua/rose-pine/plugins/bufferline.lua | 13 +++++++------ lua/rose-pine/plugins/toggleterm.lua | 11 ++++++----- lua/rose-pine/theme.lua | 9 ++++++--- lua/rose-pine/util.lua | 11 ++++++++--- 7 files changed, 40 insertions(+), 23 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..7fc8038 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_style = tab +insert_final_newline = true +trim_trailing_whitespace = true + +[*.lua] +indent_size = 3 +indent_style = tab diff --git a/.stylua.toml b/.stylua.toml index 48e35ae..9d5f247 100644 --- a/.stylua.toml +++ b/.stylua.toml @@ -1,6 +1,4 @@ -column_width = 100 +column_width = 80 indent_type = "Tabs" -indent_width = 3 line_endings = "Unix" quote_style = "AutoPreferSingle" - diff --git a/lua/rose-pine/palette.lua b/lua/rose-pine/palette.lua index 03981f4..d98eaec 100644 --- a/lua/rose-pine/palette.lua +++ b/lua/rose-pine/palette.lua @@ -15,7 +15,6 @@ local variants = { highlight_low = '#21202e', highlight_med = '#403d52', highlight_high = '#524f67', - opacity = 0.1, none = 'NONE', }, moon = { @@ -34,7 +33,6 @@ local variants = { highlight_low = '#2a283e', highlight_med = '#44415a', highlight_high = '#56526e', - opacity = 0.1, none = 'NONE', }, dawn = { @@ -53,7 +51,6 @@ local variants = { highlight_low = '#f4ede8', highlight_med = '#dfdad9', highlight_high = '#cecacd', - opacity = 0.05, none = 'NONE', }, } diff --git a/lua/rose-pine/plugins/bufferline.lua b/lua/rose-pine/plugins/bufferline.lua index c95bc92..118b871 100644 --- a/lua/rose-pine/plugins/bufferline.lua +++ b/lua/rose-pine/plugins/bufferline.lua @@ -1,8 +1,9 @@ ----Rosé Pine ----@plugin akinsho/bufferline.nvim ----@usage ---- local highlights = require('rose-pine.plugins.bufferline') ---- require('bufferline').setup({ highlights = highlights }) +--- Rosé Pine for bufferline +--- https://github.com/akinsho/bufferline.nvim +--- +--- @usage +--- local highlights = require('rose-pine.plugins.bufferline') +--- require('bufferline').setup({ highlights = highlights }) local p = require('rose-pine.palette') @@ -20,7 +21,7 @@ return { -- guibg = '', -- }, -- tab_selected = { - -- guifg = tabline_sel_bg, + -- guifg = '', -- guibg = '', -- }, -- tab_close = { diff --git a/lua/rose-pine/plugins/toggleterm.lua b/lua/rose-pine/plugins/toggleterm.lua index d73bd18..38924f9 100644 --- a/lua/rose-pine/plugins/toggleterm.lua +++ b/lua/rose-pine/plugins/toggleterm.lua @@ -1,8 +1,9 @@ ----Rosé Pine ----@plugin akinsho/toggleterm.nvim ----@usage ---- local highlights = require('rose-pine.plugins.toggleterm') ---- require('toggleterm').setup({ highlights = highlights }) +--- Rosé Pine for toggleterm +--- https://github.com/akinsho/toggleterm.nvim +--- +--- @usage +--- local highlights = require('rose-pine.plugins.toggleterm') +--- require('toggleterm').setup({ highlights = highlights }) return { Normal = { link = 'Normal' }, diff --git a/lua/rose-pine/theme.lua b/lua/rose-pine/theme.lua index faf258d..16a8c3c 100644 --- a/lua/rose-pine/theme.lua +++ b/lua/rose-pine/theme.lua @@ -10,10 +10,13 @@ function M.get(config) local styles = { italic = (config.disable_italics and p.none) or 'italic', vert_split = (config.bold_vert_split and groups.border) or p.none, - background = (config.disable_background and p.none) or groups.background, - float_background = (config.disable_float_background and p.none) or groups.panel, + background = (config.disable_background and p.none) + or groups.background, + float_background = (config.disable_float_background and p.none) + or groups.panel, } - styles.nc_background = (config.dim_nc_background and groups.panel) or styles.background + styles.nc_background = (config.dim_nc_background and groups.panel) + or styles.background theme = { ColorColumn = { bg = p.overlay }, diff --git a/lua/rose-pine/util.lua b/lua/rose-pine/util.lua index 113d673..2bfdf85 100644 --- a/lua/rose-pine/util.lua +++ b/lua/rose-pine/util.lua @@ -22,7 +22,8 @@ local function parse_color(color) color = color:lower() if not color:find('#') and color ~= 'none' then - color = require('rose-pine.palette')[color] or vim.api.nvim_get_color_by_name(color) + color = require('rose-pine.palette')[color] + or vim.api.nvim_get_color_by_name(color) end return color @@ -40,7 +41,12 @@ util.blend = function(fg, bg, alpha) return math.floor(math.min(math.max(0, ret), 255) + 0.5) end - return string.format('#%02X%02X%02X', blend_channel(1), blend_channel(2), blend_channel(3)) + return string.format( + '#%02X%02X%02X', + blend_channel(1), + blend_channel(2), + blend_channel(3) + ) end ---@param group string @@ -55,7 +61,6 @@ util.highlight = function(group, color) if color.link then vim.cmd(string.format('highlight! link %s %s', group, color.link)) - -- vim.cmd('highlight! link ' .. group .. ' ' .. color.link) end end From c3762c935ea442153acde8a691a805c45e0d597f Mon Sep 17 00:00:00 2001 From: mvllow Date: Thu, 16 Jun 2022 00:39:24 -0400 Subject: [PATCH 023/184] refactor!: move galaxyline theme to `rose-pine.plugins.galaxyline` --- lua/rose-pine/galaxyline/theme.lua | 19 ------------------- lua/rose-pine/plugins/galaxyline.lua | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 19 deletions(-) delete mode 100644 lua/rose-pine/galaxyline/theme.lua create mode 100644 lua/rose-pine/plugins/galaxyline.lua diff --git a/lua/rose-pine/galaxyline/theme.lua b/lua/rose-pine/galaxyline/theme.lua deleted file mode 100644 index 1183aa9..0000000 --- a/lua/rose-pine/galaxyline/theme.lua +++ /dev/null @@ -1,19 +0,0 @@ -local present, galaxyline_colors = pcall(require, 'galaxyline.themes.colors') -if not present then - return -end - -local p = require('rose-pine.palette') - -galaxyline_colors['rose-pine'] = { - bg = p.overlay, - fg = p.text, - fg_alt = p.subtle, - blue = p.foam, - cyan = p.foam, - green = p.muted, - magenta = p.iris, - orange = p.rose, - red = p.love, - yellow = p.gold, -} diff --git a/lua/rose-pine/plugins/galaxyline.lua b/lua/rose-pine/plugins/galaxyline.lua new file mode 100644 index 0000000..348559a --- /dev/null +++ b/lua/rose-pine/plugins/galaxyline.lua @@ -0,0 +1,20 @@ +--- Rosé Pine for galaxyline fork +--- https://github.com/NTBBloodbath/galaxyline.nvim +--- +--- @usage +--- local highlights = require('rose-pine.plugins.galaxyline') + +local p = require('rose-pine.palette') + +return { + bg = p.surface, + fg = p.text, + fg_alt = p.subtle, + yellow = p.gold, + cyan = p.rose, + green = p.pine, + orange = p.muted, + magenta = p.iris, + blue = p.foam, + red = p.love, +} From c253ca25860a36f35f71d1b492a6a1071df4f1ce Mon Sep 17 00:00:00 2001 From: mvllow Date: Thu, 16 Jun 2022 00:40:54 -0400 Subject: [PATCH 024/184] docs: move supported plugins to the wiki --- readme.md | 74 ++++--------------------------------------------------- 1 file changed, 5 insertions(+), 69 deletions(-) diff --git a/readme.md b/readme.md index a65216d..a896d02 100644 --- a/readme.md +++ b/readme.md @@ -26,73 +26,7 @@ use({ }) ``` -## Plugins - -> PRs are more than welcome if your favourite plugin is missing - -- [neovim diagnostics](https://neovim.io/doc/user/lsp.html) -- [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) -- [barbar.nvim](https://github.com/romgrk/barbar.nvim) -- [gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim) -- [modes.nvim](https://github.com/mvllow/modes.nvim) -- [nvim-tree.lua](https://github.com/kyazdani42/nvim-tree.lua) -- [which-key.nvim](https://github.com/folke/which-key.nvim) -- [indent-blankline.nvim](https://github.com/lukas-reineke/indent-blankline.nvim) -- [neogit](https://github.com/TimUntersberger/neogit) -- [neorg](https://github.com/nvim-neorg/neorg) -- [lspsaga.nvim](https://github.com/tami5/lspsaga.nvim) -- [pounce.nvim](https://github.com/rlane/pounce.nvim) -- [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) -- [nvim-notify](https://github.com/rcarriga/nvim-notify) -- [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim) - -```lua -use({ - 'nvim-lualine/lualine.nvim', - -- fix mismatch palette between variants - event = 'ColorScheme', - config = function() - require('lualine').setup({ - options = { - ---@usage 'rose-pine' | 'rose-pine-alt' - theme = 'rose-pine' - } - }) - end -}) -``` - -- [galaxyline.nvim fork](https://github.com/NTBBloodbath/galaxyline.nvim) - -```lua -local colors = require("galaxyline.themes.colors")["rose-pine"] -``` - -- [bufferline.nvim](https://github.com/akinsho/bufferline.nvim) - -```lua -use({ - 'akinsho/bufferline.nvim', - event = 'ColorScheme', - config = function() - local highlights = require('rose-pine.plugins.bufferline') - require('bufferline').setup({ highlights = highlights }) - end -}) -``` - -- [toggleterm.nvim](https://github.com/akinsho/toggleterm.nvim) - -```lua -use({ - 'akinsho/toggleterm.nvim', - event = 'ColorScheme', - config = function() - local highlights = require('rose-pine.plugins.toggleterm') - require('toggleterm').setup({ highlights = highlights }) - end -}) -``` +_Supported plugins are listed in the [wiki](https://github.com/rose-pine/neovim/wiki#supported-plugins)_ ## Gallery @@ -116,14 +50,15 @@ Variant respects `vim.o.background`, using dawn when light and `dark_variant` wh ```lua require('rose-pine').setup({ - ---@usage 'main'|'moon' + --- @usage 'main' | 'moon' dark_variant = 'main', bold_vert_split = false, dim_nc_background = false, disable_background = false, disable_float_background = false, disable_italics = false, - ---@usage string hex value or named color from rosepinetheme.com/palette + + --- @usage string hex value or named color from rosepinetheme.com/palette groups = { background = 'base', panel = 'surface', @@ -148,6 +83,7 @@ require('rose-pine').setup({ -- or set all headings at once -- headings = 'subtle' }, + -- Change specific vim highlight groups highlight_groups = { ColorColumn = { bg = 'rose' } From b0724442eb17bab87789a6ddedfdf45126250e60 Mon Sep 17 00:00:00 2001 From: mvllow Date: Thu, 16 Jun 2022 00:43:46 -0400 Subject: [PATCH 025/184] refactor: remove deprecation messages --- lua/rose-pine.lua | 85 +++++++++++++++++++ lua/rose-pine/init.lua | 185 ----------------------------------------- 2 files changed, 85 insertions(+), 185 deletions(-) create mode 100644 lua/rose-pine.lua delete mode 100644 lua/rose-pine/init.lua diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua new file mode 100644 index 0000000..0fa9c0a --- /dev/null +++ b/lua/rose-pine.lua @@ -0,0 +1,85 @@ +local util = require('rose-pine.util') + +local M = {} + +local config = { + bold_vert_split = false, + dark_variant = 'main', + dim_nc_background = false, + disable_background = false, + disable_float_background = false, + disable_italics = false, + + groups = { + background = 'base', + panel = 'surface', + border = 'highlight_med', + comment = 'muted', + link = 'iris', + punctuation = 'muted', + + error = 'love', + hint = 'iris', + info = 'foam', + warn = 'gold', + + git_add = 'foam', + git_change = 'rose', + git_delete = 'love', + git_dirty = 'rose', + git_ignore = 'muted', + git_merge = 'iris', + git_rename = 'pine', + git_stage = 'iris', + git_text = 'rose', + + headings = { + h1 = 'iris', + h2 = 'foam', + h3 = 'rose', + h4 = 'gold', + h5 = 'pine', + h6 = 'foam', + }, + }, + highlight_groups = {}, +} + +function M.setup(opts) + opts = opts or {} + vim.g.rose_pine_variant = opts.dark_variant or 'main' + + if opts.groups and type(opts.groups.headings) == 'string' then + opts.groups.headings = { + h1 = opts.groups.headings, + h2 = opts.groups.headings, + h3 = opts.groups.headings, + h4 = opts.groups.headings, + h5 = opts.groups.headings, + h6 = opts.groups.headings, + } + end + + config.user_variant = opts.dark_variant or nil + config = vim.tbl_deep_extend('force', config, opts) +end + +function M.colorscheme() + if vim.g.colors_name then + vim.cmd('hi clear') + end + + vim.opt.termguicolors = true + vim.g.colors_name = 'rose-pine' + + local theme = require('rose-pine.theme').get(config) + for group, color in pairs(theme) do + if config.highlight_groups[group] ~= nil then + util.highlight(group, config.highlight_groups[group]) + else + util.highlight(group, color) + end + end +end + +return M diff --git a/lua/rose-pine/init.lua b/lua/rose-pine/init.lua deleted file mode 100644 index 8b3a2c1..0000000 --- a/lua/rose-pine/init.lua +++ /dev/null @@ -1,185 +0,0 @@ -local util = require('rose-pine.util') - -local M = {} -local show_init_messages = true - -local function check_for_deprecated_opts() - local alerts = {} - local should_alert = false - - -- Deprecated options - if vim.g.rose_pine_bold_vertical_split_line ~= nil then - should_alert = true - table.insert(alerts, 'vim.g.rose_pine_bold_vertical_split_line renamed to bold_vert_split') - end - - if vim.g.rose_pine_inactive_background ~= nil then - should_alert = true - table.insert(alerts, 'vim.g.rose_pine_inactive_background renamed to dim_nc_background') - end - - if vim.g.rose_pine_disable_background ~= nil then - should_alert = true - table.insert(alerts, 'vim.g.rose_pine_disable_background renamed to disable_background') - end - - if vim.g.rose_pine_disable_float_background ~= nil then - should_alert = true - table.insert( - alerts, - 'vim.g.rose_pine_disable_float_background renamed to disable_float_background' - ) - end - - if vim.g.rose_pine_disable_italics ~= nil then - should_alert = true - table.insert(alerts, 'vim.g.rose_pine_disable_italics renamed to disable_italics') - end - - if vim.g.rose_pine_colors ~= nil then - should_alert = true - table.insert(alerts, 'vim.g.rose_pine_colors renamed to groups') - end - - if should_alert then - local prefix = ' ' - print('Rosé Pine – https://github.com/rose-pine/neovim') - print(prefix .. 'vim.g.rose_pine_