From 29477a109aca06e4077b86a04815a43bd68d3a15 Mon Sep 17 00:00:00 2001
From: not
Date: Sun, 7 Jan 2024 13:42:09 -0600
Subject: [PATCH 01/97] feat!: add new options with better support for
transparency (#185)
This commit adds a few new options and improves transparency support.
Enable transparency styles:
```lua
styles = { transparency = true }
```
Feedback is appreciated!
---
.github/ISSUE_TEMPLATE/bug_report.yml | 24 +-
.github/ISSUE_TEMPLATE/feature_request.yml | 12 -
.stylua.toml | 4 -
changelog.md | 82 +++
colors/rose-pine-dawn.lua | 4 +-
colors/rose-pine-main.lua | 4 +-
colors/rose-pine-moon.lua | 4 +-
colors/rose-pine.lua | 4 +-
lua/lualine/themes/rose-pine-alt.lua | 18 +-
lua/lualine/themes/rose-pine.lua | 14 +-
lua/rose-pine.lua | 662 ++++++++++++++++++++-
lua/rose-pine/config.lua | 188 ++++--
lua/rose-pine/palette.lua | 111 ++--
lua/rose-pine/plugins/bufferline.lua | 2 +-
lua/rose-pine/plugins/galaxyline.lua | 2 +-
lua/rose-pine/plugins/markid.lua | 2 +-
lua/rose-pine/plugins/toggleterm.lua | 12 +-
lua/rose-pine/theme.lua | 629 --------------------
lua/rose-pine/util.lua | 71 ---
lua/rose-pine/utilities.lua | 66 ++
readme.md | 145 ++---
21 files changed, 1101 insertions(+), 959 deletions(-)
delete mode 100644 .stylua.toml
create mode 100644 changelog.md
delete mode 100644 lua/rose-pine/theme.lua
delete mode 100644 lua/rose-pine/util.lua
create mode 100644 lua/rose-pine/utilities.lua
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
index 4cee468..cd69062 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -15,30 +15,14 @@ body:
required: true
- type: input
attributes:
- label: "Terminal"
- placeholder: "Kitty"
+ label: "Terminal / multiplexer"
+ placeholder: "Kitty / tmux"
validations:
required: true
- type: textarea
attributes:
label: Describe the bug
- description: A clear and concise description of what the bug is. Please include any related errors you see in Neovim.
- validations:
- required: true
- - type: textarea
- attributes:
- label: Steps To Reproduce
- description: Steps to reproduce the behavior.
- placeholder: |
- 1.
- 2.
- 3.
- validations:
- required: true
- - type: textarea
- attributes:
- label: Expected Behavior
- description: A concise description of what you expected to happen.
+ description: A clear and concise description of what the bug is. Please include screenshots if possible and any related errors you see in Neovim.
validations:
required: true
- type: textarea
@@ -61,7 +45,7 @@ body:
end
require("rose-pine").setup({
- -- ADD ROSÉ PINE CONFIG THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE
+ -- ADD ROSÉ PINE CONFIG THAT IS _NECESSARY_ TO REPRODUCE THE ISSUE
})
vim.cmd("colorscheme rose-pine")
diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml
index 2b45cdb..bd9d3f6 100644
--- a/.github/ISSUE_TEMPLATE/feature_request.yml
+++ b/.github/ISSUE_TEMPLATE/feature_request.yml
@@ -3,24 +3,12 @@ description: Suggest a new feature
title: "feature: "
labels: [enhancement]
body:
- - type: textarea
- validations:
- required: true
- attributes:
- label: Is your feature request related to a problem? Please describe.
- description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
- type: textarea
validations:
required: true
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
- - type: textarea
- validations:
- required: true
- attributes:
- label: Describe alternatives you've considered
- description: A clear and concise description of any alternative solutions or features you've considered.
- type: textarea
validations:
required: false
diff --git a/.stylua.toml b/.stylua.toml
deleted file mode 100644
index 9d5f247..0000000
--- a/.stylua.toml
+++ /dev/null
@@ -1,4 +0,0 @@
-column_width = 80
-indent_type = "Tabs"
-line_endings = "Unix"
-quote_style = "AutoPreferSingle"
diff --git a/changelog.md b/changelog.md
new file mode 100644
index 0000000..bd583ba
--- /dev/null
+++ b/changelog.md
@@ -0,0 +1,82 @@
+# Changelog
+
+## v2.0.0-next.1
+
+### What's new
+
+- Add proper support for `StatusLineTerm` & `StatusLineTermNC`, controlled via `enable.terminal`
+- Add background glow to diagnostic virtual text
+- Add `extend_background_behind_borders`
+- Add `styles.bold` and alternatively styling when disabled
+- Add `before_highlight` hook to allow changing palette values and behaviours
+- Increase contrast of search, visual selections, and more
+
+### Features
+
+**extend_background_behind_borders**
+
+Extend float backgrounds behind borders. Results vary depending on your border characters.
+
+```lua
+{
+ extend_background_behind_borders = true
+}
+```
+
+**styles.transparency**
+
+Enable a unique experience focused around transparent terminals, avoiding large backgrounds and differentiating selections with foreground colours when possible.
+
+```lua
+{
+ styles = {
+ transparency = true
+ }
+}
+```
+
+**before_highlight**
+
+```lua
+{
+ before_highlight = function(group, highlight, palette)
+ -- Disable all undercurls
+ if highlight.undercurl then
+ highlight.undercurl = false
+ end
+
+ -- Change palette colour
+ if highlight.fg == palette.pine then
+ highlight.fg = palette.foam
+ end
+ end,
+}
+```
+
+### Breaking changes
+
+> [!WARNING]
+> Removed or renamed options should continue to work via internal migrations but backwards compatibility is not tested and may break at any time.
+
+```diff
+- dim_nc_background = true,
++ dim_inactive_windows = true,
+
+- disable_background = true,
+- disable_float_background = true,
++ styles.transparency = true
+
+- disable_italics = true,
++ styles.italic = false,
+
+- groups = {
+- background = "...",
+- comment = "...",
+- punctuation = "...",
+- },
++ highlight_groups = {
++ Normal = { bg = "..." },
++ Comment = { fg = "..." },
++ ["@punctuation"] = { fg = "..." },
++ }
+```
diff --git a/colors/rose-pine-dawn.lua b/colors/rose-pine-dawn.lua
index 3ce1680..a95b327 100644
--- a/colors/rose-pine-dawn.lua
+++ b/colors/rose-pine-dawn.lua
@@ -1,2 +1,2 @@
-package.loaded['rose-pine.palette'] = nil
-require('rose-pine').colorscheme('dawn')
+package.loaded["rose-pine.palette"] = nil
+require("rose-pine").colorscheme("dawn")
diff --git a/colors/rose-pine-main.lua b/colors/rose-pine-main.lua
index e09c69d..15729c9 100644
--- a/colors/rose-pine-main.lua
+++ b/colors/rose-pine-main.lua
@@ -1,2 +1,2 @@
-package.loaded['rose-pine.palette'] = nil
-require('rose-pine').colorscheme('main')
+package.loaded["rose-pine.palette"] = nil
+require("rose-pine").colorscheme("main")
diff --git a/colors/rose-pine-moon.lua b/colors/rose-pine-moon.lua
index 7196100..34b58c0 100644
--- a/colors/rose-pine-moon.lua
+++ b/colors/rose-pine-moon.lua
@@ -1,2 +1,2 @@
-package.loaded['rose-pine.palette'] = nil
-require('rose-pine').colorscheme('moon')
+package.loaded["rose-pine.palette"] = nil
+require("rose-pine").colorscheme("moon")
diff --git a/colors/rose-pine.lua b/colors/rose-pine.lua
index 71f155f..f705290 100644
--- a/colors/rose-pine.lua
+++ b/colors/rose-pine.lua
@@ -1,2 +1,2 @@
-package.loaded['rose-pine.palette'] = nil
-require('rose-pine').colorscheme()
+package.loaded["rose-pine.palette"] = nil
+require("rose-pine").colorscheme()
diff --git a/lua/lualine/themes/rose-pine-alt.lua b/lua/lualine/themes/rose-pine-alt.lua
index 1e1ee36..05d8af7 100644
--- a/lua/lualine/themes/rose-pine-alt.lua
+++ b/lua/lualine/themes/rose-pine-alt.lua
@@ -1,26 +1,26 @@
-local p = require('rose-pine.palette')
+local p = require("rose-pine.palette")
return {
normal = {
- a = { bg = p.surface, fg = p.rose, gui = 'bold' },
+ a = { bg = p.surface, fg = p.rose, gui = "bold" },
b = { bg = p.surface, fg = p.text },
- c = { bg = p.surface, fg = p.subtle, gui = 'italic' },
+ c = { bg = p.surface, fg = p.subtle, gui = "italic" },
},
insert = {
- a = { bg = p.surface, fg = p.foam, gui = 'bold' },
+ a = { bg = p.surface, fg = p.foam, gui = "bold" },
},
visual = {
- a = { bg = p.surface, fg = p.iris, gui = 'bold' },
+ a = { bg = p.surface, fg = p.iris, gui = "bold" },
},
replace = {
- a = { bg = p.surface, fg = p.pine, gui = 'bold' },
+ a = { bg = p.surface, fg = p.pine, gui = "bold" },
},
command = {
- a = { bg = p.surface, fg = p.love, gui = 'bold' },
+ a = { bg = p.surface, fg = p.love, gui = "bold" },
},
inactive = {
- a = { bg = p.base, fg = p.subtle, gui = 'bold' },
+ a = { bg = p.base, fg = p.subtle, gui = "bold" },
b = { bg = p.base, fg = p.subtle },
- c = { bg = p.base, fg = p.subtle, gui = 'italic' },
+ c = { bg = p.base, fg = p.subtle, gui = "italic" },
},
}
diff --git a/lua/lualine/themes/rose-pine.lua b/lua/lualine/themes/rose-pine.lua
index dde3075..96d6b92 100644
--- a/lua/lualine/themes/rose-pine.lua
+++ b/lua/lualine/themes/rose-pine.lua
@@ -1,33 +1,33 @@
-local p = require('rose-pine.palette')
+local p = require("rose-pine.palette")
return {
normal = {
- a = { bg = p.rose, fg = p.base, gui = 'bold' },
+ a = { bg = p.rose, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.rose },
c = { bg = p.base, fg = p.text },
},
insert = {
- a = { bg = p.foam, fg = p.base, gui = 'bold' },
+ a = { bg = p.foam, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.foam },
c = { bg = p.base, fg = p.text },
},
visual = {
- a = { bg = p.iris, fg = p.base, gui = 'bold' },
+ a = { bg = p.iris, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.iris },
c = { bg = p.base, fg = p.text },
},
replace = {
- a = { bg = p.pine, fg = p.base, gui = 'bold' },
+ a = { bg = p.pine, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.pine },
c = { bg = p.base, fg = p.text },
},
command = {
- a = { bg = p.love, fg = p.base, gui = 'bold' },
+ a = { bg = p.love, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.love },
c = { bg = p.base, fg = p.text },
},
inactive = {
- a = { bg = p.base, fg = p.muted, gui = 'bold' },
+ a = { bg = p.base, fg = p.muted, gui = "bold" },
b = { bg = p.base, fg = p.muted },
c = { bg = p.base, fg = p.muted },
},
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index b3cf3ea..d45d4af 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -1,22 +1,668 @@
-local config = require('rose-pine.config')
local M = {}
+local config = require("rose-pine.config")
----@param variant Variant|nil
+local function set_highlights()
+ local utilities = require("rose-pine.utilities")
+ local palette = require("rose-pine.palette")
+ local styles = config.options.styles
+ local groups = config.options.groups
+
+ local function make_border(fg)
+ fg = fg or groups.border
+ return { fg = fg, bg = config.options.extend_background_behind_borders and palette.surface or "NONE" }
+ end
+
+ local function make_title(fg)
+ fg = fg or palette.foam
+ return { fg = styles.bold and palette.text or fg, bold = styles.bold }
+ end
+
+ local highlights = {
+ ColorColumn = { bg = palette.surface },
+ Conceal = { bg = "NONE" },
+ CurSearch = { fg = palette.base, bg = palette.gold },
+ Cursor = { fg = palette.text, bg = palette.highlight_high },
+ CursorColumn = { bg = palette.overlay },
+ -- CursorIM = {},
+ CursorLine = { bg = palette.overlay },
+ CursorLineNr = { fg = palette.text, bold = styles.bold },
+ -- DarkenedPanel = { },
+ -- DarkenedStatusline = {},
+ DiffAdd = { bg = groups.git_add, blend = 20 },
+ DiffChange = { bg = groups.git_change, blend = 20 },
+ DiffDelete = { bg = groups.git_delete, blend = 20 },
+ DiffText = { bg = groups.git_text, blend = 20 },
+ diffAdded = { link = "DiffAdd" },
+ diffChanged = { link = "DiffChange" },
+ diffRemoved = { link = "DiffDelete" },
+ Directory = make_title(),
+ -- EndOfBuffer = {},
+ ErrorMsg = { fg = groups.error, bold = styles.bold },
+ FloatBorder = make_border(),
+ FloatTitle = { link = "Directory" },
+ FoldColumn = { fg = palette.muted },
+ Folded = { fg = palette.text, bg = groups.panel },
+ IncSearch = { link = "CurSearch" },
+ LineNr = { fg = palette.muted },
+ MatchParen = { fg = palette.pine, bg = palette.pine, blend = 25 },
+ ModeMsg = { fg = palette.subtle },
+ MoreMsg = { fg = palette.iris },
+ NonText = { fg = palette.muted },
+ Normal = { fg = palette.text, bg = palette.base },
+ NormalFloat = { bg = groups.panel },
+ NormalNC = { fg = palette.text, bg = config.options.dim_inactive_windows and palette._nc or palette.base },
+ NvimInternalError = { link = "ErrorMsg" },
+ Pmenu = { fg = palette.subtle, bg = groups.panel },
+ PmenuExtra = { fg = palette.muted, bg = groups.panel },
+ PmenuExtraSel = { fg = palette.subtle, bg = palette.overlay },
+ PmenuKind = { fg = palette.foam, bg = groups.panel },
+ PmenuKindSel = { fg = palette.subtle, bg = palette.overlay },
+ PmenuSbar = { bg = groups.panel },
+ PmenuSel = { fg = palette.title, bg = palette.overlay },
+ PmenuThumb = { bg = palette.muted },
+ Question = { fg = palette.gold },
+ -- QuickFixLink = {},
+ -- RedrawDebugNormal = {},
+ RedrawDebugClear = { fg = palette.base, bg = palette.gold },
+ RedrawDebugComposed = { fg = palette.base, bg = palette.pine },
+ RedrawDebugRecompose = { fg = palette.base, bg = palette.love },
+ Search = { fg = palette.base, bg = palette.text },
+ SignColumn = { fg = palette.text, bg = "NONE" },
+ SpecialKey = { fg = palette.foam },
+ SpellBad = { sp = palette.subtle, undercurl = true },
+ SpellCap = { sp = palette.subtle, undercurl = true },
+ SpellLocal = { sp = palette.subtle, undercurl = true },
+ SpellRare = { sp = palette.subtle, undercurl = true },
+ StatusLine = { fg = palette.subtle, bg = groups.panel },
+ StatusLineNC = { fg = palette.muted, bg = groups.panel, blend = 60 },
+ StatusLineTerm = { fg = palette.base, bg = palette.pine },
+ StatusLineTermNC = { fg = palette.base, bg = palette.pine, blend = 60 },
+ Substitute = { link = "IncSearch" },
+ TabLine = { link = "StatusLine" },
+ TabLineFill = { bg = groups.panel },
+ TabLineSel = { fg = palette.text, bg = palette.overlay, bold = styles.bold },
+ Title = make_title(),
+ VertSplit = make_border(),
+ Visual = { bg = palette.highlight_med },
+ -- VisualNOS = {},
+ WarningMsg = { fg = groups.warn, bold = styles.bold },
+ -- Whitespace = {},
+ WildMenu = { link = "IncSearch" },
+ WinSeparator = make_border(),
+
+ DiagnosticError = { fg = groups.error },
+ DiagnosticHint = { fg = groups.hint },
+ DiagnosticInfo = { fg = groups.info },
+ DiagnosticWarn = { fg = groups.warn },
+ DiagnosticDefaultError = { link = "DiagnosticError" },
+ DiagnosticDefaultHint = { link = "DiagnosticHint" },
+ DiagnosticDefaultInfo = { link = "DiagnosticInfo" },
+ DiagnosticDefaultWarn = { link = "DiagnosticWarn" },
+ DiagnosticFloatingError = { link = "DiagnosticError" },
+ DiagnosticFloatingHint = { link = "DiagnosticHint" },
+ DiagnosticFloatingInfo = { link = "DiagnosticInfo" },
+ DiagnosticFloatingWarn = { link = "DiagnosticWarn" },
+ DiagnosticSignError = { link = "DiagnosticError" },
+ DiagnosticSignHint = { link = "DiagnosticHint" },
+ DiagnosticSignInfo = { link = "DiagnosticInfo" },
+ DiagnosticSignWarn = { link = "DiagnosticWarn" },
+ DiagnosticUnderlineError = { sp = groups.error, undercurl = true },
+ DiagnosticUnderlineHint = { sp = groups.hint, undercurl = true },
+ DiagnosticUnderlineInfo = { sp = groups.info, undercurl = true },
+ DiagnosticUnderlineWarn = { sp = groups.warn, undercurl = true },
+ DiagnosticVirtualTextError = { fg = groups.error, bg = groups.error, blend = 10 },
+ DiagnosticVirtualTextHint = { fg = groups.hint, bg = groups.hint, blend = 10 },
+ DiagnosticVirtualTextInfo = { fg = groups.info, bg = groups.info, blend = 10 },
+ DiagnosticVirtualTextWarn = { fg = groups.warn, bg = groups.warn, blend = 10 },
+
+ Boolean = { fg = palette.rose },
+ Character = { fg = palette.gold },
+ Comment = { fg = palette.subtle, italic = styles.italic },
+ Conditional = { fg = palette.pine },
+ Constant = { fg = palette.gold },
+ Debug = { fg = palette.rose },
+ Define = { fg = palette.iris },
+ Delimiter = { fg = palette.subtle },
+ Error = { fg = palette.love },
+ Exception = { fg = palette.pine },
+ Float = { fg = palette.gold },
+ Function = { fg = palette.rose },
+ Identifier = { fg = palette.text },
+ Include = { fg = palette.pine },
+ Keyword = { fg = palette.pine },
+ Label = { fg = palette.foam },
+ LspCodeLens = { fg = palette.subtle },
+ LspCodeLensSeparator = { fg = palette.muted },
+ LspInlayHint = { fg = palette.muted, bg = palette.muted, blend = 10 },
+ LspReferenceRead = { bg = palette.highlight_med },
+ LspReferenceText = { bg = palette.highlight_med },
+ LspReferenceWrite = { bg = palette.highlight_med },
+ Macro = { fg = palette.iris },
+ Number = { fg = palette.gold },
+ Operator = { fg = palette.subtle },
+ PreConduit = { fg = palette.iris },
+ PreProc = { link = "PreConduit" },
+ Repeat = { fg = palette.pine },
+ Special = { fg = palette.foam },
+ SpecialChar = { link = "Special" },
+ SpecialComment = { fg = palette.iris },
+ Statement = { fg = palette.pine, bold = styles.bold },
+ StorageClass = { fg = palette.foam },
+ String = { fg = palette.gold },
+ Structure = { fg = palette.foam },
+ Tag = { fg = palette.foam },
+ Todo = { fg = palette.iris, bg = palette.iris, blend = 20 },
+ Type = { fg = palette.foam },
+ TypeDef = { link = "Type" },
+ Underlined = { fg = palette.iris, underline = true },
+
+ healthError = { fg = groups.error },
+ healthSuccess = { fg = groups.info },
+ healthWarning = { fg = groups.warn },
+
+ htmlArg = { fg = palette.iris },
+ htmlBold = { bold = styles.bold },
+ htmlEndTag = { fg = palette.subtle },
+ htmlH1 = { link = "markdownH1" },
+ htmlH2 = { link = "markdownH2" },
+ htmlH3 = { link = "markdownH3" },
+ htmlH4 = { link = "markdownH4" },
+ htmlH5 = { link = "markdownH5" },
+ htmlItalic = { italic = styles.italic },
+ htmlLink = { link = "markdownUrl" },
+ htmlTag = { fg = palette.subtle },
+ htmlTagN = { fg = palette.text },
+ htmlTagName = { fg = palette.foam },
+
+ markdownDelimiter = { fg = palette.subtle },
+ markdownH1 = { fg = groups.headings.h1, bold = styles.bold },
+ markdownH1Delimiter = { link = "markdownH1" },
+ markdownH2 = { fg = groups.headings.h2, bold = styles.bold },
+ markdownH2Delimiter = { link = "markdownH2" },
+ markdownH3 = { fg = groups.headings.h3, bold = styles.bold },
+ markdownH3Delimiter = { link = "markdownH3" },
+ markdownH4 = { fg = groups.headings.h4, bold = styles.bold },
+ markdownH4Delimiter = { link = "markdownH4" },
+ markdownH5 = { fg = groups.headings.h5, bold = styles.bold },
+ markdownH5Delimiter = { link = "markdownH5" },
+ markdownH6 = { fg = groups.headings.h6, bold = styles.bold },
+ markdownH6Delimiter = { link = "markdownH6" },
+ markdownLinkText = { link = "markdownUrl" },
+ markdownUrl = { fg = groups.link, sp = groups.link, underline = true },
+
+ mkdCode = { fg = palette.foam, italic = styles.italic },
+ mkdCodeDelimiter = { fg = palette.rose },
+ mkdCodeEnd = { fg = palette.foam },
+ mkdCodeStart = { fg = palette.foam },
+ mkdFootnotes = { fg = palette.foam },
+ mkdID = { fg = palette.foam, underline = true },
+ mkdInlineURL = { link = "markdownUrl" },
+ mkdLink = { link = "markdownUrl" },
+ mkdLinkDef = { link = "markdownUrl" },
+ mkdListItemLine = { fg = palette.text },
+ mkdRule = { fg = palette.subtle },
+ mkdURL = { link = "markdownUrl" },
+
+ ["@attribute.diff"] = { fg = palette.gold },
+ ["@boolean"] = { link = "Boolean" },
+ ["@character"] = { link = "Character" },
+ ["@character.special"] = { link = "Character" },
+ ["@class"] = { fg = palette.foam },
+ ["@comment"] = { link = "Comment" },
+ ["@conditional"] = { link = "Conditional" },
+ ["@constant"] = { link = "Constant" },
+ ["@constant.builtin"] = { fg = palette.love },
+ ["@constant.macro"] = { link = "Constant" },
+ ["@constructor"] = { fg = palette.foam },
+ ["@field"] = { fg = palette.foam },
+ ["@function"] = { link = "Function" },
+ ["@function.builtin"] = { fg = palette.love },
+ ["@function.macro"] = { link = "Function" },
+ ["@include"] = { link = "Include" },
+ ["@interface"] = { fg = palette.foam },
+ ["@keyword"] = { link = "Keyword" },
+ ["@keyword.operator"] = { fg = palette.subtle },
+ ["@label"] = { link = "Label" },
+ ["@lsp.type.comment"] = {},
+ ["@lsp.type.enum"] = { link = "Type" },
+ ["@lsp.type.interface"] = { link = "@interface" },
+ ["@lsp.type.keyword"] = { link = "Keyword" },
+ ["@lsp.type.namespace"] = { link = "@namespace" },
+ ["@lsp.type.parameter"] = { link = "@parameter" },
+ ["@lsp.type.property"] = { link = "@property" },
+ ["@lsp.type.variable"] = {},
+ ["@lsp.typemod.function.defaultLibrary"] = { link = "Special" },
+ ["@lsp.typemod.operator.injected"] = { link = "Operator" },
+ ["@lsp.typemod.string.injected"] = { link = "String" },
+ ["@lsp.typemod.variable.defaultLibrary"] = { link = "@variable.builtin" },
+ ["@lsp.typemod.variable.injected"] = { link = "@variable" },
+ ["@macro"] = { link = "Macro" },
+ ["@method"] = { fg = palette.rose },
+ ["@namespace"] = { link = "Include" },
+ ["@number"] = { link = "Number" },
+ ["@operator"] = { link = "Operator" },
+ ["@parameter"] = { fg = palette.iris, italic = styles.italic },
+ ["@preproc"] = { link = "PreProc" },
+ ["@property"] = { fg = palette.foam, italic = styles.italic },
+ ["@punctuation"] = { fg = palette.subtle },
+ ["@punctuation.bracket"] = { link = "@punctuation" },
+ ["@punctuation.delimiter"] = { link = "@punctuation" },
+ ["@punctuation.special"] = { link = "@punctuation" },
+ ["@regexp"] = { link = "String" },
+ ["@repeat"] = { link = "Repeat" },
+ ["@storageclass"] = { link = "StorageClass" },
+ ["@string"] = { link = "String" },
+ ["@string.escape"] = { fg = palette.pine },
+ ["@string.special"] = { link = "String" },
+ ["@symbol"] = { link = "Identifier" },
+ ["@tag"] = { link = "Tag" },
+ ["@tag.attribute"] = { fg = palette.iris },
+ ["@tag.delimiter"] = { fg = palette.subtle },
+ ["@text"] = { fg = palette.text },
+ ["@text.danger"] = { fg = groups.error },
+ ["@text.diff.add"] = { fg = groups.git_add, bg = groups.git_add, blend = 20 },
+ ["@text.diff.delete"] = { fg = groups.git_delete, bg = groups.git_delete, blend = 20 },
+ ["@text.emphasis"] = { italic = styles.italic },
+ ["@text.environment"] = { link = "Macro" },
+ ["@text.environment.name"] = { link = "Type" },
+ ["@text.math"] = { link = "Special" },
+ ["@text.note"] = { link = "SpecialComment" },
+ ["@text.strike"] = { strikethrough = true },
+ ["@text.strong"] = { bold = styles.bold },
+ ["@text.title"] = { link = "Title" },
+ ["@text.title.1.markdown"] = { link = "markdownH1" },
+ ["@text.title.1.marker.markdown"] = { link = "markdownH1Delimiter" },
+ ["@text.title.2.markdown"] = { link = "markdownH2" },
+ ["@text.title.2.marker.markdown"] = { link = "markdownH2Delimiter" },
+ ["@text.title.3.markdown"] = { link = "markdownH3" },
+ ["@text.title.3.marker.markdown"] = { link = "markdownH3Delimiter" },
+ ["@text.title.4.markdown"] = { link = "markdownH4" },
+ ["@text.title.4.marker.markdown"] = { link = "markdownH4Delimiter" },
+ ["@text.title.5.markdown"] = { link = "markdownH5" },
+ ["@text.title.5.marker.markdown"] = { link = "markdownH5Delimiter" },
+ ["@text.title.6.markdown"] = { link = "markdownH6" },
+ ["@text.title.6.marker.markdown"] = { link = "markdownH6Delimiter" },
+ ["@text.underline"] = { underline = true },
+ ["@text.uri"] = { fg = groups.link },
+ ["@text.warning"] = { fg = groups.warn },
+ ["@todo"] = { link = "Todo" },
+ ["@type"] = { link = "Type" },
+ ["@variable"] = { fg = palette.text, italic = styles.italic },
+ ["@variable.builtin"] = { fg = palette.love },
+
+ -- romgrk/barbar.nvim
+ BufferCurrent = { fg = palette.text, bg = palette.overlay },
+ BufferCurrentIndex = { fg = palette.text, bg = palette.overlay },
+ BufferCurrentMod = { fg = palette.foam, bg = palette.overlay },
+ BufferCurrentSign = { fg = palette.subtle, bg = palette.overlay },
+ BufferCurrentTarget = { fg = palette.gold, bg = palette.overlay },
+ BufferInactive = { fg = palette.subtle },
+ BufferInactiveIndex = { fg = palette.subtle },
+ BufferInactiveMod = { fg = palette.foam },
+ BufferInactiveSign = { fg = palette.muted },
+ BufferInactiveTarget = { fg = palette.gold },
+ BufferTabpageFill = { fg = "NONE", bg = "NONE" },
+ BufferVisible = { fg = palette.subtle },
+ BufferVisibleIndex = { fg = palette.subtle },
+ BufferVisibleMod = { fg = palette.foam },
+ BufferVisibleSign = { fg = palette.muted },
+ BufferVisibleTarget = { fg = palette.gold },
+
+ -- lewis6991/gitsigns.nvim
+ GitSignsAdd = { link = "SignAdd" },
+ GitSignsChange = { link = "SignChange" },
+ GitSignsDelete = { link = "SignDelete" },
+ SignAdd = { fg = groups.git_add, bg = "NONE" },
+ SignChange = { fg = groups.git_change, bg = "NONE" },
+ SignDelete = { fg = groups.git_delete, bg = "NONE" },
+
+ -- mvllow/modes.nvim
+ ModesCopy = { bg = palette.gold },
+ ModesDelete = { bg = palette.love },
+ ModesInsert = { bg = palette.foam },
+ ModesVisual = { bg = palette.iris },
+
+ -- kyazdani42/nvim-tree.lua
+ NvimTreeEmptyFolderName = { fg = palette.muted },
+ NvimTreeFileDeleted = { fg = groups.git_delete },
+ NvimTreeFileDirty = { fg = groups.git_dirty },
+ NvimTreeFileMerge = { fg = groups.git_merge },
+ NvimTreeFileNew = { fg = palette.foam },
+ NvimTreeFileRenamed = { fg = groups.git_rename },
+ NvimTreeFileStaged = { fg = groups.git_stage },
+ NvimTreeFolderIcon = { fg = palette.subtle },
+ NvimTreeFolderName = { fg = palette.foam },
+ NvimTreeGitDeleted = { fg = groups.git_delete },
+ NvimTreeGitDirty = { fg = groups.git_dirty },
+ NvimTreeGitIgnored = { fg = groups.git_ignore },
+ NvimTreeGitMerge = { fg = groups.git_merge },
+ NvimTreeGitNew = { fg = groups.git_add },
+ NvimTreeGitRenamed = { fg = groups.git_rename },
+ NvimTreeGitStaged = { fg = groups.git_stage },
+ NvimTreeImageFile = { fg = palette.text },
+ NvimTreeNormal = { link = "Normal" },
+ NvimTreeOpenedFile = { fg = palette.text, bg = palette.overlay },
+ NvimTreeOpenedFolderName = { link = "NvimTreeFolderName" },
+ NvimTreeRootFolder = make_title(),
+ NvimTreeSpecialFile = { link = "NvimTreeNormal" },
+ NvimTreeWindowPicker = { link = "StatusLineTerm" },
+
+ -- nvim-neo-tree/neo-tree.nvim
+ NeoTreeGitAdded = { fg = groups.git_add },
+ NeoTreeGitConflict = { fg = groups.git_merge },
+ NeoTreeGitDeleted = { fg = groups.git_delete },
+ NeoTreeGitIgnored = { fg = groups.git_ignore },
+ NeoTreeGitModified = { fg = groups.git_dirty },
+ NeoTreeGitRenamed = { fg = groups.git_rename },
+ NeoTreeGitUntracked = { fg = groups.git_untracked },
+ NeoTreeTitleBar = { link = "StatusLineTerm" },
+
+ -- folke/which-key.nvim
+ WhichKey = { fg = palette.iris },
+ WhichKeyDesc = { fg = palette.gold },
+ WhichKeyFloat = { bg = groups.panel },
+ WhichKeyGroup = { fg = palette.foam },
+ WhichKeySeparator = { fg = palette.subtle },
+ WhichKeyValue = { fg = palette.rose },
+
+ -- luka-reineke/indent-blankline.nvim
+ IndentBlanklineChar = { fg = palette.muted, nocombine = true },
+ IndentBlanklineSpaceChar = { fg = palette.muted, nocombine = true },
+ IndentBlanklineSpaceCharBlankline = { fg = palette.muted, nocombine = true },
+
+ -- hrsh7th/nvim-cmp
+ CmpItemAbbr = { fg = palette.subtle },
+ CmpItemAbbrDeprecated = { fg = palette.subtle, strikethrough = true },
+ CmpItemAbbrMatch = { fg = palette.text, bold = styles.bold },
+ CmpItemAbbrMatchFuzzy = { fg = palette.text, bold = styles.bold },
+ CmpItemKind = { fg = palette.subtle },
+ CmpItemKindClass = { link = "StorageClass" },
+ CmpItemKindFunction = { link = "Function" },
+ CmpItemKindInterface = { link = "Type" },
+ CmpItemKindMethod = { link = "PreProc" },
+ CmpItemKindSnippet = { link = "String" },
+ CmpItemKindVariable = { link = "Identifier" },
+
+ -- TimUntersberger/neogit
+ NeogitDiffAddHighlight = { link = "DiffAdd" },
+ NeogitDiffContextHighlight = { bg = palette.surface },
+ NeogitDiffDeleteHighlight = { link = "DiffDelete" },
+ NeogitHunkHeader = { bg = groups.panel },
+ NeogitHunkHeaderHighlight = { bg = groups.panel },
+
+ -- vimwiki/vimwiki
+ VimwikiHR = { fg = palette.subtle },
+ VimwikiHeader1 = { link = "markdownH1" },
+ VimwikiHeader2 = { link = "markdownH2" },
+ VimwikiHeader3 = { link = "markdownH3" },
+ VimwikiHeader4 = { link = "markdownH4" },
+ VimwikiHeader5 = { link = "markdownH5" },
+ VimwikiHeader6 = { link = "markdownH6" },
+ VimwikiHeaderChar = { fg = palette.subtle },
+ VimwikiLink = { link = "markdownUrl" },
+ VimwikiList = { fg = palette.iris },
+ VimwikiNoExistsLink = { fg = palette.love },
+
+ -- nvim-neorg/neorg
+ NeorgHeading1Prefix = { link = "markdownH1Delimiter" },
+ NeorgHeading1Title = { link = "markdownH1" },
+ NeorgHeading2Prefix = { link = "markdownH2Delimiter" },
+ NeorgHeading2Title = { link = "markdownH2" },
+ NeorgHeading3Prefix = { link = "markdownH3Delimiter" },
+ NeorgHeading3Title = { link = "markdownH3" },
+ NeorgHeading4Prefix = { link = "markdownH4Delimiter" },
+ NeorgHeading4Title = { link = "markdownH4" },
+ NeorgHeading5Prefix = { link = "markdownH5Delimiter" },
+ NeorgHeading5Title = { link = "markdownH5" },
+ NeorgHeading6Prefix = { link = "markdownH6Delimiter" },
+ NeorgHeading6Title = { link = "markdownH6" },
+ NeorgMarkerTitle = make_title(),
+
+ -- tami5/lspsaga.nvim (fork of glepnir/lspsaga.nvim)
+ DefinitionCount = { fg = palette.rose },
+ DefinitionIcon = { fg = palette.rose },
+ DefintionPreviewTitle = { fg = palette.rose, bold = styles.bold },
+ LspFloatWinBorder = make_border(),
+ LspFloatWinNormal = { bg = groups.panel },
+ LspSagaAutoPreview = { fg = palette.subtle },
+ LspSagaCodeActionBorder = make_border(palette.rose),
+ LspSagaCodeActionContent = { fg = palette.foam },
+ LspSagaCodeActionTitle = { fg = palette.gold, bold = styles.bold },
+ LspSagaCodeActionTruncateLine = { link = "LspSagaCodeActionBorder" },
+ LspSagaDefPreviewBorder = make_border(),
+ LspSagaDiagnosticBorder = make_border(palette.gold),
+ LspSagaDiagnosticHeader = make_title(),
+ LspSagaDiagnosticTruncateLine = { link = "LspSagaDiagnosticBorder" },
+ LspSagaDocTruncateLine = { link = "LspSagaHoverBorder" },
+ LspSagaFinderSelection = { fg = palette.gold },
+ LspSagaHoverBorder = { link = "LspFloatWinBorder" },
+ LspSagaLspFinderBorder = { link = "LspFloatWinBorder" },
+ LspSagaRenameBorder = make_border(palette.pine),
+ LspSagaRenamePromptPrefix = { fg = palette.love },
+ LspSagaShTruncateLine = { link = "LspSagaSignatureHelpBorder" },
+ LspSagaSignatureHelpBorder = make_border(palette.foam),
+ ReferencesCount = { fg = palette.rose },
+ ReferencesIcon = { fg = palette.rose },
+ SagaShadow = { bg = palette.overlay },
+ TargetWord = { fg = palette.iris },
+
+ -- ray-x/lsp_signature.nvim
+ LspSignatureActiveParameter = { bg = palette.overlay },
+
+ -- rlane/pounce.nvim
+ PounceAccept = { fg = palette.love, bg = palette.love, blend = 20 },
+ PounceAcceptBest = { fg = palette.gold, bg = palette.gold, blend = 20 },
+ PounceGap = { link = "Search" },
+ PounceMatch = { link = "Search" },
+
+ -- ggandor/leap.nvim
+ LeapLabelPrimary = { link = "IncSearch" },
+ LeapLabelSecondary = { link = "StatusLineTerm" },
+ LeapMatch = { link = "MatchParen" },
+
+ -- phaazon/hop.nvim
+ -- smoka7/hop.nvim
+ HopNextKey = { fg = palette.love, bg = palette.love, blend = 20 },
+ HopNextKey1 = { fg = palette.foam, bg = palette.foam, blend = 20 },
+ HopNextKey2 = { fg = palette.pine, bg = palette.pine, blend = 20 },
+ HopUnmatched = { fg = palette.muted },
+
+ -- nvim-telescope/telescope.nvim
+ TelescopeBorder = make_border(),
+ TelescopeMatching = { fg = palette.rose },
+ TelescopeNormal = { link = "NormalFloat" },
+ TelescopePromptNormal = { link = "TelescopeNormal" },
+ TelescopePromptPrefix = { fg = palette.subtle },
+ TelescopeSelection = { fg = palette.text, bg = palette.overlay },
+ TelescopeSelectionCaret = { fg = palette.rose, bg = palette.overlay },
+ TelescopeTitle = make_title(),
+
+ -- ibhagwan/fzf-lua
+ FzfLuaNormal = { link = "NormalFloat" },
+ FwzfLuaTitle = make_title(),
+ FzfLuaBorder = make_border(),
+ FzfLuaHeaderText = { fg = palette.love },
+ FzfLuaHeaderBind = { fg = palette.rose },
+ FzfLuaBufFlagCur = { fg = palette.subtle },
+ FzfLuaBufFlagAlt = { fg = palette.subtle },
+
+ -- rcarriga/nvim-notify
+ NotifyDEBUGBorder = make_border(),
+ NotifyDEBUGIcon = { link = "NotifyDEBUGTitle" },
+ NotifyDEBUGTitle = { fg = palette.muted },
+ NotifyERRORBorder = make_border(groups.error),
+ NotifyERRORIcon = { link = "NotifyERRORTitle" },
+ NotifyERRORTitle = { fg = groups.error },
+ NotifyINFOBorder = make_border(groups.info),
+ NotifyINFOIcon = { link = "NotifyINFOTitle" },
+ NotifyINFOTitle = { fg = groups.info },
+ NotifyTRACEBorder = make_border(palette.iris),
+ NotifyTRACEIcon = { link = "NotifyTRACETitle" },
+ NotifyTRACETitle = { fg = palette.iris },
+ NotifyWARNBorder = make_border(groups.warn),
+ NotifyWARNIcon = { link = "NotifyWARNTitle" },
+ NotifyWARNTitle = { fg = groups.warn },
+
+ -- rcarriga/nvim-dap-ui
+ DapUIBreakpointsCurrentLine = { fg = palette.gold, bold = styles.bold },
+ DapUIBreakpointsDisabledLine = { fg = palette.muted },
+ DapUIBreakpointsInfo = { link = "DapUIThread" },
+ DapUIBreakpointsLine = { link = "DapUIBreakpointsPath" },
+ DapUIBreakpointsPath = { fg = palette.foam },
+ DapUIDecoration = { link = "DapUIBreakpointsPath" },
+ DapUIFloatBorder = make_border(),
+ DapUIFrameName = { fg = palette.text },
+ DapUILineNumber = { link = "DapUIBreakpointsPath" },
+ DapUIModifiedValue = { fg = palette.foam, bold = styles.bold },
+ DapUIScope = { link = "DapUIBreakpointsPath" },
+ DapUISource = { fg = palette.iris },
+ DapUIStoppedThread = { link = "DapUIBreakpointsPath" },
+ DapUIThread = { fg = palette.gold },
+ DapUIValue = { fg = palette.text },
+ DapUIVariable = { fg = palette.text },
+ DapUIWatchesEmpty = { fg = palette.love },
+ DapUIWatchesError = { link = "DapUIWatchesEmpty" },
+ DapUIWatchesValue = { link = "DapUIThread" },
+
+ -- glepnir/dashboard-nvim
+ DashboardCenter = { fg = palette.gold },
+ DashboardFooter = { fg = palette.iris },
+ DashboardHeader = { fg = palette.pine },
+ DashboardShortcut = { fg = palette.love },
+
+ -- SmiteshP/nvim-navic
+ NavicIconsArray = { fg = palette.gold },
+ NavicIconsBoolean = { fg = palette.rose },
+ NavicIconsClass = { fg = palette.foam },
+ NavicIconsConstant = { fg = palette.gold },
+ NavicIconsConstructor = { fg = palette.gold },
+ NavicIconsEnum = { fg = palette.gold },
+ NavicIconsEnumMember = { fg = palette.foam },
+ NavicIconsEvent = { fg = palette.gold },
+ NavicIconsField = { fg = palette.foam },
+ NavicIconsFile = { fg = palette.muted },
+ NavicIconsFunction = { fg = palette.pine },
+ NavicIconsInterface = { fg = palette.foam },
+ NavicIconsKey = { fg = palette.iris },
+ NavicIconsKeyword = { fg = palette.pine },
+ NavicIconsMethod = { fg = palette.iris },
+ NavicIconsModule = { fg = palette.rose },
+ NavicIconsNamespace = { fg = palette.muted },
+ NavicIconsNull = { fg = palette.love },
+ NavicIconsNumber = { fg = palette.gold },
+ NavicIconsObject = { fg = palette.gold },
+ NavicIconsOperator = { fg = palette.subtle },
+ NavicIconsPackage = { fg = palette.muted },
+ NavicIconsProperty = { fg = palette.foam },
+ NavicIconsString = { fg = palette.gold },
+ NavicIconsStruct = { fg = palette.foam },
+ NavicIconsTypeParameter = { fg = palette.foam },
+ NavicIconsVariable = { fg = palette.text },
+ NavicSeparator = { fg = palette.subtle },
+ NavicText = { fg = palette.subtle },
+
+ -- folke/noice.nvim
+ NoiceCursor = { fg = palette.highlight_high, bg = palette.text },
+
+ -- echasnovski/mini.indentscope
+ MiniIndentscopeSymbol = { fg = palette.muted },
+ MiniIndentscopeSymbolOff = { fg = palette.muted },
+
+ -- goolord/alpha-nvim
+ AlphaButtons = { fg = palette.foam },
+ AlphaFooter = { fg = palette.gold },
+ AlphaHeader = { fg = palette.pine },
+ AlphaShortcut = { fg = palette.rose },
+
+ -- github/copilot.vim
+ CopilotSuggestion = { fg = palette.muted, italic = styles.italic },
+ }
+
+ local transparency_highlights = {
+ DiagnosticVirtualTextError = { fg = groups.error },
+ DiagnosticVirtualTextHint = { fg = groups.hint },
+ DiagnosticVirtualTextInfo = { fg = groups.info },
+ DiagnosticVirtualTextWarn = { fg = groups.warn },
+
+ FloatBorder = { fg = palette.muted, bg = "NONE" },
+ Folded = { fg = palette.text, bg = "NONE" },
+ NormalFloat = { bg = "NONE" },
+ NormalNC = { fg = palette.text, bg = config.options.dim_inactive_windows and palette._nc or "NONE" },
+ Pmenu = { fg = palette.subtle, bg = "NONE" },
+ PmenuKind = { fg = palette.foam, bg = "NONE" },
+ SignColumn = { fg = palette.text, bg = "NONE" },
+ StatusLine = { fg = palette.subtle, bg = "NONE" },
+ StatusLineNC = { fg = palette.muted, bg = "NONE" },
+ TabLineFill = { bg = "NONE" },
+ TabLineSel = { fg = palette.text, bg = "NONE", bold = styles.bold },
+
+ TelescopeNormal = { fg = palette.subtle, bg = "NONE" },
+ TelescopePromptNormal = { fg = palette.text, bg = "NONE" },
+ TelescopeSelection = { fg = palette.text, bg = "NONE", bold = styles.bold },
+ TelescopeSelectionCaret = { fg = palette.rose, bg = palette.rose },
+
+ WhichKeyFloat = { bg = "NONE" },
+ }
+
+ if styles.transparency then
+ for group, highlight in pairs(transparency_highlights) do
+ highlights[group] = highlight
+ end
+ end
+
+ for group, options in pairs(config.options.highlight_groups) do
+ highlights[group] = vim.tbl_extend("force", highlights[group] or {}, options)
+ end
+
+ for group, highlight in pairs(highlights) do
+ config.options.before_highlight(group, highlight, palette)
+ utilities.highlight(group, highlight)
+ end
+
+ if config.options.enable.terminal then
+ vim.g.terminal_color_0 = palette.overlay -- black
+ vim.g.terminal_color_8 = palette.subtle -- bright black
+ vim.g.terminal_color_1 = palette.love -- red
+ vim.g.terminal_color_9 = palette.love -- bright red
+ vim.g.terminal_color_2 = palette.pine -- green
+ vim.g.terminal_color_10 = palette.pine -- bright green
+ vim.g.terminal_color_3 = palette.gold -- yellow
+ vim.g.terminal_color_11 = palette.gold -- bright yellow
+ vim.g.terminal_color_4 = palette.foam -- blue
+ vim.g.terminal_color_12 = palette.foam -- bright blue
+ vim.g.terminal_color_5 = palette.iris -- magenta
+ vim.g.terminal_color_13 = palette.iris -- bright magenta
+ vim.g.terminal_color_6 = palette.rose -- cyan
+ vim.g.terminal_color_14 = palette.rose -- bright cyan
+ vim.g.terminal_color_7 = palette.text -- white
+ vim.g.terminal_color_15 = palette.text -- bright white
+
+ -- Support StatusLineTerm & StatusLineTermNC from vim
+ vim.cmd([[
+ autocmd TermOpen * if &buftype=='terminal'
+ \|setlocal winhighlight=StatusLine:StatusLineTerm,StatusLineNC:StatusLineTermNC
+ \|else|setlocal winhighlight=|endif
+ ]])
+ end
+end
+
+---@param variant Variant | nil
function M.colorscheme(variant)
- config.extend({ variant = variant })
+ config.extend_options({ variant = variant })
vim.opt.termguicolors = true
if vim.g.colors_name then
- vim.cmd('hi clear')
- vim.cmd('syntax reset')
+ vim.cmd("hi clear")
+ vim.cmd("syntax reset")
end
- vim.g.colors_name = 'rose-pine'
+ vim.g.colors_name = "rose-pine"
- require('rose-pine.theme')._load(config.options)
+ set_highlights()
end
+---@param options Options
function M.setup(options)
- config.extend(options)
+ config.extend_options(options or {})
end
return M
diff --git a/lua/rose-pine/config.lua b/lua/rose-pine/config.lua
index 58674d7..6fc0774 100644
--- a/lua/rose-pine/config.lua
+++ b/lua/rose-pine/config.lua
@@ -1,68 +1,156 @@
---@alias Variant "main" | "moon" | "dawn"
----@alias Color { fg: string, bg: string, sp: string, bold: boolean, italic: boolean, undercurl: boolean, underline: boolean, underdouble: boolean, underdotted: boolean, underdashed: boolean, strikethrough: boolean }
+---@alias Palette { base: string, surface: string, overlay: string, muted: string, subtle: string, text: string, love: string, gold: string, rose: string, pine: string, foam: string, iris: string }
+---@alias PaletteColor "base" | "surface" | "overlay" | "muted" | "subtle" | "text" | "love" | "gold" | "rose" | "pine" | "foam" | "iris" | "highlight_low" | "highlight_med" | "highlight_high"
+---@alias Highlight { fg: string, bg: string, sp: string, bold: boolean, italic: boolean, undercurl: boolean, underline: boolean, underdouble: boolean, underdotted: boolean, underdashed: boolean, strikethrough: boolean }
-local M = {}
+local config = {}
---@class Options
-M.options = {
+config.options = {
---Set the desired variant: "auto" will follow the vim background,
- ---defaulting to "main" for dark and "dawn" for light. To change the dark
- ---variant, use `options.dark_variant = "moon"`.
+ ---defaulting to `dark_variant` or "main" for dark and "dawn" for light.
---@type "auto" | Variant
- variant = 'auto',
+ variant = "auto",
- ---Set the desired dark variant: applies when `options.variant` is set to
- ---"auto" to match `vim.o.background`.
+ ---Set the desired dark variant when `options.variant` is set to "auto".
---@type Variant
- dark_variant = 'main',
+ dark_variant = "main",
- bold_vert_split = false,
+ ---Differentiate between active and inactive windows and panels.
+ dim_inactive_windows = false,
- dim_nc_background = false,
+ ---Extend background behind borders. Appearance differs based on which
+ ---border characters you are using.
+ extend_background_behind_borders = false,
- disable_background = false,
- disable_float_background = false,
- disable_italics = false,
-
- groups = {
- background = 'base',
- background_nc = 'nc',
- panel = 'surface',
- panel_nc = 'base',
- 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',
- },
+ enable = {
+ terminal = true,
+ migrations = true,
},
- ---@type table
+ styles = {
+ bold = true,
+ italic = true,
+ transparency = false,
+ },
+
+ ---@type table
+ groups = {
+ border = "muted",
+ link = "iris",
+ panel = "surface",
+
+ 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",
+ git_untracked = "subtle",
+
+ ---@type string | PaletteColor | table
+ headings = {
+ h1 = "iris",
+ h2 = "foam",
+ h3 = "rose",
+ h4 = "gold",
+ h5 = "pine",
+ h6 = "foam",
+ },
+
+ ---@deprecated Replaced by `options.highlight_groups["Normal"]`
+ -- background = "base",
+ ---@deprecated Replaced by `options.highlight_groups["Comment"]`
+ -- comment = "subtle",
+ ---@deprecated Replaced by `options.highlight_groups["@punctuation"]`
+ -- punctuation = "muted",
+ },
+
+ ---@type table
highlight_groups = {},
+
+ ---Called before each highlight group, before setting the highlight.
+ ---@param group string
+ ---@param highlight Highlight
+ ---@param palette Palette
+ ---@diagnostic disable-next-line: unused-local
+ before_highlight = function(group, highlight, palette) end,
+
+ ---@deprecated Replaced by `options.dim_inactive_windows`
+ -- dim_nc_background = false,
+ ---@deprecated Replaced by `options.enable.transparency`
+ -- disable_background = false,
+ ---@deprecated Replaced by `options.highlight_groups["NormalFloat"]`
+ -- disable_float_background = false,
+ ---@deprecated Replaced by `options.styles.italic`
+ -- disable_italics = false,
+ ---@deprecated Replaced by `options.highlight_groups`
+ -- bold_vert_split = false
}
----@param options Options|nil
-function M.extend(options)
- M.options = vim.tbl_deep_extend('force', M.options, options or {})
+local function migrate(options)
+ if options.bold_vert_split then
+ options.highlight_groups["VertSplit"] = { fg = "muted", bg = "muted" }
+ end
+
+ if options.disable_float_background then
+ options.highlight_groups["NormalFloat"] = { bg = "NONE" }
+ end
+
+ options.dim_inactive_windows = options.dim_nc_background or options.dim_inactive_windows
+
+ if options.groups.background ~= nil then
+ options.highlight_groups["Normal"] = { bg = options.groups.background }
+ end
+
+ if options.groups.comment ~= nil then
+ options.highlight_groups["Comment"] = { fg = options.groups.comment }
+ end
+
+ if options.groups.punctuation ~= nil then
+ options.highlight_groups["@punctuation"] = { fg = options.groups.punctuation }
+ end
+
+ options.styles.transparency = options.disable_background or options.styles.transparency
+
+ -- These never actually existed, but may be set intuitively by the user
+ -- because of `disable_italics` existing.
+ options.styles.bold = (options.disable_bold or options.disable_bolds) and false or options.styles.bold
+
+ -- Similar to bold options, `disable_italic` never existed but could be a
+ -- common typo of the actual `disable_italics`.
+ options.styles.italic = (options.disable_italic or options.disable_italics) and false or options.styles.italic
+
+ -- Set h1 through h6 to the same color if only one is specified
+ if type(options.groups.headings) == "string" then
+ options.groups.headings = {
+ h1 = options.groups.headings,
+ h2 = options.groups.headings,
+ h3 = options.groups.headings,
+ h4 = options.groups.headings,
+ h5 = options.groups.headings,
+ h6 = options.groups.headings,
+ }
+ end
+
+ return options
end
-return M
+---@param options Options | nil
+function config.extend_options(options)
+ config.options = vim.tbl_deep_extend("force", config.options, options or {})
+
+ if config.options.enable.migrations then
+ config.options = migrate(config.options)
+ end
+end
+
+return config
diff --git a/lua/rose-pine/palette.lua b/lua/rose-pine/palette.lua
index 66d6438..6b49f68 100644
--- a/lua/rose-pine/palette.lua
+++ b/lua/rose-pine/palette.lua
@@ -1,68 +1,58 @@
-local options = require('rose-pine.config').options
-
+local options = require("rose-pine.config").options
local variants = {
main = {
- ---@deprecated for backwards compatibility
- _experimental_nc = '#16141f',
- nc = '#16141f',
- base = '#191724',
- surface = '#1f1d2e',
- overlay = '#26233a',
- muted = '#6e6a86',
- subtle = '#908caa',
- text = '#e0def4',
- love = '#eb6f92',
- gold = '#f6c177',
- rose = '#ebbcba',
- pine = '#31748f',
- foam = '#9ccfd8',
- iris = '#c4a7e7',
- highlight_low = '#21202e',
- highlight_med = '#403d52',
- highlight_high = '#524f67',
- none = 'NONE',
+ _nc = "#16141f",
+ base = "#191724",
+ surface = "#1f1d2e",
+ overlay = "#26233a",
+ muted = "#6e6a86",
+ subtle = "#908caa",
+ text = "#e0def4",
+ love = "#eb6f92",
+ gold = "#f6c177",
+ rose = "#ebbcba",
+ pine = "#3e8fb0",
+ foam = "#9ccfd8",
+ iris = "#c4a7e7",
+ highlight_low = "#21202e",
+ highlight_med = "#403d52",
+ highlight_high = "#524f67",
},
moon = {
- ---@deprecated for backwards compatibility
- _experimental_nc = '#1f1d30',
- nc = '#1f1d30',
- base = '#232136',
- surface = '#2a273f',
- overlay = '#393552',
- muted = '#6e6a86',
- subtle = '#908caa',
- text = '#e0def4',
- love = '#eb6f92',
- gold = '#f6c177',
- rose = '#ea9a97',
- pine = '#3e8fb0',
- foam = '#9ccfd8',
- iris = '#c4a7e7',
- highlight_low = '#2a283e',
- highlight_med = '#44415a',
- highlight_high = '#56526e',
- none = 'NONE',
+ _nc = "#1f1d30",
+ base = "#232136",
+ surface = "#2a273f",
+ overlay = "#393552",
+ muted = "#6e6a86",
+ subtle = "#908caa",
+ text = "#e0def4",
+ love = "#eb6f92",
+ gold = "#f6c177",
+ rose = "#ea9a97",
+ pine = "#3e8fb0",
+ foam = "#9ccfd8",
+ iris = "#c4a7e7",
+ highlight_low = "#2a283e",
+ highlight_med = "#44415a",
+ highlight_high = "#56526e",
},
dawn = {
- ---@deprecated for backwards compatibility
- _experimental_nc = '#f8f0e7',
- nc = '#f8f0e7',
- base = '#faf4ed',
- surface = '#fffaf3',
- overlay = '#f2e9e1',
- muted = '#9893a5',
- subtle = '#797593',
- text = '#575279',
- love = '#b4637a',
- gold = '#ea9d34',
- rose = '#d7827e',
- pine = '#286983',
- foam = '#56949f',
- iris = '#907aa9',
- highlight_low = '#f4ede8',
- highlight_med = '#dfdad9',
- highlight_high = '#cecacd',
- none = 'NONE',
+ _nc = "#f8f0e7",
+ base = "#faf4ed",
+ surface = "#fffaf3",
+ overlay = "#f2e9e1",
+ muted = "#9893a5",
+ subtle = "#797593",
+ text = "#464261",
+ love = "#b4637a",
+ gold = "#ea9d34",
+ rose = "#d7827e",
+ pine = "#286983",
+ foam = "#56949f",
+ iris = "#907aa9",
+ highlight_low = "#f4ede8",
+ highlight_med = "#dfdad9",
+ highlight_high = "#cecacd",
},
}
@@ -70,5 +60,4 @@ if variants[options.variant] ~= nil then
return variants[options.variant]
end
-return vim.o.background == 'light' and variants.dawn
- or variants[options.dark_variant or 'main']
+return vim.o.background == "light" and variants.dawn or variants[options.dark_variant or "main"]
diff --git a/lua/rose-pine/plugins/bufferline.lua b/lua/rose-pine/plugins/bufferline.lua
index 1a5eaac..9f85ccd 100644
--- a/lua/rose-pine/plugins/bufferline.lua
+++ b/lua/rose-pine/plugins/bufferline.lua
@@ -5,7 +5,7 @@
--- local highlights = require('rose-pine.plugins.bufferline')
--- require('bufferline').setup({ highlights = highlights })
-local p = require('rose-pine.palette')
+local p = require("rose-pine.palette")
return {
-- fill = {
diff --git a/lua/rose-pine/plugins/galaxyline.lua b/lua/rose-pine/plugins/galaxyline.lua
index 348559a..f2c01ab 100644
--- a/lua/rose-pine/plugins/galaxyline.lua
+++ b/lua/rose-pine/plugins/galaxyline.lua
@@ -4,7 +4,7 @@
--- @usage
--- local highlights = require('rose-pine.plugins.galaxyline')
-local p = require('rose-pine.palette')
+local p = require("rose-pine.palette")
return {
bg = p.surface,
diff --git a/lua/rose-pine/plugins/markid.lua b/lua/rose-pine/plugins/markid.lua
index 9279adb..2a7b273 100644
--- a/lua/rose-pine/plugins/markid.lua
+++ b/lua/rose-pine/plugins/markid.lua
@@ -5,6 +5,6 @@
--- local highlights = require('rose-pine.plugins.markid')
--- require("nvim-treesitter.configs").setup({ markid = { enable = true, colors = highlights } })
-local p = require('rose-pine.palette')
+local p = require("rose-pine.palette")
return { p.foam, p.rose, p.iris }
diff --git a/lua/rose-pine/plugins/toggleterm.lua b/lua/rose-pine/plugins/toggleterm.lua
index 38924f9..87b0abc 100644
--- a/lua/rose-pine/plugins/toggleterm.lua
+++ b/lua/rose-pine/plugins/toggleterm.lua
@@ -6,10 +6,10 @@
--- require('toggleterm').setup({ highlights = highlights })
return {
- Normal = { link = 'Normal' },
- NormalFloat = { link = 'Normal' },
- FloatBorder = { link = 'FloatBorder' },
- SignColumn = { link = 'SignColumn' },
- StatusLine = { link = 'StatusLine' },
- StatusLineNC = { link = 'StatusLineNC' },
+ Normal = { link = "Normal" },
+ NormalFloat = { link = "Normal" },
+ FloatBorder = { link = "FloatBorder" },
+ SignColumn = { link = "SignColumn" },
+ StatusLine = { link = "StatusLine" },
+ StatusLineNC = { link = "StatusLineNC" },
}
diff --git a/lua/rose-pine/theme.lua b/lua/rose-pine/theme.lua
deleted file mode 100644
index d5e4faf..0000000
--- a/lua/rose-pine/theme.lua
+++ /dev/null
@@ -1,629 +0,0 @@
-local M = {}
-
----@param options Options
-function M._load(options)
- local h = require('rose-pine.util').highlight
- local p = require('rose-pine.palette')
-
- local groups = options.groups or {}
- local maybe = {
- base = (options.disable_background and p.none) or groups.background,
- surface = (options.disable_float_background and p.none) or groups.panel,
- italic = not options.disable_italics,
- }
- maybe.bold_vert_split = (options.bold_vert_split and groups.border)
- or p.none
- maybe.dim_nc_background = (
- options.dim_nc_background and groups.background_nc
- ) or maybe.base
-
- local float_background = options.dim_nc_background
- and (options.disable_float_background and groups.panel_nc or groups.panel)
- or maybe.surface
-
- M.defaults = {
- ['ColorColumn'] = { bg = p.overlay },
- ['Conceal'] = { bg = p.none },
- ['CurSearch'] = { link = 'IncSearch' },
- ['Cursor'] = { fg = p.text, bg = p.highlight_high },
- ['CursorColumn'] = { bg = p.highlight_low },
- -- CursorIM = {},
- ['CursorLine'] = { bg = p.highlight_low },
- ['CursorLineNr'] = { fg = p.text },
- ['DarkenedPanel'] = { bg = maybe.surface },
- ['DarkenedStatusline'] = { bg = maybe.surface },
- ['DiffAdd'] = { bg = groups.git_add, blend = 20 },
-
- ['DiffChange'] = { bg = p.overlay },
- ['DiffDelete'] = { bg = groups.git_delete, blend = 20 },
- ['DiffText'] = { bg = groups.git_text, blend = 20 },
- ['diffAdded'] = { link = 'DiffAdd' },
- ['diffChanged'] = { link = 'DiffChange' },
- ['diffRemoved'] = { link = 'DiffDelete' },
- ['Directory'] = { fg = p.foam, bg = p.none },
- -- EndOfBuffer = {},
- ['ErrorMsg'] = { fg = p.love, bold = true },
- ['FloatBorder'] = { fg = groups.border, bg = maybe.surface },
- ['FloatTitle'] = { fg = p.muted },
- ['FoldColumn'] = { fg = p.muted },
- ['Folded'] = { fg = p.text, bg = maybe.surface },
- ['IncSearch'] = { fg = groups.background, bg = p.rose },
- ['LineNr'] = { fg = p.muted },
- ['MatchParen'] = { fg = p.text, bg = p.highlight_med },
- ['ModeMsg'] = { fg = p.subtle },
- ['MoreMsg'] = { fg = p.iris },
- ['NonText'] = { fg = p.muted },
- ['Normal'] = { fg = p.text, bg = maybe.base },
- ['NormalFloat'] = { fg = p.text, bg = maybe.surface },
- ['NormalNC'] = { fg = p.text, bg = maybe.dim_nc_background },
- ['NvimInternalError'] = { fg = '#ffffff', bg = p.love },
- ['Pmenu'] = { fg = p.subtle, bg = maybe.surface },
- ['PmenuSbar'] = { bg = p.highlight_low },
- ['PmenuSel'] = { fg = p.text, bg = p.overlay },
- ['PmenuThumb'] = { bg = p.highlight_med },
- ['Question'] = { fg = p.gold },
- -- QuickFixLine = {},
- -- RedrawDebugNormal = {}
- ['RedrawDebugClear'] = { fg = '#ffffff', bg = p.gold },
- ['RedrawDebugComposed'] = { fg = '#ffffff', bg = p.pine },
- ['RedrawDebugRecompose'] = { fg = '#ffffff', bg = p.love },
- ['Search'] = { bg = p.highlight_med },
- ['SpecialKey'] = { fg = p.foam },
- ['SpellBad'] = { sp = p.subtle, undercurl = true },
- ['SpellCap'] = { sp = p.subtle, undercurl = true },
- ['SpellLocal'] = { sp = p.subtle, undercurl = true },
- ['SpellRare'] = { sp = p.subtle, undercurl = true },
- ['SignColumn'] = {
- fg = p.text,
- bg = (options.dim_nc_background and p.none) or maybe.base,
- },
- ['Substitute'] = { fg = p.base, bg = p.love },
- ['StatusLine'] = { fg = p.subtle, bg = groups.panel },
- ['StatusLineNC'] = { fg = p.muted, bg = groups.panel_nc },
- ['StatusLineTerm'] = { link = 'StatusLine' },
- ['StatusLineTermNC'] = { link = 'StatusLineNC' },
- ['TabLine'] = { fg = p.subtle, bg = groups.panel },
- ['TabLineFill'] = { bg = groups.panel },
- ['TabLineSel'] = { fg = p.text, bg = p.overlay },
- ['Title'] = { fg = p.text },
- ['VertSplit'] = { fg = groups.border, bg = maybe.bold_vert_split },
- ['Visual'] = { bg = p.highlight_med },
- -- VisualNOS = {},
- ['WarningMsg'] = { fg = p.gold },
- -- Whitespace = {},
- ['WildMenu'] = { link = 'IncSearch' },
-
- ['Boolean'] = { fg = p.rose },
- ['Character'] = { fg = p.gold },
- ['Comment'] = { fg = groups.comment, italic = maybe.italic },
- ['Conditional'] = { fg = p.pine },
- ['Constant'] = { fg = p.gold },
- ['Debug'] = { fg = p.rose },
- ['Define'] = { fg = p.iris },
- ['Delimiter'] = { fg = p.subtle },
- ['Error'] = { fg = p.love },
- ['Exception'] = { fg = p.pine },
- ['Float'] = { fg = p.gold },
- ['Function'] = { fg = p.rose },
- ['Identifier'] = { fg = p.rose },
- -- Ignore = {},
- ['Include'] = { fg = p.pine },
- ['Keyword'] = { fg = p.pine },
- ['Label'] = { fg = p.foam },
- ['Macro'] = { fg = p.iris },
- ['Number'] = { fg = p.gold },
- ['Operator'] = { fg = p.subtle },
- ['PreCondit'] = { fg = p.iris },
- ['PreProc'] = { fg = p.iris },
- ['Repeat'] = { fg = p.pine },
- ['Special'] = { fg = p.rose },
- ['SpecialChar'] = { fg = p.rose },
- ['SpecialComment'] = { fg = p.iris },
- ['Statement'] = { fg = p.pine },
- ['StorageClass'] = { fg = p.foam },
- ['String'] = { fg = p.gold },
- ['Structure'] = { fg = p.foam },
- ['Tag'] = { fg = p.foam },
- ['Todo'] = { fg = p.iris },
- ['Type'] = { fg = p.foam },
- ['Typedef'] = { link = 'Type' },
- ['Underlined'] = { underline = true },
-
- ['htmlArg'] = { fg = p.iris },
- ['htmlBold'] = { bold = true },
- ['htmlEndTag'] = { fg = p.subtle },
- ['htmlH1'] = { fg = groups.headings.h1, bold = true },
- ['htmlH2'] = { fg = groups.headings.h2, bold = true },
- ['htmlH3'] = { fg = groups.headings.h3, bold = true },
- ['htmlH4'] = { fg = groups.headings.h4, bold = true },
- ['htmlH5'] = { fg = groups.headings.h5, bold = true },
- ['htmlItalic'] = { italic = maybe.italic },
- ['htmlLink'] = { fg = groups.link },
- ['htmlTag'] = { fg = p.subtle },
- ['htmlTagN'] = { fg = p.text },
- ['htmlTagName'] = { fg = p.foam },
-
- ['markdownDelimiter'] = { fg = p.subtle },
- ['markdownH1'] = { fg = groups.headings.h1, bold = true },
- ['markdownH1Delimiter'] = { link = 'markdownH1' },
- ['markdownH2'] = { fg = groups.headings.h2, bold = true },
- ['markdownH2Delimiter'] = { link = 'markdownH2' },
- ['markdownH3'] = { fg = groups.headings.h3, bold = true },
- ['markdownH3Delimiter'] = { link = 'markdownH3' },
- ['markdownH4'] = { fg = groups.headings.h4, bold = true },
- ['markdownH4Delimiter'] = { link = 'markdownH4' },
- ['markdownH5'] = { fg = groups.headings.h5, bold = true },
- ['markdownH5Delimiter'] = { link = 'markdownH5' },
- ['markdownH6'] = { fg = groups.headings.h6, bold = true },
- ['markdownH6Delimiter'] = { link = 'markdownH6' },
- ['markdownLinkText'] = { fg = groups.link, sp = groups.link, underline = true },
- ['markdownUrl'] = { link = 'markdownLinkText' },
-
- ['mkdCode'] = { fg = p.foam, italic = maybe.italic },
- ['mkdCodeDelimiter'] = { fg = p.rose },
- ['mkdCodeEnd'] = { fg = p.foam },
- ['mkdCodeStart'] = { fg = p.foam },
- ['mkdFootnotes'] = { fg = p.foam },
- ['mkdID'] = { fg = p.foam, underline = true },
- ['mkdInlineURL'] = { fg = groups.link, underline = true },
- ['mkdLink'] = { link = 'mkdInlineURL' },
- ['mkdLinkDef'] = { link = 'mkdInlineURL' },
- ['mkdListItemLine'] = { fg = p.text },
- ['mkdRule'] = { fg = p.subtle },
- ['mkdURL'] = { link = 'mkdInlineURL' },
-
- ['DiagnosticError'] = { fg = groups.error },
- ['DiagnosticHint'] = { fg = groups.hint },
- ['DiagnosticInfo'] = { fg = groups.info },
- ['DiagnosticWarn'] = { fg = groups.warn },
- ['DiagnosticDefaultError'] = { fg = groups.error },
- ['DiagnosticDefaultHint'] = { fg = groups.hint },
- ['DiagnosticDefaultInfo'] = { fg = groups.info },
- ['DiagnosticDefaultWarn'] = { fg = groups.warn },
- ['DiagnosticFloatingError'] = { fg = groups.error },
- ['DiagnosticFloatingHint'] = { fg = groups.hint },
- ['DiagnosticFloatingInfo'] = { fg = groups.info },
- ['DiagnosticFloatingWarn'] = { fg = groups.warn },
- ['DiagnosticSignError'] = { fg = groups.error },
- ['DiagnosticSignHint'] = { fg = groups.hint },
- ['DiagnosticSignInfo'] = { fg = groups.info },
- ['DiagnosticSignWarn'] = { fg = groups.warn },
- ['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, undercurl = true },
- ['DiagnosticUnderlineHint'] = { sp = groups.hint, undercurl = true },
- ['DiagnosticUnderlineInfo'] = { sp = groups.info, undercurl = true },
- ['DiagnosticUnderlineWarn'] = { sp = groups.warn, undercurl = true },
- ['DiagnosticVirtualTextError'] = { fg = groups.error },
- ['DiagnosticVirtualTextHint'] = { fg = groups.hint },
- ['DiagnosticVirtualTextInfo'] = { fg = groups.info },
- ['DiagnosticVirtualTextWarn'] = { fg = groups.warn },
-
- -- healthcheck
- ['healthError'] = { fg = groups.error },
- ['healthSuccess'] = { fg = groups.info },
- ['healthWarning'] = { fg = groups.warn },
-
- -- Treesitter
- ['@boolean'] = { link = 'Boolean' },
- ['@character'] = { link = 'Character' },
- ['@character.special'] = { link = '@character' },
- ['@class'] = { fg = p.foam },
- ['@comment'] = { link = 'Comment' },
- ['@conditional'] = { link = 'Conditional' },
- ['@constant'] = { link = 'Constant' },
- ['@constant.builtin'] = { fg = p.love },
- ['@constant.macro'] = { link = '@constant' },
- ['@constructor'] = { fg = p.foam },
- ['@field'] = { fg = p.foam },
- ['@function'] = { link = 'Function' },
- ['@function.builtin'] = { fg = p.love },
- ['@function.macro'] = { link = '@function' },
- ['@include'] = { link = 'Include' },
- ['@interface'] = { fg = p.foam },
- ['@keyword'] = { link = 'Keyword' },
- ['@keyword.operator'] = { fg = p.subtle },
- ['@label'] = { link = 'Label' },
- ['@macro'] = { link = 'Macro' },
- ['@method'] = { fg = p.rose },
- ['@number'] = { link = 'Number' },
- ['@operator'] = { link = 'Operator' },
- ['@parameter'] = { fg = p.iris, italic = maybe.italic },
- ['@preproc'] = { link = 'PreProc' },
- ['@property'] = { fg = p.foam, italic = maybe.italic },
- ['@punctuation'] = { fg = groups.punctuation },
- ['@punctuation.bracket'] = { link = '@punctuation' },
- ['@punctuation.delimiter'] = { link = '@punctuation' },
- ['@punctuation.special'] = { link = '@punctuation' },
- ['@regexp'] = { link = 'String' },
- ['@repeat'] = { link = 'Repeat' },
- ['@storageclass'] = { link = 'StorageClass' },
- ['@string'] = { link = 'String' },
- ['@string.escape'] = { fg = p.pine },
- ['@string.special'] = { link = '@string' },
- ['@symbol'] = { link = 'Identifier' },
- ['@tag'] = { link = 'Tag' },
- ['@tag.attribute'] = { fg = p.iris },
- ['@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'] = { link = 'Title' },
- ['@text.uri'] = { fg = groups.link },
- ['@text.note'] = { link = 'SpecialComment' },
- ['@text.warning'] = { fg = groups.warn },
- ['@text.danger'] = { fg = groups.error },
- ['@todo'] = { link = 'Todo' },
- ['@type'] = { link = 'Type' },
- ['@variable'] = { fg = p.text, italic = maybe.italic },
- ['@variable.builtin'] = { fg = p.love },
- ['@namespace'] = { link = '@include' },
-
- -- LSP Semantic Token Groups
- ['@lsp.type.comment'] = {},
- ['@lsp.type.enum'] = { link = '@type' },
- ['@lsp.type.keyword'] = { link = '@keyword' },
- ['@lsp.type.interface'] = { link = '@interface' },
- ['@lsp.type.namespace'] = { link = '@namespace' },
- ['@lsp.type.parameter'] = { link = '@parameter' },
- ['@lsp.type.property'] = { link = '@property' },
- ['@lsp.type.variable'] = {}, -- use treesitter styles for regular variables
- ['@lsp.typemod.function.defaultLibrary'] = { link = 'Special' },
- ['@lsp.typemod.variable.defaultLibrary'] = { link = '@variable.builtin' },
-
- -- LSP Injected Groups
- ['@lsp.typemod.operator.injected'] = { link = '@operator' },
- ['@lsp.typemod.string.injected'] = { link = '@string' },
- ['@lsp.typemod.variable.injected'] = { link = '@variable' },
-
- -- nvim-treesitter Markdown Headings
- ['@text.title.1.markdown'] = { link = 'markdownH1' },
- ['@text.title.1.marker.markdown'] = { link = 'markdownH1Delimiter' },
- ['@text.title.2.markdown'] = { link = 'markdownH2' },
- ['@text.title.2.marker.markdown'] = { link = 'markdownH2Delimiter' },
- ['@text.title.3.markdown'] = { link = 'markdownH3' },
- ['@text.title.3.marker.markdown'] = { link = 'markdownH3Delimiter' },
- ['@text.title.4.markdown'] = { link = 'markdownH4' },
- ['@text.title.4.marker.markdown'] = { link = 'markdownH4Delimiter' },
- ['@text.title.5.markdown'] = { link = 'markdownH5' },
- ['@text.title.5.marker.markdown'] = { link = 'markdownH5Delimiter' },
- ['@text.title.6.markdown'] = { link = 'markdownH6' },
- ['@text.title.6.marker.markdown'] = { link = 'markdownH6Delimiter' },
-
- -- vim.lsp.buf.document_highlight()
- ['LspReferenceText'] = { bg = p.highlight_med },
- ['LspReferenceRead'] = { bg = p.highlight_med },
- ['LspReferenceWrite'] = { bg = p.highlight_med },
-
- -- lsp-highlight-codelens
- ['LspCodeLens'] = { fg = p.subtle }, -- virtual text of code len
- ['LspCodeLensSeparator'] = { fg = p.highlight_high }, -- separator between two or more code len
-
- -- romgrk/barbar.nvim
- ['BufferCurrent'] = { fg = p.text, bg = p.overlay },
- ['BufferCurrentIndex'] = { fg = p.text, bg = p.overlay },
- ['BufferCurrentMod'] = { fg = p.foam, bg = p.overlay },
- ['BufferCurrentSign'] = { fg = p.subtle, bg = p.overlay },
- ['BufferCurrentTarget'] = { fg = p.gold, bg = p.overlay },
- ['BufferInactive'] = { fg = p.subtle },
- ['BufferInactiveIndex'] = { fg = p.subtle },
- ['BufferInactiveMod'] = { fg = p.foam },
- ['BufferInactiveSign'] = { fg = p.muted },
- ['BufferInactiveTarget'] = { fg = p.gold },
- ['BufferTabpageFill'] = { fg = groups.background, bg = groups.background },
- ['BufferVisible'] = { fg = p.subtle },
- ['BufferVisibleIndex'] = { fg = p.subtle },
- ['BufferVisibleMod'] = { fg = p.foam },
- ['BufferVisibleSign'] = { fg = p.muted },
- ['BufferVisibleTarget'] = { fg = p.gold },
-
- -- lewis6991/gitsigns.nvim
- ['GitSignsAdd'] = { fg = groups.git_add, bg = groups.background },
- ['GitSignsChange'] = { fg = groups.git_change, bg = groups.background },
- ['GitSignsDelete'] = { fg = groups.git_delete, bg = groups.background },
- ['SignAdd'] = { link = 'GitSignsAdd' },
- ['SignChange'] = { link = 'GitSignsChange' },
- ['SignDelete'] = { link = 'GitSignsDelete' },
-
- -- mvllow/modes.nvim
- ['ModesCopy'] = { bg = p.gold },
- ['ModesDelete'] = { bg = p.love },
- ['ModesInsert'] = { bg = p.foam },
- ['ModesVisual'] = { bg = p.iris },
-
- -- kyazdani42/nvim-tree.lua
- ['NvimTreeEmptyFolderName'] = { fg = p.muted },
- ['NvimTreeFileDeleted'] = { fg = p.love },
- ['NvimTreeFileDirty'] = { fg = p.rose },
- ['NvimTreeFileMerge'] = { fg = p.iris },
- ['NvimTreeFileNew'] = { fg = p.foam },
- ['NvimTreeFileRenamed'] = { fg = p.pine },
- ['NvimTreeFileStaged'] = { fg = p.iris },
- ['NvimTreeFolderIcon'] = { fg = p.subtle },
- ['NvimTreeFolderName'] = { fg = p.foam },
- ['NvimTreeGitDeleted'] = { fg = groups.git_delete },
- ['NvimTreeGitDirty'] = { fg = groups.git_dirty },
- ['NvimTreeGitIgnored'] = { fg = groups.git_ignore },
- ['NvimTreeGitMerge'] = { fg = groups.git_merge },
- ['NvimTreeGitNew'] = { fg = groups.git_add },
- ['NvimTreeGitRenamed'] = { fg = groups.git_rename },
- ['NvimTreeGitStaged'] = { fg = groups.git_stage },
- ['NvimTreeImageFile'] = { fg = p.text },
- ['NvimTreeNormal'] = { fg = p.text },
- ['NvimTreeOpenedFile'] = { fg = p.text, bg = p.highlight_med },
- ['NvimTreeOpenedFolderName'] = { link = 'NvimTreeFolderName' },
- ['NvimTreeRootFolder'] = { fg = p.iris },
- ['NvimTreeSpecialFile'] = { link = 'NvimTreeNormal' },
- ['NvimTreeWindowPicker'] = { fg = p.love, bg = p.love, blend = 10 },
-
- -- nvim-neo-tree/neo-tree.nvim
- ['NeoTreeTitleBar'] = { fg = p.surface, bg = p.pine },
- ['NeoTreeGitAdded'] = { fg = p.foam },
- ['NeoTreeGitModified'] = { fg = p.rose },
- ['NeoTreeGitDeleted'] = { fg = p.love },
- ['NeoTreeGitRenamed'] = { fg = p.pine },
- ['NeoTreeGitIgnored'] = { fg = p.muted },
- ['NeoTreeGitUntracked'] = { fg = p.gold },
- ['NeoTreeGitConflict'] = { fg = p.iris },
-
- -- folke/which-key.nvim
- ['WhichKey'] = { fg = p.iris },
- ['WhichKeyGroup'] = { fg = p.foam },
- ['WhichKeySeparator'] = { fg = p.subtle },
- ['WhichKeyDesc'] = { fg = p.gold },
- ['WhichKeyFloat'] = { bg = maybe.surface },
- ['WhichKeyValue'] = { fg = p.rose },
-
- -- luka-reineke/indent-blankline.nvim
- ['IndentBlanklineChar'] = { fg = p.muted, nocombine = true },
- ['IndentBlanklineSpaceChar'] = { fg = p.muted, nocombine = true },
- ['IndentBlanklineSpaceCharBlankline'] = { fg = p.muted, nocombine = true },
-
- -- hrsh7th/nvim-cmp
- ['CmpItemAbbr'] = { fg = p.subtle },
- ['CmpItemAbbrDeprecated'] = { fg = p.subtle, strikethrough = true },
- ['CmpItemAbbrMatch'] = { fg = p.text, bold = true },
- ['CmpItemAbbrMatchFuzzy'] = { fg = p.text, bold = true },
- ['CmpItemKind'] = { fg = p.subtle },
- ['CmpItemKindClass'] = { fg = p.pine },
- ['CmpItemKindFunction'] = { fg = p.rose },
- ['CmpItemKindInterface'] = { fg = p.foam },
- ['CmpItemKindMethod'] = { fg = p.iris },
- ['CmpItemKindSnippet'] = { fg = p.gold },
- ['CmpItemKindVariable'] = { fg = p.text },
-
- -- TimUntersberger/neogit
- ['NeogitDiffAddHighlight'] = { fg = p.foam, bg = p.highlight_med },
- ['NeogitDiffContextHighlight'] = { bg = p.highlight_low },
- ['NeogitDiffDeleteHighlight'] = { fg = p.love, bg = p.highlight_med },
- ['NeogitHunkHeader'] = { bg = p.highlight_low },
- ['NeogitHunkHeaderHighlight'] = { bg = p.highlight_low },
-
- -- vimwiki/vimwiki
- ['VimwikiHR'] = { fg = p.subtle },
- ['VimwikiHeader1'] = { fg = groups.headings.h1, bold = true },
- ['VimwikiHeader2'] = { fg = groups.headings.h2, bold = true },
- ['VimwikiHeader3'] = { fg = groups.headings.h3, bold = true },
- ['VimwikiHeader4'] = { fg = groups.headings.h4, bold = true },
- ['VimwikiHeader5'] = { fg = groups.headings.h5, bold = true },
- ['VimwikiHeader6'] = { fg = groups.headings.h6, bold = true },
- ['VimwikiHeaderChar'] = { fg = p.pine },
- ['VimwikiLink'] = { fg = groups.link, underline = true },
- ['VimwikiList'] = { fg = p.iris },
- ['VimwikiNoExistsLink'] = { fg = p.love },
-
- -- nvim-neorg/neorg
- ['NeorgHeading1Prefix'] = { fg = groups.headings.h1, bold = true },
- ['NeorgHeading1Title'] = { link = 'NeorgHeading1Prefix' },
- ['NeorgHeading2Prefix'] = { fg = groups.headings.h2, bold = true },
- ['NeorgHeading2Title'] = { link = 'NeorgHeading2Prefix' },
- ['NeorgHeading3Prefix'] = { fg = groups.headings.h3, bold = true },
- ['NeorgHeading3Title'] = { link = 'NeorgHeading3Prefix' },
- ['NeorgHeading4Prefix'] = { fg = groups.headings.h4, bold = true },
- ['NeorgHeading4Title'] = { link = 'NeorgHeading4Prefix' },
- ['NeorgHeading5Prefix'] = { fg = groups.headings.h5, bold = true },
- ['NeorgHeading5Title'] = { link = 'NeorgHeading5Prefix' },
- ['NeorgHeading6Prefix'] = { fg = groups.headings.h6, bold = true },
- ['NeorgHeading6Title'] = { link = 'NeorgHeading6Prefix' },
- ['NeorgMarkerTitle'] = { fg = p.text, bold = true },
-
- -- tami5/lspsaga.nvim (fork of glepnir/lspsaga.nvim)
- ['DefinitionCount'] = { fg = p.rose },
- ['DefinitionIcon'] = { fg = p.rose },
- ['DefintionPreviewTitle'] = { fg = p.rose, bold = true },
- ['LspFloatWinBorder'] = { fg = groups.border },
- ['LspFloatWinNormal'] = { bg = maybe.surface },
- ['LspSagaAutoPreview'] = { fg = p.subtle },
- ['LspSagaCodeActionBorder'] = { fg = groups.border },
- ['LspSagaCodeActionContent'] = { fg = p.foam },
- ['LspSagaCodeActionTitle'] = { fg = p.gold, bold = true },
- ['LspSagaCodeActionTruncateLine'] = { link = 'LspSagaCodeActionBorder' },
- ['LspSagaDefPreviewBorder'] = { fg = groups.border },
- ['LspSagaDiagnosticBorder'] = { fg = groups.border },
- ['LspSagaDiagnosticHeader'] = { fg = p.gold, bold = true },
- ['LspSagaDiagnosticTruncateLine'] = { link = 'LspSagaDiagnosticBorder' },
- ['LspSagaDocTruncateLine'] = { link = 'LspSagaHoverBorder' },
- ['LspSagaFinderSelection'] = { fg = p.gold },
- ['LspSagaHoverBorder'] = { fg = groups.border },
- ['LspSagaLspFinderBorder'] = { fg = groups.border },
- ['LspSagaRenameBorder'] = { fg = p.pine },
- ['LspSagaRenamePromptPrefix'] = { fg = p.love },
- ['LspSagaShTruncateLine'] = { link = 'LspSagaSignatureHelpBorder' },
- ['LspSagaSignatureHelpBorder'] = { fg = p.pine },
- ['ReferencesCount'] = { fg = p.rose },
- ['ReferencesIcon'] = { fg = p.rose },
- ['SagaShadow'] = { bg = p.overlay },
- ['TargetWord'] = { fg = p.iris },
-
- -- ray-x/lsp_signature.nvim
- ['LspSignatureActiveParameter'] = { bg = p.overlay },
-
- -- rlane/pounce.nvim
- ['PounceAccept'] = { fg = p.love, bg = p.highlight_high },
- ['PounceAcceptBest'] = { fg = p.base, bg = p.gold },
- ['PounceGap'] = { link = 'Search' },
- ['PounceMatch'] = { link = 'Search' },
-
- -- ggandor/leap.nvim
- ['LeapMatch'] = { link = 'MatchParen' },
- ['LeapLabelPrimary'] = { link = 'IncSearch' },
- ['LeapLabelSecondary'] = { fg = p.base, bg = p.pine },
-
- -- phaazon/hop.nvim
- ['HopNextKey'] = { fg = p.love },
- ['HopNextKey1'] = { fg = p.foam },
- ['HopNextKey2'] = { fg = p.pine },
- ['HopUnmatched'] = { fg = p.highlight_high },
-
- -- nvim-telescope/telescope.nvim
- ['TelescopeBorder'] = { fg = groups.border, bg = float_background },
- ['TelescopeMatching'] = { fg = p.rose },
- ['TelescopeNormal'] = { fg = p.subtle, bg = float_background },
- ['TelescopePromptNormal'] = { fg = p.text, bg = float_background },
- ['TelescopePromptPrefix'] = { fg = p.subtle },
- ['TelescopeSelection'] = { fg = p.text, bg = p.overlay },
- ['TelescopeSelectionCaret'] = { fg = p.rose, bg = p.overlay },
- ['TelescopeTitle'] = { fg = p.subtle },
-
- -- ibhagwan/fzf-lua
- ['FzfLuaNormal'] = { fg = p.subtle, bg = float_background },
- ['FzfLuaTitle'] = { fg = p.subtle },
- ['FzfLuaBorder'] = { fg = groups.border, bg = float_background },
- ['FzfLuaHeaderText'] = { fg = p.love },
- ['FzfLuaHeaderBind'] = { fg = p.rose },
- ['FzfLuaBufFlagCur'] = { fg = p.subtle },
- ['FzfLuaBufFlagAlt'] = { 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' },
-
- -- rcarriga/nvim-dap-ui
- ['DapUIVariable'] = { link = 'Normal' },
- ['DapUIValue'] = { link = 'Normal' },
- ['DapUIFrameName'] = { link = 'Normal' },
- ['DapUIThread'] = { fg = p.gold },
- ['DapUIWatchesValue'] = { link = 'DapUIThread' },
- ['DapUIBreakpointsInfo'] = { link = 'DapUIThread' },
- ['DapUIBreakpointsCurrentLine'] = { fg = p.gold, bold = true },
- ['DapUIWatchesEmpty'] = { fg = p.love },
- ['DapUIWatchesError'] = { link = 'DapUIWatchesEmpty' },
- ['DapUIBreakpointsDisabledLine'] = { fg = p.muted },
- ['DapUISource'] = { fg = p.iris },
- ['DapUIBreakpointsPath'] = { fg = p.foam },
- ['DapUIScope'] = { link = 'DapUIBreakpointsPath' },
- ['DapUILineNumber'] = { link = 'DapUIBreakpointsPath' },
- ['DapUIBreakpointsLine'] = { link = 'DapUIBreakpointsPath' },
- ['DapUIFloatBorder'] = { link = 'DapUIBreakpointsPath' },
- ['DapUIStoppedThread'] = { link = 'DapUIBreakpointsPath' },
- ['DapUIDecoration'] = { link = 'DapUIBreakpointsPath' },
- ['DapUIModifiedValue'] = { fg = p.foam, bold = true },
-
- -- glepnir/dashboard-nvim
- ['DashboardShortcut'] = { fg = p.love },
- ['DashboardHeader'] = { fg = p.pine },
- ['DashboardCenter'] = { fg = p.gold },
- ['DashboardFooter'] = { fg = p.iris },
-
- -- SmiteshP/nvim-navic
- ['NavicIconsFile'] = { fg = p.base },
- ['NavicIconsModule'] = { fg = p.rose },
- ['NavicIconsNamespace'] = { fg = p.base },
- ['NavicIconsPackage'] = { fg = p.base },
- ['NavicIconsClass'] = { fg = p.foam },
- ['NavicIconsMethod'] = { fg = p.iris },
- ['NavicIconsProperty'] = { fg = p.foam },
- ['NavicIconsField'] = { fg = p.foam },
- ['NavicIconsConstructor'] = { fg = p.gold },
- ['NavicIconsEnum'] = { fg = p.gold },
- ['NavicIconsInterface'] = { fg = p.foam },
- ['NavicIconsFunction'] = { fg = p.pine },
- ['NavicIconsVariable'] = { fg = p.text },
- ['NavicIconsConstant'] = { fg = p.gold },
- ['NavicIconsString'] = { fg = p.gold },
- ['NavicIconsNumber'] = { fg = p.gold },
- ['NavicIconsBoolean'] = { fg = p.rose },
- ['NavicIconsArray'] = { fg = p.gold },
- ['NavicIconsObject'] = { fg = p.gold },
- ['NavicIconsKey'] = { fg = p.iris },
- ['NavicIconsKeyword'] = { fg = p.pine },
- ['NavicIconsNull'] = { fg = p.love },
- ['NavicIconsEnumMember'] = { fg = p.foam },
- ['NavicIconsStruct'] = { fg = p.foam },
- ['NavicIconsEvent'] = { fg = p.gold },
- ['NavicIconsOperator'] = { fg = p.subtle },
- ['NavicIconsTypeParameter'] = { fg = p.foam },
- ['NavicText'] = { fg = p.subtle },
- ['NavicSeparator'] = { fg = p.subtle },
-
- -- folke/noice.nvim
- ['NoiceCursor'] = { fg = p.highlight_high, bg = p.text },
-
- -- echasnovski/mini.indentscope
- ['MiniIndentscopeSymbol'] = { fg = p.highlight_med },
- ['MiniIndentscopeSymbolOff'] = { fg = p.highlight_med },
-
- -- goolord/alpha-nvim
- ['AlphaHeader'] = { fg = p.pine },
- ['AlphaButtons'] = { fg = p.foam },
- ['AlphaShortcut'] = { fg = p.rose },
- ['AlphaFooter'] = { fg = p.gold },
- }
-
- vim.g.terminal_color_0 = p.overlay -- black
- vim.g.terminal_color_8 = p.subtle -- bright black
- vim.g.terminal_color_1 = p.love -- red
- vim.g.terminal_color_9 = p.love -- bright red
- vim.g.terminal_color_2 = p.pine -- green
- vim.g.terminal_color_10 = p.pine -- bright green
- vim.g.terminal_color_3 = p.gold -- yellow
- vim.g.terminal_color_11 = p.gold -- bright yellow
- vim.g.terminal_color_4 = p.foam -- blue
- vim.g.terminal_color_12 = p.foam -- bright blue
- vim.g.terminal_color_5 = p.iris -- magenta
- vim.g.terminal_color_13 = p.iris -- bright magenta
- vim.g.terminal_color_6 = p.rose -- cyan
- vim.g.terminal_color_14 = p.rose -- bright cyan
- vim.g.terminal_color_7 = p.text -- white
- vim.g.terminal_color_15 = p.text -- bright white
-
- -- Set users highlight_group customisations.
- for group, opts in pairs(options.highlight_groups) do
- local default_opts = M.defaults[group]
-
- if (opts.inherit == nil or opts.inherit) and default_opts ~= nil then -- On merge.
- opts.inherit = nil -- Don't add this key to the highlight_group after merge.
- M.defaults[group] = vim.tbl_extend('force', default_opts, opts)
- else -- On overwrite.
- opts.inherit = nil -- Don't add this key to the highlight_group.
- M.defaults[group] = opts
- end
- end
-
- -- Set highlights.
- for group, color in pairs(M.defaults) do
- h(group, color)
- end
-end
-
-return M
diff --git a/lua/rose-pine/util.lua b/lua/rose-pine/util.lua
deleted file mode 100644
index f8b84f9..0000000
--- a/lua/rose-pine/util.lua
+++ /dev/null
@@ -1,71 +0,0 @@
-local util = {}
-
-local function byte(value, offset)
- return bit.band(bit.rshift(value, offset), 0xFF)
-end
-
-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 { 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)
-util.blend = function(fg, bg, alpha)
- local fg_rgb = rgb(parse_color(fg))
- local bg_rgb = rgb(parse_color(bg))
-
- local function blend_channel(i)
- local ret = (alpha * fg_rgb[i] + ((1 - alpha) * bg_rgb[i]))
- 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)
- )
-end
-
----@param group string
----@param color table
-util.highlight = function(group, color)
- local fg = color.fg and parse_color(color.fg) or 'none'
- local bg = color.bg and parse_color(color.bg) or 'none'
- local sp = color.sp and parse_color(color.sp) or ''
-
- if
- color.blend ~= nil
- and (color.blend >= 0 or color.blend <= 100)
- and bg ~= nil
- then
- bg = util.blend(bg, parse_color('base') or '', color.blend / 100)
- end
-
- color = vim.tbl_extend('force', color, { fg = fg, bg = bg, sp = sp })
- vim.api.nvim_set_hl(0, group, color)
-end
-
-return util
diff --git a/lua/rose-pine/utilities.lua b/lua/rose-pine/utilities.lua
new file mode 100644
index 0000000..e4c72cc
--- /dev/null
+++ b/lua/rose-pine/utilities.lua
@@ -0,0 +1,66 @@
+local utilities = {}
+
+---@param color string
+local function color_to_rgb(color)
+ local function byte(value, offset)
+ return bit.band(bit.rshift(value, offset), 0xFF)
+ end
+
+ local new_color = vim.api.nvim_get_color_by_name(color)
+ if new_color == -1 then
+ new_color = vim.opt.background:get() == "dark" and 000 or 255255255
+ end
+
+ return { byte(new_color, 16), byte(new_color, 8), byte(new_color, 0) }
+end
+
+---@param color string Palette key or hex value
+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 Between 0 (background) and 1 (foreground)
+local function blend(fg, bg, alpha)
+ local fg_rgb = color_to_rgb(fg)
+ local bg_rgb = color_to_rgb(bg)
+
+ local function blend_channel(i)
+ local ret = (alpha * fg_rgb[i] + ((1 - alpha) * bg_rgb[i]))
+ 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))
+end
+
+---@param group string
+---@param highlight table
+function utilities.highlight(group, highlight, blend_on)
+ local fg = highlight.fg and parse_color(highlight.fg) or "NONE"
+ local bg = highlight.bg and parse_color(highlight.bg) or "NONE"
+ local sp = highlight.sp and parse_color(highlight.sp) or "NONE"
+
+ if highlight.blend ~= nil and (highlight.blend >= 0 and highlight.blend <= 100) and bg ~= nil then
+ bg = blend(bg, blend_on or require("rose-pine.palette").base, highlight.blend / 100)
+ end
+
+ highlight.fg = fg
+ highlight.bg = bg
+ highlight.sp = sp
+ -- highlight = vim.tbl_extend("force", highlight, { fg = fg, bg = bg, sp = sp })
+
+ vim.api.nvim_set_hl(0, group, highlight)
+end
+
+return utilities
diff --git a/readme.md b/readme.md
index ed6d466..343a587 100644
--- a/readme.md
+++ b/readme.md
@@ -11,30 +11,20 @@
-## Install
+## Getting started
-**[Paq](https://github.com/savq/paq-nvim)**
+Install `rose-pine/neovim` using your favourite plugin manager:
+
+**paq-nvim**
```lua
-require('paq')({
- { 'rose-pine/neovim', as = 'rose-pine' }
-})
+{ 'rose-pine/neovim', as = 'rose-pine' }
```
-**[lazy.nvim](https://github.com/folke/lazy.nvim)**
+**lazy.nvim**
```lua
-require("lazy").setup({
- { 'rose-pine/neovim', name = 'rose-pine' }
-})
-```
-
-**[packer.nvim](https://github.com/wbthomason/packer.nvim)**
-
-```lua
-require('packer').startup(function(use)
- use({ 'rose-pine/neovim', as = 'rose-pine' })
-end)
+{ 'rose-pine/neovim', name = 'rose-pine' }
```
## Gallery
@@ -53,75 +43,88 @@ end)
## Options
-> [!NOTE]
-> Options should be set **before** colorscheme
+> [!IMPORTANT]
+> Configure options _before_ setting colorscheme.
-Variant respects `vim.o.background`, using dawn when light and `dark_variant` when dark
+Rosé Pine has three variants: main, moon, and dawn. By default, `vim.o.background` is followed, using dawn when light and `dark_variant` when dark.
+
+Colour values accept named colours from the [Rosé Pine palette](https://rosepinetheme.com/palette/ingredients/), e.g. "foam", or valid hex, e.g. "#fa8072".
```lua
require('rose-pine').setup({
- --- @usage 'auto'|'main'|'moon'|'dawn'
- variant = 'auto',
- --- @usage 'main'|'moon'|'dawn'
- dark_variant = 'main',
- bold_vert_split = false,
- dim_nc_background = false,
- disable_background = false,
- disable_float_background = false,
- disable_italics = false,
+ variant = "auto", -- auto, main, moon, or dawn
+ dark_variant = "main", -- main, moon, or dawn
+ dim_inactive_windows = false,
+ extend_background_behind_borders = false,
- --- @usage string hex value or named color from rosepinetheme.com/palette
- groups = {
- background = 'base',
- background_nc = '_experimental_nc',
- panel = 'surface',
- panel_nc = 'base',
- border = 'highlight_med',
- comment = 'muted',
- link = 'iris',
- punctuation = 'subtle',
+ styles = {
+ bold = true,
+ italic = true,
+ transparency = false,
+ },
- error = 'love',
- hint = 'iris',
- info = 'foam',
- warn = 'gold',
+ groups = {
+ border = "muted",
+ link = "iris",
+ panel = "surface",
- headings = {
- h1 = 'iris',
- h2 = 'foam',
- h3 = 'rose',
- h4 = 'gold',
- h5 = 'pine',
- h6 = 'foam',
- }
- -- or set all headings at once
- -- headings = 'subtle'
- },
+ error = "love",
+ hint = "iris",
+ info = "foam",
+ warn = "gold",
- -- Change specific vim highlight groups
- -- https://github.com/rose-pine/neovim/wiki/Recipes
- highlight_groups = {
- ColorColumn = { bg = 'rose' },
+ 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",
+ git_untracked = "subtle",
- -- Blend colours against the "base" background
- CursorLine = { bg = 'foam', blend = 10 },
- StatusLine = { fg = 'love', bg = 'love', blend = 10 },
+ headings = {
+ h1 = "iris",
+ h2 = "foam",
+ h3 = "rose",
+ h4 = "gold",
+ h5 = "pine",
+ h6 = "foam",
+ },
+ -- Alternatively, set all headings at once.
+ -- headings = "subtle",
+ },
- -- By default each group adds to the existing config.
- -- If you only want to set what is written in this config exactly,
- -- you can set the inherit option:
- Search = { bg = 'gold', inherit = false },
- }
+ highlight_groups = {
+ -- Comment = { fg = "foam" },
+ -- VertSplit = { fg = "muted", bg = "muted" },
+ },
+
+ before_highlight = function(group, highlight, palette)
+ -- Disable all undercurls
+ -- if highlight.undercurl then
+ -- highlight.undercurl = false
+ -- end
+ --
+ -- Change palette colour
+ -- if highlight.fg == palette.pine then
+ -- highlight.fg = palette.foam
+ -- end
+ end,
})
--- Set colorscheme after options
vim.cmd('colorscheme rose-pine')
+-- vim.cmd('colorscheme rose-pine-main')
+-- vim.cmd('colorscheme rose-pine-moon')
+-- vim.cmd('colorscheme rose-pine-dawn')
```
+> [!NOTE]
+> Visit the [wiki](https://github.com/rose-pine/neovim/wiki) for [plugin configurations](https://github.com/rose-pine/neovim/wiki/Plugin-configurations) and [recipes](https://github.com/rose-pine/neovim/wiki/Recipes).
+
## Contributing
-We welcome and appreciate any help in creating a lovely experience for all.
+We welcome and appreciate contributions of any kind. Create an issue or start a discussion for any proposed changes. Pull requests are encouraged for supporting additional plugins.
-- Get highlight groups under cursor via `:Inspect` in Neovim 0.9 or [nvim-treesitter/playground](https://github.com/nvim-treesitter/playground#show-treesitter-and-syntax-highlight-groups-under-the-cursor)
-- [Adding new highlight groups](https://github.com/rose-pine/neovim/issues/6#issuecomment-962466323)
-- [Palette reference by name](https://rosepinetheme.com/palette)
+Feel free to update the [wiki](https://github.com/rose-pine/neovim/wiki/) with any [recipes](https://github.com/rose-pine/neovim/wiki/Recipes).
From 86fa83761e478e6293eadab60252a0e757136791 Mon Sep 17 00:00:00 2001
From: not
Date: Sun, 7 Jan 2024 15:39:30 -0600
Subject: [PATCH 02/97] feat: re-add inherit option for custom highlight groups
(#198)
---
lua/rose-pine.lua | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index d45d4af..aae44bc 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -611,6 +611,16 @@ local function set_highlights()
end
for group, options in pairs(config.options.highlight_groups) do
+ local default_opts = highlights[group] or {}
+
+ if (options.inherit == nil or options.inherit) and default_opts ~= nil then -- On merge.
+ options.inherit = nil -- Don't add this key to the highlight_group after merge.
+ highlights[group] = vim.tbl_extend("force", default_opts, options)
+ else -- On overwrite.
+ options.inherit = nil -- Don't add this key to the highlight_group.
+ highlights[group] = options
+ end
+
highlights[group] = vim.tbl_extend("force", highlights[group] or {}, options)
end
From 82285ba9f13c5d89557b6a19c96cd14f561f389b Mon Sep 17 00:00:00 2001
From: not
Date: Sun, 7 Jan 2024 17:35:36 -0600
Subject: [PATCH 03/97] fix: none palette value (#200)
---
lua/rose-pine/palette.lua | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lua/rose-pine/palette.lua b/lua/rose-pine/palette.lua
index 6b49f68..b995a9d 100644
--- a/lua/rose-pine/palette.lua
+++ b/lua/rose-pine/palette.lua
@@ -17,6 +17,7 @@ local variants = {
highlight_low = "#21202e",
highlight_med = "#403d52",
highlight_high = "#524f67",
+ none = "NONE",
},
moon = {
_nc = "#1f1d30",
@@ -35,6 +36,7 @@ local variants = {
highlight_low = "#2a283e",
highlight_med = "#44415a",
highlight_high = "#56526e",
+ none = "NONE",
},
dawn = {
_nc = "#f8f0e7",
@@ -53,6 +55,7 @@ local variants = {
highlight_low = "#f4ede8",
highlight_med = "#dfdad9",
highlight_high = "#cecacd",
+ none = "NONE",
},
}
From 76b6d830f6c75f9eed80e561434c41eaef092517 Mon Sep 17 00:00:00 2001
From: not
Date: Sun, 7 Jan 2024 17:55:48 -0600
Subject: [PATCH 04/97] feat!: enable `extend_background_behind_borders` by
default (#201)
---
lua/rose-pine/config.lua | 2 +-
readme.md | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lua/rose-pine/config.lua b/lua/rose-pine/config.lua
index 6fc0774..d5ef0d8 100644
--- a/lua/rose-pine/config.lua
+++ b/lua/rose-pine/config.lua
@@ -21,7 +21,7 @@ config.options = {
---Extend background behind borders. Appearance differs based on which
---border characters you are using.
- extend_background_behind_borders = false,
+ extend_background_behind_borders = true,
enable = {
terminal = true,
diff --git a/readme.md b/readme.md
index 343a587..0c13fae 100644
--- a/readme.md
+++ b/readme.md
@@ -55,7 +55,7 @@ require('rose-pine').setup({
variant = "auto", -- auto, main, moon, or dawn
dark_variant = "main", -- main, moon, or dawn
dim_inactive_windows = false,
- extend_background_behind_borders = false,
+ extend_background_behind_borders = true,
styles = {
bold = true,
From 2c892088f9affecaa2a62b7fdd6bd265f07d160c Mon Sep 17 00:00:00 2001
From: not
Date: Sun, 7 Jan 2024 19:27:50 -0600
Subject: [PATCH 05/97] fix: transparency not affecting Normal background
(#204)
---
lua/rose-pine.lua | 1 +
1 file changed, 1 insertion(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index aae44bc..55e4c4f 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -587,6 +587,7 @@ local function set_highlights()
FloatBorder = { fg = palette.muted, bg = "NONE" },
Folded = { fg = palette.text, bg = "NONE" },
NormalFloat = { bg = "NONE" },
+ Normal = { fg = palette.text, bg = "NONE" },
NormalNC = { fg = palette.text, bg = config.options.dim_inactive_windows and palette._nc or "NONE" },
Pmenu = { fg = palette.subtle, bg = "NONE" },
PmenuKind = { fg = palette.foam, bg = "NONE" },
From bfa2d2b2fb8b444cb3ff15792f14caaf3e9639e9 Mon Sep 17 00:00:00 2001
From: not
Date: Sun, 7 Jan 2024 23:41:02 -0600
Subject: [PATCH 06/97] feat(transparency): remove more backgrounds (#205)
* feat(transparency): remove border background
* chore(transparency): remove telescope selection caret background
---
lua/rose-pine.lua | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 55e4c4f..795b9a1 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -9,7 +9,11 @@ local function set_highlights()
local function make_border(fg)
fg = fg or groups.border
- return { fg = fg, bg = config.options.extend_background_behind_borders and palette.surface or "NONE" }
+ return {
+ fg = fg,
+ bg = (config.options.extend_background_behind_borders and not styles.transparency) and palette.surface
+ or "NONE",
+ }
end
local function make_title(fg)
@@ -600,7 +604,7 @@ local function set_highlights()
TelescopeNormal = { fg = palette.subtle, bg = "NONE" },
TelescopePromptNormal = { fg = palette.text, bg = "NONE" },
TelescopeSelection = { fg = palette.text, bg = "NONE", bold = styles.bold },
- TelescopeSelectionCaret = { fg = palette.rose, bg = palette.rose },
+ TelescopeSelectionCaret = { fg = palette.rose },
WhichKeyFloat = { bg = "NONE" },
}
From 188190f285e9f5c6753080b93e5dd802f04f6cfd Mon Sep 17 00:00:00 2001
From: not
Date: Mon, 8 Jan 2024 09:27:46 -0600
Subject: [PATCH 07/97] revert: improve palette contrast (#207)
This commit restores the official palette colours. A future update will
address contrast.
---
lua/rose-pine/palette.lua | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lua/rose-pine/palette.lua b/lua/rose-pine/palette.lua
index b995a9d..540625e 100644
--- a/lua/rose-pine/palette.lua
+++ b/lua/rose-pine/palette.lua
@@ -11,7 +11,7 @@ local variants = {
love = "#eb6f92",
gold = "#f6c177",
rose = "#ebbcba",
- pine = "#3e8fb0",
+ pine = "#31748f",
foam = "#9ccfd8",
iris = "#c4a7e7",
highlight_low = "#21202e",
@@ -45,7 +45,7 @@ local variants = {
overlay = "#f2e9e1",
muted = "#9893a5",
subtle = "#797593",
- text = "#464261",
+ text = "#575279",
love = "#b4637a",
gold = "#ea9d34",
rose = "#d7827e",
From 1edcf47562476cde5f9908b6601214048ed769e0 Mon Sep 17 00:00:00 2001
From: not
Date: Mon, 8 Jan 2024 09:43:57 -0600
Subject: [PATCH 08/97] fix: mismatched WinSeparator background (#208)
* fix: mismatched WinSeparator background
* feat: use border group for bolded vert split
* fix: Pmenu fg typo
---
lua/rose-pine.lua | 6 +++---
lua/rose-pine/config.lua | 4 +++-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 795b9a1..7ea68a4 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -62,7 +62,7 @@ local function set_highlights()
PmenuKind = { fg = palette.foam, bg = groups.panel },
PmenuKindSel = { fg = palette.subtle, bg = palette.overlay },
PmenuSbar = { bg = groups.panel },
- PmenuSel = { fg = palette.title, bg = palette.overlay },
+ PmenuSel = { fg = palette.text, bg = palette.overlay },
PmenuThumb = { bg = palette.muted },
Question = { fg = palette.gold },
-- QuickFixLink = {},
@@ -86,13 +86,13 @@ local function set_highlights()
TabLineFill = { bg = groups.panel },
TabLineSel = { fg = palette.text, bg = palette.overlay, bold = styles.bold },
Title = make_title(),
- VertSplit = make_border(),
+ VertSplit = { fg = groups.border },
Visual = { bg = palette.highlight_med },
-- VisualNOS = {},
WarningMsg = { fg = groups.warn, bold = styles.bold },
-- Whitespace = {},
WildMenu = { link = "IncSearch" },
- WinSeparator = make_border(),
+ WinSeparator = { fg = groups.border },
DiagnosticError = { fg = groups.error },
DiagnosticHint = { fg = groups.hint },
diff --git a/lua/rose-pine/config.lua b/lua/rose-pine/config.lua
index d5ef0d8..beed052 100644
--- a/lua/rose-pine/config.lua
+++ b/lua/rose-pine/config.lua
@@ -98,7 +98,9 @@ config.options = {
local function migrate(options)
if options.bold_vert_split then
- options.highlight_groups["VertSplit"] = { fg = "muted", bg = "muted" }
+ local border = options.groups.border or "muted"
+ options.highlight_groups["VertSplit"] = { fg = border, bg = border }
+ options.highlight_groups["WinSeparator"] = { fg = border, bg = border }
end
if options.disable_float_background then
From 46044020c62de9ccd9cb5c591e065baabd0d94e2 Mon Sep 17 00:00:00 2001
From: not
Date: Tue, 9 Jan 2024 15:44:36 -0600
Subject: [PATCH 09/97] feat: improve neogit support (#209)
* feat: improve neogit support
* add change copied
---
lua/rose-pine.lua | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 7ea68a4..1c97f22 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -387,10 +387,20 @@ local function set_highlights()
CmpItemKindSnippet = { link = "String" },
CmpItemKindVariable = { link = "Identifier" },
- -- TimUntersberger/neogit
+ -- NeogitOrg/neogit
+ -- https://github.com/NeogitOrg/neogit/blob/master/lua/neogit/lib/hl.lua#L109-L198
+ NeogitChangeAdded = { fg = groups.git_add, bold = styles.bold, italic = styles.italic },
+ NeogitChangeBothModified = { fg = groups.git_change, bold = styles.bold, italic = styles.italic },
+ NeogitChangeCopied = { fg = groups.git_untracked, bold = styles.bold, italic = styles.italic },
+ NeogitChangeDeleted = { fg = groups.git_delete, bold = styles.bold, italic = styles.italic },
+ NeogitChangeModified = { fg = groups.git_change, bold = styles.bold, italic = styles.italic },
+ NeogitChangeNewFile = { fg = groups.git_stage, bold = styles.bold, italic = styles.italic },
+ NeogitChangeRenamed = { fg = groups.git_rename, bold = styles.bold, italic = styles.italic },
+ NeogitChangeUpdated = { fg = groups.git_change, bold = styles.bold, italic = styles.italic },
NeogitDiffAddHighlight = { link = "DiffAdd" },
NeogitDiffContextHighlight = { bg = palette.surface },
NeogitDiffDeleteHighlight = { link = "DiffDelete" },
+ NeogitFilePath = { fg = palette.foam, italic = styles.italic },
NeogitHunkHeader = { bg = groups.panel },
NeogitHunkHeaderHighlight = { bg = groups.panel },
From 79e0d756b97336a87b30dcc614779348b9e9d892 Mon Sep 17 00:00:00 2001
From: Robin Gruyters <2082795+rgruyters@users.noreply.github.com>
Date: Sat, 13 Jan 2024 03:39:12 +0100
Subject: [PATCH 10/97] chore: update highlights for indent-blanklines (#210)
---
lua/rose-pine.lua | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 1c97f22..3deaebd 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -369,7 +369,12 @@ local function set_highlights()
WhichKeySeparator = { fg = palette.subtle },
WhichKeyValue = { fg = palette.rose },
- -- luka-reineke/indent-blankline.nvim
+ -- lukas-reineke/indent-blankline.nvim
+ IblIndent = { fg = palette.overlay },
+ IblScope = { fg = palette.foam },
+ IblWhitespace = { fg = palette.overlay },
+
+ -- for legacy usage
IndentBlanklineChar = { fg = palette.muted, nocombine = true },
IndentBlanklineSpaceChar = { fg = palette.muted, nocombine = true },
IndentBlanklineSpaceCharBlankline = { fg = palette.muted, nocombine = true },
@@ -617,6 +622,10 @@ local function set_highlights()
TelescopeSelectionCaret = { fg = palette.rose },
WhichKeyFloat = { bg = "NONE" },
+
+ IblIndent = { fg = palette.overlay, bg = "NONE" },
+ IblScope = { fg = palette.foam, bg = "NONE" },
+ IblWhitespace = { fg = palette.overlay, bg = "NONE" },
}
if styles.transparency then
From e0674e5e5c0745631f5a2ffb1b77a38a2272fbdf Mon Sep 17 00:00:00 2001
From: not
Date: Fri, 12 Jan 2024 20:46:04 -0600
Subject: [PATCH 11/97] feat: support folke/flash.nvim (#211)
---
lua/rose-pine.lua | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 3deaebd..c9ab80e 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -361,6 +361,9 @@ local function set_highlights()
NeoTreeGitUntracked = { fg = groups.git_untracked },
NeoTreeTitleBar = { link = "StatusLineTerm" },
+ -- folke/flash.nvim
+ FlashLabel = { fg = palette.base, bg = palette.love },
+
-- folke/which-key.nvim
WhichKey = { fg = palette.iris },
WhichKeyDesc = { fg = palette.gold },
From 1ffdf27819385fe1ee21232883986c39afd67c49 Mon Sep 17 00:00:00 2001
From: atinylittleshell <3233006+atinylittleshell@users.noreply.github.com>
Date: Sun, 14 Jan 2024 19:28:49 -0800
Subject: [PATCH 12/97] feat(transparency): remove lualine background (#212)
---
lua/lualine/themes/rose-pine.lua | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/lua/lualine/themes/rose-pine.lua b/lua/lualine/themes/rose-pine.lua
index 96d6b92..4c2c9a6 100644
--- a/lua/lualine/themes/rose-pine.lua
+++ b/lua/lualine/themes/rose-pine.lua
@@ -1,34 +1,40 @@
local p = require("rose-pine.palette")
+local config = require("rose-pine.config")
+
+local bg_base = p.base
+if config.options.styles.transparency then
+ bg_base = "NONE"
+end
return {
normal = {
a = { bg = p.rose, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.rose },
- c = { bg = p.base, fg = p.text },
+ c = { bg = bg_base, fg = p.text },
},
insert = {
a = { bg = p.foam, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.foam },
- c = { bg = p.base, fg = p.text },
+ c = { bg = bg_base, fg = p.text },
},
visual = {
a = { bg = p.iris, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.iris },
- c = { bg = p.base, fg = p.text },
+ c = { bg = bg_base, fg = p.text },
},
replace = {
a = { bg = p.pine, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.pine },
- c = { bg = p.base, fg = p.text },
+ c = { bg = bg_base, fg = p.text },
},
command = {
a = { bg = p.love, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.love },
- c = { bg = p.base, fg = p.text },
+ c = { bg = bg_base, fg = p.text },
},
inactive = {
- a = { bg = p.base, fg = p.muted, gui = "bold" },
- b = { bg = p.base, fg = p.muted },
- c = { bg = p.base, fg = p.muted },
+ a = { bg = bg_base, fg = p.muted, gui = "bold" },
+ b = { bg = bg_base, fg = p.muted },
+ c = { bg = bg_base, fg = p.muted },
},
}
From aa74893a06e1f5e45b42566eccc5fc4ddead194e Mon Sep 17 00:00:00 2001
From: not
Date: Tue, 16 Jan 2024 08:31:18 -0600
Subject: [PATCH 13/97] fix: unlink TabLine from StatusLine (#214)
---
lua/rose-pine.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index c9ab80e..d4dfc48 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -82,7 +82,7 @@ local function set_highlights()
StatusLineTerm = { fg = palette.base, bg = palette.pine },
StatusLineTermNC = { fg = palette.base, bg = palette.pine, blend = 60 },
Substitute = { link = "IncSearch" },
- TabLine = { link = "StatusLine" },
+ TabLine = { fg = palette.subtle, bg = groups.panel },
TabLineFill = { bg = groups.panel },
TabLineSel = { fg = palette.text, bg = palette.overlay, bold = styles.bold },
Title = make_title(),
From f4d51d67ee1cf5526f60be3e61425cde82578254 Mon Sep 17 00:00:00 2001
From: not
Date: Thu, 18 Jan 2024 10:28:16 -0600
Subject: [PATCH 14/97] feat: add mini.clue and mini.pick (#215)
---
lua/rose-pine.lua | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index d4dfc48..3eec3ff 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -586,6 +586,13 @@ local function set_highlights()
-- folke/noice.nvim
NoiceCursor = { fg = palette.highlight_high, bg = palette.text },
+ -- echasnovski/mini.clue
+ MiniClueTitle = { bg = groups.panel, bold = styles.bold },
+
+ -- echasnovski/mini.pick
+ MiniPickBorderText = { bg = groups.panel },
+ MiniPickPrompt = { bg = groups.panel, bold = styles.bold },
+
-- echasnovski/mini.indentscope
MiniIndentscopeSymbol = { fg = palette.muted },
MiniIndentscopeSymbolOff = { fg = palette.muted },
@@ -629,6 +636,11 @@ local function set_highlights()
IblIndent = { fg = palette.overlay, bg = "NONE" },
IblScope = { fg = palette.foam, bg = "NONE" },
IblWhitespace = { fg = palette.overlay, bg = "NONE" },
+
+ MiniClueTitle = { bg = "NONE", bold = styles.bold },
+
+ MiniPickBorderText = { bg = "NONE" },
+ MiniPickPrompt = { bg = "NONE", bold = styles.bold },
}
if styles.transparency then
From 7ed74e3f24405ab807b74aa81471c6c8e53250da Mon Sep 17 00:00:00 2001
From: not
Date: Fri, 26 Jan 2024 14:12:54 -0600
Subject: [PATCH 15/97] feat: add new treesitter highlights (#217)
* feat: add WinBar and WinBarNC
* feat: add new treesitter highlight groups
* perf: parse necessary values upfront
This commit no longer parses each highlight group, but rather user
config values only.
* fix: titles are no longer dynamically coloured
Closes #216 #218 #219
---
lua/rose-pine.lua | 354 +++++++++++++++++++++++++-----------
lua/rose-pine/config.lua | 40 ++--
lua/rose-pine/utilities.lua | 25 +--
readme.md | 28 +--
4 files changed, 291 insertions(+), 156 deletions(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 3eec3ff..9240a51 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -5,7 +5,11 @@ local function set_highlights()
local utilities = require("rose-pine.utilities")
local palette = require("rose-pine.palette")
local styles = config.options.styles
- local groups = config.options.groups
+
+ local groups = {}
+ for group, color in pairs(config.options.groups) do
+ groups[group] = utilities.parse_color(color)
+ end
local function make_border(fg)
fg = fg or groups.border
@@ -16,12 +20,64 @@ local function set_highlights()
}
end
- local function make_title(fg)
- fg = fg or palette.foam
- return { fg = styles.bold and palette.text or fg, bold = styles.bold }
- end
+ local highlights = {}
+ local legacy_highlights = {
+ ["@attribute.diff"] = { fg = palette.gold },
+ ["@boolean"] = { link = "Boolean" },
+ ["@class"] = { fg = palette.foam },
+ ["@conditional"] = { link = "Conditional" },
+ ["@field"] = { fg = palette.foam },
+ ["@include"] = { link = "Include" },
+ ["@interface"] = { fg = palette.foam },
+ ["@macro"] = { link = "Macro" },
+ ["@method"] = { fg = palette.rose },
+ ["@namespace"] = { link = "Include" },
+ ["@number"] = { link = "Number" },
+ ["@parameter"] = { fg = palette.iris, italic = styles.italic },
+ ["@preproc"] = { link = "PreProc" },
+ ["@punctuation"] = { fg = palette.subtle },
+ ["@punctuation.bracket"] = { link = "@punctuation" },
+ ["@punctuation.delimiter"] = { link = "@punctuation" },
+ ["@punctuation.special"] = { link = "@punctuation" },
+ ["@regexp"] = { link = "String" },
+ ["@repeat"] = { link = "Repeat" },
+ ["@storageclass"] = { link = "StorageClass" },
+ ["@symbol"] = { link = "Identifier" },
+ ["@text"] = { fg = palette.text },
+ ["@text.danger"] = { fg = groups.error },
+ ["@text.diff.add"] = { fg = groups.git_add, bg = groups.git_add, blend = 20 },
+ ["@text.diff.delete"] = { fg = groups.git_delete, bg = groups.git_delete, blend = 20 },
+ ["@text.emphasis"] = { italic = styles.italic },
+ ["@text.environment"] = { link = "Macro" },
+ ["@text.environment.name"] = { link = "Type" },
+ ["@text.math"] = { link = "Special" },
+ ["@text.note"] = { link = "SpecialComment" },
+ ["@text.strike"] = { strikethrough = true },
+ ["@text.strong"] = { bold = styles.bold },
+ ["@text.title"] = { link = "Title" },
+ ["@text.title.1.markdown"] = { link = "markdownH1" },
+ ["@text.title.1.marker.markdown"] = { link = "markdownH1Delimiter" },
+ ["@text.title.2.markdown"] = { link = "markdownH2" },
+ ["@text.title.2.marker.markdown"] = { link = "markdownH2Delimiter" },
+ ["@text.title.3.markdown"] = { link = "markdownH3" },
+ ["@text.title.3.marker.markdown"] = { link = "markdownH3Delimiter" },
+ ["@text.title.4.markdown"] = { link = "markdownH4" },
+ ["@text.title.4.marker.markdown"] = { link = "markdownH4Delimiter" },
+ ["@text.title.5.markdown"] = { link = "markdownH5" },
+ ["@text.title.5.marker.markdown"] = { link = "markdownH5Delimiter" },
+ ["@text.title.6.markdown"] = { link = "markdownH6" },
+ ["@text.title.6.marker.markdown"] = { link = "markdownH6Delimiter" },
+ ["@text.underline"] = { underline = true },
+ ["@text.uri"] = { fg = groups.link },
+ ["@text.warning"] = { fg = groups.warn },
+ ["@todo"] = { link = "Todo" },
- local highlights = {
+ -- lukas-reineke/indent-blankline.nvim
+ IndentBlanklineChar = { fg = palette.muted, nocombine = true },
+ IndentBlanklineSpaceChar = { fg = palette.muted, nocombine = true },
+ IndentBlanklineSpaceCharBlankline = { fg = palette.muted, nocombine = true },
+ }
+ local default_highlights = {
ColorColumn = { bg = palette.surface },
Conceal = { bg = "NONE" },
CurSearch = { fg = palette.base, bg = palette.gold },
@@ -39,7 +95,7 @@ local function set_highlights()
diffAdded = { link = "DiffAdd" },
diffChanged = { link = "DiffChange" },
diffRemoved = { link = "DiffDelete" },
- Directory = make_title(),
+ Directory = { fg = palette.foam, bold = styles.bold },
-- EndOfBuffer = {},
ErrorMsg = { fg = groups.error, bold = styles.bold },
FloatBorder = make_border(),
@@ -85,13 +141,15 @@ local function set_highlights()
TabLine = { fg = palette.subtle, bg = groups.panel },
TabLineFill = { bg = groups.panel },
TabLineSel = { fg = palette.text, bg = palette.overlay, bold = styles.bold },
- Title = make_title(),
+ Title = { fg = palette.foam, bold = styles.bold },
VertSplit = { fg = groups.border },
Visual = { bg = palette.highlight_med },
-- VisualNOS = {},
WarningMsg = { fg = groups.warn, bold = styles.bold },
-- Whitespace = {},
WildMenu = { link = "IncSearch" },
+ WinBar = { fg = palette.subtle, bg = groups.panel },
+ WinBarNC = { fg = palette.muted, bg = groups.panel, blend = 60 },
WinSeparator = { fg = groups.border },
DiagnosticError = { fg = groups.error },
@@ -155,7 +213,7 @@ local function set_highlights()
String = { fg = palette.gold },
Structure = { fg = palette.foam },
Tag = { fg = palette.foam },
- Todo = { fg = palette.iris, bg = palette.iris, blend = 20 },
+ Todo = { fg = palette.rose, bg = palette.rose, blend = 20 },
Type = { fg = palette.foam },
TypeDef = { link = "Type" },
Underlined = { fg = palette.iris, underline = true },
@@ -179,17 +237,17 @@ local function set_highlights()
htmlTagName = { fg = palette.foam },
markdownDelimiter = { fg = palette.subtle },
- markdownH1 = { fg = groups.headings.h1, bold = styles.bold },
+ markdownH1 = { fg = groups.h1, bold = styles.bold },
markdownH1Delimiter = { link = "markdownH1" },
- markdownH2 = { fg = groups.headings.h2, bold = styles.bold },
+ markdownH2 = { fg = groups.h2, bold = styles.bold },
markdownH2Delimiter = { link = "markdownH2" },
- markdownH3 = { fg = groups.headings.h3, bold = styles.bold },
+ markdownH3 = { fg = groups.h3, bold = styles.bold },
markdownH3Delimiter = { link = "markdownH3" },
- markdownH4 = { fg = groups.headings.h4, bold = styles.bold },
+ markdownH4 = { fg = groups.h4, bold = styles.bold },
markdownH4Delimiter = { link = "markdownH4" },
- markdownH5 = { fg = groups.headings.h5, bold = styles.bold },
+ markdownH5 = { fg = groups.h5, bold = styles.bold },
markdownH5Delimiter = { link = "markdownH5" },
- markdownH6 = { fg = groups.headings.h6, bold = styles.bold },
+ markdownH6 = { fg = groups.h6, bold = styles.bold },
markdownH6Delimiter = { link = "markdownH6" },
markdownLinkText = { link = "markdownUrl" },
markdownUrl = { fg = groups.link, sp = groups.link, underline = true },
@@ -207,93 +265,144 @@ local function set_highlights()
mkdRule = { fg = palette.subtle },
mkdURL = { link = "markdownUrl" },
- ["@attribute.diff"] = { fg = palette.gold },
- ["@boolean"] = { link = "Boolean" },
+ --- Identifiers
+ ["@variable"] = { fg = palette.text, italic = styles.italic },
+ ["@variable.builtin"] = { fg = palette.text, bold = styles.bold },
+ ["@variable.parameter"] = { fg = palette.iris, italic = styles.italic },
+ ["@variable.member"] = { fg = palette.foam },
+
+ ["@constant"] = { fg = palette.gold },
+ ["@constant.builtin"] = { fg = palette.gold, bold = styles.bold },
+ ["@constant.macro"] = { fg = palette.gold },
+
+ ["@module"] = { fg = palette.text },
+ ["@module.builtin"] = { fg = palette.text, bold = styles.bold },
+ ["@label"] = { link = "Label" },
+
+ --- Literals
+ ["@string"] = { link = "String" },
+ -- ["@string.documentation"] = {},
+ ["@string.regexp"] = { fg = palette.iris },
+ ["@string.escape"] = { fg = palette.pine },
+ ["@string.special"] = { link = "String" },
+ ["@string.special.symbol"] = { link = "Identifier" },
+ ["@string.special.url"] = { fg = groups.link },
+ -- ["@string.special.path"] = {},
+
["@character"] = { link = "Character" },
["@character.special"] = { link = "Character" },
- ["@class"] = { fg = palette.foam },
- ["@comment"] = { link = "Comment" },
- ["@conditional"] = { link = "Conditional" },
- ["@constant"] = { link = "Constant" },
- ["@constant.builtin"] = { fg = palette.love },
- ["@constant.macro"] = { link = "Constant" },
- ["@constructor"] = { fg = palette.foam },
- ["@field"] = { fg = palette.foam },
- ["@function"] = { link = "Function" },
- ["@function.builtin"] = { fg = palette.love },
+
+ ["@boolean"] = { link = "Boolean" },
+ ["@number"] = { link = "Number" },
+ ["@number.float"] = { link = "Number" },
+
+ --- Types
+ ["@type"] = { fg = palette.foam },
+ ["@type.builtin"] = { fg = palette.foam, bold = styles.bold },
+ -- ["@type.definition"] = {},
+ -- ["@type.qualifier"] = {},
+
+ -- ["@attribute"] = {},
+ ["@property"] = { fg = palette.foam, italic = styles.italic },
+
+ --- Functions
+ ["@function"] = { fg = palette.rose },
+ ["@function.builtin"] = { fg = palette.rose, bold = styles.bold },
+ -- ["@function.call"] = {},
["@function.macro"] = { link = "Function" },
- ["@include"] = { link = "Include" },
- ["@interface"] = { fg = palette.foam },
+ ["@function.method"] = { fg = palette.rose },
+ ["@function.method.call"] = { fg = palette.iris },
+
+ ["@constructor"] = { fg = palette.foam },
+ ["@operator"] = { link = "Operator" },
+
+ --- Keywords
["@keyword"] = { link = "Keyword" },
+ -- ["@keyword.coroutine"] = {},
+ -- ["@keyword.function"] = {},
["@keyword.operator"] = { fg = palette.subtle },
- ["@label"] = { link = "Label" },
+ ["@keyword.import"] = { fg = palette.pine },
+ ["@keyword.storage"] = { fg = palette.foam },
+ ["@keyword.repeat"] = { fg = palette.pine },
+ ["@keyword.return"] = { fg = palette.pine },
+ ["@keyword.debug"] = { fg = palette.rose },
+ ["@keyword.exception"] = { fg = palette.pine },
+ ["@keyword.conditional"] = { fg = palette.pine },
+ ["@keyword.conditional.ternary"] = { fg = palette.pine },
+ ["@keyword.directive"] = { fg = palette.iris },
+ ["@keyword.directive.define"] = { fg = palette.iris },
+
+ --- Punctuation
+ ["@punctuation.delimiter"] = { fg = palette.subtle },
+ ["@punctuation.bracket"] = { fg = palette.subtle },
+ ["@punctuation.special"] = { fg = palette.subtle },
+
+ --- Comments
+ ["@comment"] = { link = "Comment" },
+ -- ["@comment.documentation"] = {},
+
+ ["@comment.error"] = { fg = groups.error },
+ ["@comment.warning"] = { fg = groups.warn },
+ ["@comment.todo"] = { fg = groups.todo, bg = groups.todo, blend = 20 },
+ ["@comment.hint"] = { fg = groups.hint, bg = groups.hint, blend = 20 },
+ ["@comment.info"] = { fg = groups.info, bg = groups.info, blend = 20 },
+ ["@comment.note"] = { fg = groups.note, bg = groups.note, blend = 20 },
+
+ --- Markup
+ ["@markup.strong"] = { bold = styles.bold },
+ ["@markup.italic"] = { italic = styles.italic },
+ ["@markup.strikethrough"] = { strikethrough = true },
+ ["@markup.underline"] = { underline = true },
+
+ ["@markup.heading"] = { fg = palette.foam, bold = styles.bold },
+
+ ["@markup.quote"] = { fg = palette.subtle },
+ ["@markup.math"] = { link = "Special" },
+ ["@markup.environment"] = { link = "Macro" },
+ ["@markup.environment.name"] = { link = "@type" },
+
+ -- ["@markup.link"] = {},
+ ["@markup.link.label"] = { fg = palette.text },
+ ["@markup.link.url"] = { fg = groups.link },
+
+ -- ["@markup.raw"] = { bg = palette.surface },
+ -- ["@markup.raw.block"] = { bg = palette.surface },
+
+ ["@markup.list"] = { fg = palette.text },
+ ["@markup.list.checked"] = { fg = palette.foam, bg = palette.foam, blend = 10 },
+ ["@markup.list.unchecked"] = { fg = palette.text },
+
+ ["@diff.plus"] = { fg = groups.git_add, bg = groups.git_add, blend = 20 },
+ ["@diff.minus"] = { fg = groups.git_delete, bg = groups.git_delete, blend = 20 },
+ ["@diff.delta"] = { bg = groups.git_change, blend = 20 },
+
+ ["@tag"] = { link = "Tag" },
+ ["@tag.attribute"] = { fg = palette.iris },
+ ["@tag.delimiter"] = { fg = palette.subtle },
+
+ --- Non-highlighting captures
+ -- ["@none"] = {},
+ ["@conceal"] = { link = "Conceal" },
+
+ -- ["@spell"] = {},
+ -- ["@nospell"] = {},
+
+ --- Semantic
["@lsp.type.comment"] = {},
- ["@lsp.type.enum"] = { link = "Type" },
+ ["@lsp.type.enum"] = { link = "@type" },
["@lsp.type.interface"] = { link = "@interface" },
- ["@lsp.type.keyword"] = { link = "Keyword" },
+ ["@lsp.type.keyword"] = { link = "@keyword" },
["@lsp.type.namespace"] = { link = "@namespace" },
["@lsp.type.parameter"] = { link = "@parameter" },
["@lsp.type.property"] = { link = "@property" },
["@lsp.type.variable"] = {},
- ["@lsp.typemod.function.defaultLibrary"] = { link = "Special" },
- ["@lsp.typemod.operator.injected"] = { link = "Operator" },
- ["@lsp.typemod.string.injected"] = { link = "String" },
+ ["@lsp.typemod.function.defaultLibrary"] = { link = "@function.builtin" },
+ ["@lsp.typemod.operator.injected"] = { link = "@operator" },
+ ["@lsp.typemod.string.injected"] = { link = "@string" },
["@lsp.typemod.variable.defaultLibrary"] = { link = "@variable.builtin" },
["@lsp.typemod.variable.injected"] = { link = "@variable" },
- ["@macro"] = { link = "Macro" },
- ["@method"] = { fg = palette.rose },
- ["@namespace"] = { link = "Include" },
- ["@number"] = { link = "Number" },
- ["@operator"] = { link = "Operator" },
- ["@parameter"] = { fg = palette.iris, italic = styles.italic },
- ["@preproc"] = { link = "PreProc" },
- ["@property"] = { fg = palette.foam, italic = styles.italic },
- ["@punctuation"] = { fg = palette.subtle },
- ["@punctuation.bracket"] = { link = "@punctuation" },
- ["@punctuation.delimiter"] = { link = "@punctuation" },
- ["@punctuation.special"] = { link = "@punctuation" },
- ["@regexp"] = { link = "String" },
- ["@repeat"] = { link = "Repeat" },
- ["@storageclass"] = { link = "StorageClass" },
- ["@string"] = { link = "String" },
- ["@string.escape"] = { fg = palette.pine },
- ["@string.special"] = { link = "String" },
- ["@symbol"] = { link = "Identifier" },
- ["@tag"] = { link = "Tag" },
- ["@tag.attribute"] = { fg = palette.iris },
- ["@tag.delimiter"] = { fg = palette.subtle },
- ["@text"] = { fg = palette.text },
- ["@text.danger"] = { fg = groups.error },
- ["@text.diff.add"] = { fg = groups.git_add, bg = groups.git_add, blend = 20 },
- ["@text.diff.delete"] = { fg = groups.git_delete, bg = groups.git_delete, blend = 20 },
- ["@text.emphasis"] = { italic = styles.italic },
- ["@text.environment"] = { link = "Macro" },
- ["@text.environment.name"] = { link = "Type" },
- ["@text.math"] = { link = "Special" },
- ["@text.note"] = { link = "SpecialComment" },
- ["@text.strike"] = { strikethrough = true },
- ["@text.strong"] = { bold = styles.bold },
- ["@text.title"] = { link = "Title" },
- ["@text.title.1.markdown"] = { link = "markdownH1" },
- ["@text.title.1.marker.markdown"] = { link = "markdownH1Delimiter" },
- ["@text.title.2.markdown"] = { link = "markdownH2" },
- ["@text.title.2.marker.markdown"] = { link = "markdownH2Delimiter" },
- ["@text.title.3.markdown"] = { link = "markdownH3" },
- ["@text.title.3.marker.markdown"] = { link = "markdownH3Delimiter" },
- ["@text.title.4.markdown"] = { link = "markdownH4" },
- ["@text.title.4.marker.markdown"] = { link = "markdownH4Delimiter" },
- ["@text.title.5.markdown"] = { link = "markdownH5" },
- ["@text.title.5.marker.markdown"] = { link = "markdownH5Delimiter" },
- ["@text.title.6.markdown"] = { link = "markdownH6" },
- ["@text.title.6.marker.markdown"] = { link = "markdownH6Delimiter" },
- ["@text.underline"] = { underline = true },
- ["@text.uri"] = { fg = groups.link },
- ["@text.warning"] = { fg = groups.warn },
- ["@todo"] = { link = "Todo" },
- ["@type"] = { link = "Type" },
- ["@variable"] = { fg = palette.text, italic = styles.italic },
- ["@variable.builtin"] = { fg = palette.love },
+ --- Plugins
-- romgrk/barbar.nvim
BufferCurrent = { fg = palette.text, bg = palette.overlay },
BufferCurrentIndex = { fg = palette.text, bg = palette.overlay },
@@ -347,7 +456,7 @@ local function set_highlights()
NvimTreeNormal = { link = "Normal" },
NvimTreeOpenedFile = { fg = palette.text, bg = palette.overlay },
NvimTreeOpenedFolderName = { link = "NvimTreeFolderName" },
- NvimTreeRootFolder = make_title(),
+ NvimTreeRootFolder = { fg = palette.foam, bold = styles.bold },
NvimTreeSpecialFile = { link = "NvimTreeNormal" },
NvimTreeWindowPicker = { link = "StatusLineTerm" },
@@ -377,11 +486,6 @@ local function set_highlights()
IblScope = { fg = palette.foam },
IblWhitespace = { fg = palette.overlay },
- -- for legacy usage
- IndentBlanklineChar = { fg = palette.muted, nocombine = true },
- IndentBlanklineSpaceChar = { fg = palette.muted, nocombine = true },
- IndentBlanklineSpaceCharBlankline = { fg = palette.muted, nocombine = true },
-
-- hrsh7th/nvim-cmp
CmpItemAbbr = { fg = palette.subtle },
CmpItemAbbrDeprecated = { fg = palette.subtle, strikethrough = true },
@@ -438,7 +542,7 @@ local function set_highlights()
NeorgHeading5Title = { link = "markdownH5" },
NeorgHeading6Prefix = { link = "markdownH6Delimiter" },
NeorgHeading6Title = { link = "markdownH6" },
- NeorgMarkerTitle = make_title(),
+ NeorgMarkerTitle = { fg = palette.foam, bold = styles.bold },
-- tami5/lspsaga.nvim (fork of glepnir/lspsaga.nvim)
DefinitionCount = { fg = palette.rose },
@@ -453,7 +557,7 @@ local function set_highlights()
LspSagaCodeActionTruncateLine = { link = "LspSagaCodeActionBorder" },
LspSagaDefPreviewBorder = make_border(),
LspSagaDiagnosticBorder = make_border(palette.gold),
- LspSagaDiagnosticHeader = make_title(),
+ LspSagaDiagnosticHeader = { fg = palette.foam, bold = styles.bold },
LspSagaDiagnosticTruncateLine = { link = "LspSagaDiagnosticBorder" },
LspSagaDocTruncateLine = { link = "LspSagaHoverBorder" },
LspSagaFinderSelection = { fg = palette.gold },
@@ -497,11 +601,11 @@ local function set_highlights()
TelescopePromptPrefix = { fg = palette.subtle },
TelescopeSelection = { fg = palette.text, bg = palette.overlay },
TelescopeSelectionCaret = { fg = palette.rose, bg = palette.overlay },
- TelescopeTitle = make_title(),
+ TelescopeTitle = { fg = palette.foam, bold = styles.bold },
-- ibhagwan/fzf-lua
FzfLuaNormal = { link = "NormalFloat" },
- FwzfLuaTitle = make_title(),
+ FwzfLuaTitle = { fg = palette.foam, bold = styles.bold },
FzfLuaBorder = make_border(),
FzfLuaHeaderText = { fg = palette.love },
FzfLuaHeaderBind = { fg = palette.rose },
@@ -606,7 +710,6 @@ local function set_highlights()
-- github/copilot.vim
CopilotSuggestion = { fg = palette.muted, italic = styles.italic },
}
-
local transparency_highlights = {
DiagnosticVirtualTextError = { fg = groups.error },
DiagnosticVirtualTextHint = { fg = groups.hint },
@@ -626,6 +729,9 @@ local function set_highlights()
TabLineFill = { bg = "NONE" },
TabLineSel = { fg = palette.text, bg = "NONE", bold = styles.bold },
+ -- ["@markup.raw"] = { bg = "none" },
+ -- ["@markup.raw.block"] = { bg = "none" },
+
TelescopeNormal = { fg = palette.subtle, bg = "NONE" },
TelescopePromptNormal = { fg = palette.text, bg = "NONE" },
TelescopeSelection = { fg = palette.text, bg = "NONE", bold = styles.bold },
@@ -643,31 +749,57 @@ local function set_highlights()
MiniPickPrompt = { bg = "NONE", bold = styles.bold },
}
+ if config.options.enable.legacy_highlights then
+ for group, highlight in pairs(legacy_highlights) do
+ highlights[group] = highlight
+ end
+ end
+ for group, highlight in pairs(default_highlights) do
+ highlights[group] = highlight
+ end
if styles.transparency then
for group, highlight in pairs(transparency_highlights) do
highlights[group] = highlight
end
end
- for group, options in pairs(config.options.highlight_groups) do
- local default_opts = highlights[group] or {}
+ -- Reconcile highlights with config
+ if config.options.highlight_groups ~= nil and next(config.options.highlight_groups) ~= nil then
+ for group, highlight in pairs(config.options.highlight_groups) do
+ local existing = highlights[group] or {}
+ local parsed = vim.tbl_extend("force", {}, highlight)
- if (options.inherit == nil or options.inherit) and default_opts ~= nil then -- On merge.
- options.inherit = nil -- Don't add this key to the highlight_group after merge.
- highlights[group] = vim.tbl_extend("force", default_opts, options)
- else -- On overwrite.
- options.inherit = nil -- Don't add this key to the highlight_group.
- highlights[group] = options
+ if highlight.fg ~= nil then
+ parsed.fg = utilities.parse_color(highlight.fg) or highlight.fg
+ end
+ if highlight.bg ~= nil then
+ parsed.bg = utilities.parse_color(highlight.bg) or highlight.bg
+ end
+ if highlight.sp ~= nil then
+ parsed.sp = utilities.parse_color(highlight.sp) or highlight.sp
+ end
+
+ if (highlight.inherit == nil or highlight.inherit) and existing ~= nil then
+ highlight.inherit = nil
+ highlights[group] = vim.tbl_extend("force", existing, parsed)
+ else
+ highlight.inherit = nil
+ highlights[group] = parsed
+ end
end
-
- highlights[group] = vim.tbl_extend("force", highlights[group] or {}, options)
end
for group, highlight in pairs(highlights) do
- config.options.before_highlight(group, highlight, palette)
- utilities.highlight(group, highlight)
+ if config.options.before_highlight ~= nil then
+ config.options.before_highlight(group, highlight, palette)
+ end
+ if highlight.blend ~= nil and (highlight.blend >= 0 and highlight.blend <= 100) and highlight.bg ~= nil then
+ highlight.bg = utilities.blend(highlight.bg, highlight.blend_on or palette.base, highlight.blend / 100)
+ end
+ vim.api.nvim_set_hl(0, group, highlight)
end
+ --- Terminal
if config.options.enable.terminal then
vim.g.terminal_color_0 = palette.overlay -- black
vim.g.terminal_color_8 = palette.subtle -- bright black
diff --git a/lua/rose-pine/config.lua b/lua/rose-pine/config.lua
index beed052..f127e33 100644
--- a/lua/rose-pine/config.lua
+++ b/lua/rose-pine/config.lua
@@ -1,7 +1,7 @@
---@alias Variant "main" | "moon" | "dawn"
---@alias Palette { base: string, surface: string, overlay: string, muted: string, subtle: string, text: string, love: string, gold: string, rose: string, pine: string, foam: string, iris: string }
---@alias PaletteColor "base" | "surface" | "overlay" | "muted" | "subtle" | "text" | "love" | "gold" | "rose" | "pine" | "foam" | "iris" | "highlight_low" | "highlight_med" | "highlight_high"
----@alias Highlight { fg: string, bg: string, sp: string, bold: boolean, italic: boolean, undercurl: boolean, underline: boolean, underdouble: boolean, underdotted: boolean, underdashed: boolean, strikethrough: boolean }
+---@alias Highlight { fg: string, bg: string, sp: string, bold: boolean, italic: boolean, undercurl: boolean, underline: boolean, underdouble: boolean, underdotted: boolean, underdashed: boolean, strikethrough: boolean, inherit: boolean }
local config = {}
@@ -24,8 +24,9 @@ config.options = {
extend_background_behind_borders = true,
enable = {
- terminal = true,
+ legacy_highlights = true,
migrations = true,
+ terminal = true,
},
styles = {
@@ -43,6 +44,8 @@ config.options = {
error = "love",
hint = "iris",
info = "foam",
+ note = "pine",
+ todo = "rose",
warn = "gold",
git_add = "foam",
@@ -56,15 +59,13 @@ config.options = {
git_text = "rose",
git_untracked = "subtle",
- ---@type string | PaletteColor | table
- headings = {
- h1 = "iris",
- h2 = "foam",
- h3 = "rose",
- h4 = "gold",
- h5 = "pine",
- h6 = "foam",
- },
+ ---@type string | PaletteColor
+ h1 = "iris",
+ h2 = "foam",
+ h3 = "rose",
+ h4 = "gold",
+ h5 = "pine",
+ h6 = "foam",
---@deprecated Replaced by `options.highlight_groups["Normal"]`
-- background = "base",
@@ -72,6 +73,8 @@ config.options = {
-- comment = "subtle",
---@deprecated Replaced by `options.highlight_groups["@punctuation"]`
-- punctuation = "muted",
+ ---@deprecated Expects a table with values h1...h6
+ -- headings = "text",
},
---@type table
@@ -103,6 +106,10 @@ local function migrate(options)
options.highlight_groups["WinSeparator"] = { fg = border, bg = border }
end
+ if options.disable_background then
+ options.highlight_groups["Normal"] = { bg = "NONE" }
+ end
+
if options.disable_float_background then
options.highlight_groups["NormalFloat"] = { bg = "NONE" }
end
@@ -121,7 +128,8 @@ local function migrate(options)
options.highlight_groups["@punctuation"] = { fg = options.groups.punctuation }
end
- options.styles.transparency = options.disable_background or options.styles.transparency
+ options.styles.transparency = (options.disable_background and options.disable_float_background)
+ or options.styles.transparency
-- These never actually existed, but may be set intuitively by the user
-- because of `disable_italics` existing.
@@ -142,6 +150,14 @@ local function migrate(options)
h6 = options.groups.headings,
}
end
+ if type(options.groups.headings) == "table" then
+ options.groups.h1 = options.groups.headings.h1 or options.groups.h1
+ options.groups.h2 = options.groups.headings.h2 or options.groups.h2
+ options.groups.h3 = options.groups.headings.h3 or options.groups.h3
+ options.groups.h4 = options.groups.headings.h4 or options.groups.h4
+ options.groups.h5 = options.groups.headings.h5 or options.groups.h5
+ options.groups.h6 = options.groups.headings.h6 or options.groups.h6
+ end
return options
end
diff --git a/lua/rose-pine/utilities.lua b/lua/rose-pine/utilities.lua
index e4c72cc..26e019e 100644
--- a/lua/rose-pine/utilities.lua
+++ b/lua/rose-pine/utilities.lua
@@ -15,9 +15,9 @@ local function color_to_rgb(color)
end
---@param color string Palette key or hex value
-local function parse_color(color)
+function utilities.parse_color(color)
if color == nil then
- return print("Invalid color")
+ return print("Invalid color: " .. color)
end
color = color:lower()
@@ -32,7 +32,7 @@ end
---@param fg string Foreground color
---@param bg string Background color
---@param alpha number Between 0 (background) and 1 (foreground)
-local function blend(fg, bg, alpha)
+function utilities.blend(fg, bg, alpha)
local fg_rgb = color_to_rgb(fg)
local bg_rgb = color_to_rgb(bg)
@@ -44,23 +44,4 @@ local function blend(fg, bg, alpha)
return string.format("#%02X%02X%02X", blend_channel(1), blend_channel(2), blend_channel(3))
end
----@param group string
----@param highlight table
-function utilities.highlight(group, highlight, blend_on)
- local fg = highlight.fg and parse_color(highlight.fg) or "NONE"
- local bg = highlight.bg and parse_color(highlight.bg) or "NONE"
- local sp = highlight.sp and parse_color(highlight.sp) or "NONE"
-
- if highlight.blend ~= nil and (highlight.blend >= 0 and highlight.blend <= 100) and bg ~= nil then
- bg = blend(bg, blend_on or require("rose-pine.palette").base, highlight.blend / 100)
- end
-
- highlight.fg = fg
- highlight.bg = bg
- highlight.sp = sp
- -- highlight = vim.tbl_extend("force", highlight, { fg = fg, bg = bg, sp = sp })
-
- vim.api.nvim_set_hl(0, group, highlight)
-end
-
return utilities
diff --git a/readme.md b/readme.md
index 0c13fae..7a4a93d 100644
--- a/readme.md
+++ b/readme.md
@@ -57,6 +57,14 @@ require('rose-pine').setup({
dim_inactive_windows = false,
extend_background_behind_borders = true,
+ enable = {
+ terminal = true,
+ -- Improve compatibility for previous versions of Neovim
+ legacy_highlights = true,
+ -- Handle deprecated options automatically
+ migrations = true,
+ },
+
styles = {
bold = true,
italic = true,
@@ -71,6 +79,8 @@ require('rose-pine').setup({
error = "love",
hint = "iris",
info = "foam",
+ note = "pine",
+ todo = "rose",
warn = "gold",
git_add = "foam",
@@ -84,16 +94,12 @@ require('rose-pine').setup({
git_text = "rose",
git_untracked = "subtle",
- headings = {
- h1 = "iris",
- h2 = "foam",
- h3 = "rose",
- h4 = "gold",
- h5 = "pine",
- h6 = "foam",
- },
- -- Alternatively, set all headings at once.
- -- headings = "subtle",
+ h1 = "iris",
+ h2 = "foam",
+ h3 = "rose",
+ h4 = "gold",
+ h5 = "pine",
+ h6 = "foam",
},
highlight_groups = {
@@ -125,6 +131,6 @@ vim.cmd('colorscheme rose-pine')
## Contributing
-We welcome and appreciate contributions of any kind. Create an issue or start a discussion for any proposed changes. Pull requests are encouraged for supporting additional plugins.
+We welcome and appreciate contributions of any kind. Create an issue or start a discussion for any proposed changes. Pull requests are encouraged for supporting additional plugins or [treesitter improvements](https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md#highlights).
Feel free to update the [wiki](https://github.com/rose-pine/neovim/wiki/) with any [recipes](https://github.com/rose-pine/neovim/wiki/Recipes).
From e62a61166ebfa2e5fdad4993310b290ac9b905c1 Mon Sep 17 00:00:00 2001
From: not
Date: Fri, 26 Jan 2024 21:43:53 -0600
Subject: [PATCH 16/97] fix: regression in options (#221)
* fix: headings not migrating to flat options
* fix: invalid key when using inherit
---
lua/rose-pine.lua | 4 ++--
lua/rose-pine/config.lua | 18 ++++++++----------
2 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 9240a51..c546297 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -780,10 +780,10 @@ local function set_highlights()
end
if (highlight.inherit == nil or highlight.inherit) and existing ~= nil then
- highlight.inherit = nil
+ parsed.inherit = nil
highlights[group] = vim.tbl_extend("force", existing, parsed)
else
- highlight.inherit = nil
+ parsed.inherit = nil
highlights[group] = parsed
end
end
diff --git a/lua/rose-pine/config.lua b/lua/rose-pine/config.lua
index f127e33..cb99137 100644
--- a/lua/rose-pine/config.lua
+++ b/lua/rose-pine/config.lua
@@ -141,16 +141,13 @@ local function migrate(options)
-- Set h1 through h6 to the same color if only one is specified
if type(options.groups.headings) == "string" then
- options.groups.headings = {
- h1 = options.groups.headings,
- h2 = options.groups.headings,
- h3 = options.groups.headings,
- h4 = options.groups.headings,
- h5 = options.groups.headings,
- h6 = options.groups.headings,
- }
- end
- if type(options.groups.headings) == "table" then
+ options.groups.h1 = options.groups.headings
+ options.groups.h2 = options.groups.headings
+ options.groups.h3 = options.groups.headings
+ options.groups.h4 = options.groups.headings
+ options.groups.h5 = options.groups.headings
+ options.groups.h6 = options.groups.headings
+ elseif options.groups.headings == "table" then
options.groups.h1 = options.groups.headings.h1 or options.groups.h1
options.groups.h2 = options.groups.headings.h2 or options.groups.h2
options.groups.h3 = options.groups.headings.h3 or options.groups.h3
@@ -158,6 +155,7 @@ local function migrate(options)
options.groups.h5 = options.groups.headings.h5 or options.groups.h5
options.groups.h6 = options.groups.headings.h6 or options.groups.h6
end
+ options.groups.headings = nil
return options
end
From 8514c638bce309dbfc5bd42de4e1f8fb5622875a Mon Sep 17 00:00:00 2001
From: Wahyu Wiyoko <137708513+wahyuwiyoko@users.noreply.github.com>
Date: Sat, 27 Jan 2024 23:43:15 +0800
Subject: [PATCH 17/97] fix: misspelled highlight group name (#223)
---
lua/rose-pine.lua | 8 +-
lua/rose-pine/plugins/bufferline.lua | 190 +++++++++++++--------------
lua/rose-pine/plugins/galaxyline.lua | 2 +-
lua/rose-pine/plugins/markid.lua | 2 +-
lua/rose-pine/plugins/toggleterm.lua | 4 +-
readme.md | 20 ++-
6 files changed, 112 insertions(+), 114 deletions(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index c546297..fe5f331 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -202,8 +202,8 @@ local function set_highlights()
Macro = { fg = palette.iris },
Number = { fg = palette.gold },
Operator = { fg = palette.subtle },
- PreConduit = { fg = palette.iris },
- PreProc = { link = "PreConduit" },
+ PreCondit = { fg = palette.iris },
+ PreProc = { link = "PreCondit" },
Repeat = { fg = palette.pine },
Special = { fg = palette.foam },
SpecialChar = { link = "Special" },
@@ -547,7 +547,7 @@ local function set_highlights()
-- tami5/lspsaga.nvim (fork of glepnir/lspsaga.nvim)
DefinitionCount = { fg = palette.rose },
DefinitionIcon = { fg = palette.rose },
- DefintionPreviewTitle = { fg = palette.rose, bold = styles.bold },
+ DefinitionPreviewTitle = { fg = palette.rose, bold = styles.bold },
LspFloatWinBorder = make_border(),
LspFloatWinNormal = { bg = groups.panel },
LspSagaAutoPreview = { fg = palette.subtle },
@@ -605,7 +605,7 @@ local function set_highlights()
-- ibhagwan/fzf-lua
FzfLuaNormal = { link = "NormalFloat" },
- FwzfLuaTitle = { fg = palette.foam, bold = styles.bold },
+ FzfLuaTitle = { fg = palette.foam, bold = styles.bold },
FzfLuaBorder = make_border(),
FzfLuaHeaderText = { fg = palette.love },
FzfLuaHeaderBind = { fg = palette.rose },
diff --git a/lua/rose-pine/plugins/bufferline.lua b/lua/rose-pine/plugins/bufferline.lua
index 9f85ccd..7a96026 100644
--- a/lua/rose-pine/plugins/bufferline.lua
+++ b/lua/rose-pine/plugins/bufferline.lua
@@ -2,43 +2,43 @@
--- https://github.com/akinsho/bufferline.nvim
---
--- @usage
---- local highlights = require('rose-pine.plugins.bufferline')
---- require('bufferline').setup({ highlights = highlights })
+--- local highlights = require("rose-pine.plugins.bufferline")
+--- require("bufferline").setup({ highlights = highlights })
local p = require("rose-pine.palette")
return {
-- fill = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
-- background = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
-- tab = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
tab_selected = {
fg = p.text,
bg = p.overlay,
},
-- tab_close = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
-- close_button = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
-- close_button_visible = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
-- close_button_selected = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
buffer_visible = {
fg = p.subtle,
@@ -51,172 +51,172 @@ return {
italic = true,
},
-- diagnostic = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
-- diagnostic_visible = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
-- diagnostic_selected = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- bold = true,
-- italic = true,
-- },
-- info = {
- -- fg = '',
- -- sp = '',
- -- bg = '',
+ -- fg = "",
+ -- sp = "",
+ -- bg = "",
-- },
-- info_visible = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
-- info_selected = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- bold = true,
-- italic = true,
- -- sp = '',
+ -- sp = "",
-- },
-- info_diagnostic = {
- -- fg = '',
- -- sp = '',
- -- bg = '',
+ -- fg = "",
+ -- sp = "",
+ -- bg = "",
-- },
-- info_diagnostic_visible = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
-- info_diagnostic_selected = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- bold = true,
-- italic = true,
- -- sp = '',
+ -- sp = "",
-- },
-- warning = {
- -- fg = '',
- -- sp = '',
- -- bg = '',
+ -- fg = "",
+ -- sp = "",
+ -- bg = "",
-- },
-- warning_visible = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
-- warning_selected = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- bold = true,
-- italic = true,
- -- sp = '',
+ -- sp = "",
-- },
-- warning_diagnostic = {
- -- fg = '',
- -- sp = '',
- -- bg = '',
+ -- fg = "",
+ -- sp = "",
+ -- bg = "",
-- },
-- warning_diagnostic_visible = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
-- warning_diagnostic_selected = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- bold = true,
-- italic = true,
-- sp = warning_diagnostic_fg,
-- },
-- error = {
- -- fg = '',
- -- bg = '',
- -- sp = '',
+ -- fg = "",
+ -- bg = "",
+ -- sp = "",
-- },
-- error_visible = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
-- error_selected = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- bold = true,
-- italic = true,
- -- sp = '',
+ -- sp = "",
-- },
-- error_diagnostic = {
- -- fg = '',
- -- bg = '',
- -- sp = '',
+ -- fg = "",
+ -- bg = "",
+ -- sp = "",
-- },
-- error_diagnostic_visible = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
-- error_diagnostic_selected = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- bold = true,
-- italic = true,
- -- sp = '',
+ -- sp = "",
-- },
-- modified = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
-- modified_visible = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
-- modified_selected = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
-- duplicate_selected = {
- -- fg = '',
+ -- fg = "",
-- italic = true,
- -- bg = '',
+ -- bg = "",
-- },
-- duplicate_visible = {
- -- fg = '',
+ -- fg = "",
-- italic = true,
- -- bg = '',
+ -- bg = "",
-- },
-- duplicate = {
- -- fg = '',
+ -- fg = "",
-- italic = true,
- -- bg = '',
+ -- bg = "",
-- },
-- separator_selected = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
-- separator_visible = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
-- separator = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
-- indicator_selected = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- },
-- pick_selected = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- italic = true,
-- },
-- pick_visible = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- bold = true,
-- italic = true,
-- },
-- pick = {
- -- fg = '',
- -- bg = '',
+ -- fg = "",
+ -- bg = "",
-- bold = true,
-- italic = true,
-- },
diff --git a/lua/rose-pine/plugins/galaxyline.lua b/lua/rose-pine/plugins/galaxyline.lua
index f2c01ab..05d9b28 100644
--- a/lua/rose-pine/plugins/galaxyline.lua
+++ b/lua/rose-pine/plugins/galaxyline.lua
@@ -2,7 +2,7 @@
--- https://github.com/NTBBloodbath/galaxyline.nvim
---
--- @usage
---- local highlights = require('rose-pine.plugins.galaxyline')
+--- local highlights = require("rose-pine.plugins.galaxyline")
local p = require("rose-pine.palette")
diff --git a/lua/rose-pine/plugins/markid.lua b/lua/rose-pine/plugins/markid.lua
index 2a7b273..3d6d8f9 100644
--- a/lua/rose-pine/plugins/markid.lua
+++ b/lua/rose-pine/plugins/markid.lua
@@ -2,7 +2,7 @@
--- https://github.com/David-Kunz/markid
---
--- @usage
---- local highlights = require('rose-pine.plugins.markid')
+--- local highlights = require("rose-pine.plugins.markid")
--- require("nvim-treesitter.configs").setup({ markid = { enable = true, colors = highlights } })
local p = require("rose-pine.palette")
diff --git a/lua/rose-pine/plugins/toggleterm.lua b/lua/rose-pine/plugins/toggleterm.lua
index 87b0abc..7f808eb 100644
--- a/lua/rose-pine/plugins/toggleterm.lua
+++ b/lua/rose-pine/plugins/toggleterm.lua
@@ -2,8 +2,8 @@
--- https://github.com/akinsho/toggleterm.nvim
---
--- @usage
---- local highlights = require('rose-pine.plugins.toggleterm')
---- require('toggleterm').setup({ highlights = highlights })
+--- local highlights = require("rose-pine.plugins.toggleterm")
+--- require("toggleterm").setup({ highlights = highlights })
return {
Normal = { link = "Normal" },
diff --git a/readme.md b/readme.md
index 7a4a93d..7c1ac9b 100644
--- a/readme.md
+++ b/readme.md
@@ -18,13 +18,13 @@ Install `rose-pine/neovim` using your favourite plugin manager:
**paq-nvim**
```lua
-{ 'rose-pine/neovim', as = 'rose-pine' }
+{ "rose-pine/neovim", as = "rose-pine" }
```
**lazy.nvim**
```lua
-{ 'rose-pine/neovim', name = 'rose-pine' }
+{ "rose-pine/neovim", name = "rose-pine" }
```
## Gallery
@@ -51,7 +51,7 @@ Rosé Pine has three variants: main, moon, and dawn. By default, `vim.o.backgrou
Colour values accept named colours from the [Rosé Pine palette](https://rosepinetheme.com/palette/ingredients/), e.g. "foam", or valid hex, e.g. "#fa8072".
```lua
-require('rose-pine').setup({
+require("rose-pine").setup({
variant = "auto", -- auto, main, moon, or dawn
dark_variant = "main", -- main, moon, or dawn
dim_inactive_windows = false,
@@ -59,10 +59,8 @@ require('rose-pine').setup({
enable = {
terminal = true,
- -- Improve compatibility for previous versions of Neovim
- legacy_highlights = true,
- -- Handle deprecated options automatically
- migrations = true,
+ legacy_highlights = true, -- Improve compatibility for previous versions of Neovim
+ migrations = true, -- Handle deprecated options automatically
},
styles = {
@@ -120,10 +118,10 @@ require('rose-pine').setup({
end,
})
-vim.cmd('colorscheme rose-pine')
--- vim.cmd('colorscheme rose-pine-main')
--- vim.cmd('colorscheme rose-pine-moon')
--- vim.cmd('colorscheme rose-pine-dawn')
+vim.cmd("colorscheme rose-pine")
+-- vim.cmd("colorscheme rose-pine-main")
+-- vim.cmd("colorscheme rose-pine-moon")
+-- vim.cmd("colorscheme rose-pine-dawn")
```
> [!NOTE]
From 0b77ef0e7ba20f6de9efb991bd46379144b534ba Mon Sep 17 00:00:00 2001
From: not
Date: Sat, 27 Jan 2024 20:34:00 -0600
Subject: [PATCH 18/97] chore: update variable highlights (#226)
---
lua/rose-pine.lua | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index fe5f331..82c7c15 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -267,7 +267,7 @@ local function set_highlights()
--- Identifiers
["@variable"] = { fg = palette.text, italic = styles.italic },
- ["@variable.builtin"] = { fg = palette.text, bold = styles.bold },
+ ["@variable.builtin"] = { fg = palette.love, bold = styles.bold },
["@variable.parameter"] = { fg = palette.iris, italic = styles.italic },
["@variable.member"] = { fg = palette.foam },
@@ -395,7 +395,7 @@ local function set_highlights()
["@lsp.type.namespace"] = { link = "@namespace" },
["@lsp.type.parameter"] = { link = "@parameter" },
["@lsp.type.property"] = { link = "@property" },
- ["@lsp.type.variable"] = {},
+ ["@lsp.type.variable"] = { link = "@variable" },
["@lsp.typemod.function.defaultLibrary"] = { link = "@function.builtin" },
["@lsp.typemod.operator.injected"] = { link = "@operator" },
["@lsp.typemod.string.injected"] = { link = "@string" },
From 4452ecd14092c7d9be3ae584611e539a03d6b09a Mon Sep 17 00:00:00 2001
From: Eric Milford
Date: Sat, 27 Jan 2024 21:02:37 -0600
Subject: [PATCH 19/97] feat: Add support for Neotest (#225)
https://github.com/nvim-neotest/neotest/
---
lua/rose-pine.lua | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 82c7c15..0a8081a 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -460,6 +460,26 @@ local function set_highlights()
NvimTreeSpecialFile = { link = "NvimTreeNormal" },
NvimTreeWindowPicker = { link = "StatusLineTerm" },
+ -- nvim-neotest/neotest
+ NeotestAdapterName = { fg = palette.iris },
+ NeotestBorder = { fg = palette.highlight_med },
+ NeotestDir = { fg = palette.foam },
+ NeotestExpandMarker = { fg = palette.highlight_med },
+ NeotestFailed = { fg = palette.love },
+ NeotestFile = { fg = palette.text },
+ NeotestFocused = { fg = palette.gold, bg = palette.highlight_med },
+ NeotestIndent = { fg = "" },
+ NeotestMarked = { fg = palette.rose, bold = styles.bold },
+ NeotestNamespace = { fg = palette.gold },
+ NeotestPassed = { fg = palette.pine },
+ NeotestRunning = { fg = palette.gold },
+ NeotestWinSelect = { fg = palette.muted },
+ NeotestSkipped = { fg = palette.subtle },
+ NeotestTarget = { fg = palette.love },
+ NeotestTest = { fg = palette.gold },
+ NeotestUnknown = { fg = palette.subtle },
+ NeotestWatching = { fg = palette.iris },
+
-- nvim-neo-tree/neo-tree.nvim
NeoTreeGitAdded = { fg = groups.git_add },
NeoTreeGitConflict = { fg = groups.git_merge },
From 75d145fa0880294c78ca946247bdbc8dd2d309d1 Mon Sep 17 00:00:00 2001
From: Maxim Kozhukh <89997671+nicejji@users.noreply.github.com>
Date: Mon, 29 Jan 2024 18:48:02 +0300
Subject: [PATCH 20/97] fix: unable to override linked groups (#230)
---
lua/rose-pine.lua | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 0a8081a..d0b2324 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -787,6 +787,12 @@ local function set_highlights()
if config.options.highlight_groups ~= nil and next(config.options.highlight_groups) ~= nil then
for group, highlight in pairs(config.options.highlight_groups) do
local existing = highlights[group] or {}
+ -- Traverse link due to
+ -- "If link is used in combination with other attributes; only the link will take effect"
+ -- see: https://neovim.io/doc/user/api.html#nvim_set_hl()
+ while existing.link ~= nil do
+ existing = highlights[existing.link] or {}
+ end
local parsed = vim.tbl_extend("force", {}, highlight)
if highlight.fg ~= nil then
From 9d0e1b70d9de879be2dde1f2b1c69a6958d4083a Mon Sep 17 00:00:00 2001
From: Lin Tinusgrag
Date: Mon, 29 Jan 2024 23:54:19 +0800
Subject: [PATCH 21/97] feat: make markdown headings distinguishable with
treesitter (#232)
---
lua/rose-pine.lua | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index d0b2324..a965c28 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -372,6 +372,20 @@ local function set_highlights()
["@markup.list.checked"] = { fg = palette.foam, bg = palette.foam, blend = 10 },
["@markup.list.unchecked"] = { fg = palette.text },
+ -- Markdown headings
+ ["@markup.heading.1.markdown"] = { link = "markdownH1" },
+ ["@markup.heading.2.markdown"] = { link = "markdownH2" },
+ ["@markup.heading.3.markdown"] = { link = "markdownH3" },
+ ["@markup.heading.4.markdown"] = { link = "markdownH4" },
+ ["@markup.heading.5.markdown"] = { link = "markdownH5" },
+ ["@markup.heading.6.markdown"] = { link = "markdownH6" },
+ ["@markup.heading.1.marker.markdown"] = { link = "markdownH1Delimiter" },
+ ["@markup.heading.2.marker.markdown"] = { link = "markdownH2Delimiter" },
+ ["@markup.heading.3.marker.markdown"] = { link = "markdownH3Delimiter" },
+ ["@markup.heading.4.marker.markdown"] = { link = "markdownH4Delimiter" },
+ ["@markup.heading.5.marker.markdown"] = { link = "markdownH5Delimiter" },
+ ["@markup.heading.6.marker.markdown"] = { link = "markdownH6Delimiter" },
+
["@diff.plus"] = { fg = groups.git_add, bg = groups.git_add, blend = 20 },
["@diff.minus"] = { fg = groups.git_delete, bg = groups.git_delete, blend = 20 },
["@diff.delta"] = { bg = groups.git_change, blend = 20 },
From 95e97671656fe69e91eb77d6585fc3565773e4d5 Mon Sep 17 00:00:00 2001
From: Maxim Kozhukh <89997671+nicejji@users.noreply.github.com>
Date: Mon, 29 Jan 2024 18:57:21 +0300
Subject: [PATCH 22/97] feat: use treesitter highlights for @lsp.type.variable
(#233)
---
lua/rose-pine.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index a965c28..bd21454 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -409,7 +409,7 @@ local function set_highlights()
["@lsp.type.namespace"] = { link = "@namespace" },
["@lsp.type.parameter"] = { link = "@parameter" },
["@lsp.type.property"] = { link = "@property" },
- ["@lsp.type.variable"] = { link = "@variable" },
+ ["@lsp.type.variable"] = {}, -- use treesitter styles for regular variables
["@lsp.typemod.function.defaultLibrary"] = { link = "@function.builtin" },
["@lsp.typemod.operator.injected"] = { link = "@operator" },
["@lsp.typemod.string.injected"] = { link = "@string" },
From 4372c4eb4970fc30a213d1fd2363d30df23386c8 Mon Sep 17 00:00:00 2001
From: not
Date: Thu, 8 Feb 2024 13:42:03 -0600
Subject: [PATCH 23/97] feat: improve markdown syntax (#237)
* types: update highlight type
* feat: improve markdown highlighting
---
lua/rose-pine.lua | 6 +++++-
lua/rose-pine/config.lua | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index bd21454..60b3e3c 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -362,11 +362,13 @@ local function set_highlights()
["@markup.environment.name"] = { link = "@type" },
-- ["@markup.link"] = {},
- ["@markup.link.label"] = { fg = palette.text },
+ ["@markup.link.markdown_inline"] = { fg = palette.subtle },
+ ["@markup.link.label.markdown_inline"] = { fg = palette.foam },
["@markup.link.url"] = { fg = groups.link },
-- ["@markup.raw"] = { bg = palette.surface },
-- ["@markup.raw.block"] = { bg = palette.surface },
+ ["@markup.raw.delimiter.markdown"] = { bg = palette.subtle },
["@markup.list"] = { fg = palette.text },
["@markup.list.checked"] = { fg = palette.foam, bg = palette.foam, blend = 10 },
@@ -397,6 +399,7 @@ local function set_highlights()
--- Non-highlighting captures
-- ["@none"] = {},
["@conceal"] = { link = "Conceal" },
+ ["@conceal.markdown"] = { fg = palette.subtle },
-- ["@spell"] = {},
-- ["@nospell"] = {},
@@ -764,6 +767,7 @@ local function set_highlights()
TabLineSel = { fg = palette.text, bg = "NONE", bold = styles.bold },
-- ["@markup.raw"] = { bg = "none" },
+ ["@markup.raw.markdown_inline"] = { fg = palette.gold },
-- ["@markup.raw.block"] = { bg = "none" },
TelescopeNormal = { fg = palette.subtle, bg = "NONE" },
diff --git a/lua/rose-pine/config.lua b/lua/rose-pine/config.lua
index cb99137..7b6f8aa 100644
--- a/lua/rose-pine/config.lua
+++ b/lua/rose-pine/config.lua
@@ -1,7 +1,7 @@
---@alias Variant "main" | "moon" | "dawn"
---@alias Palette { base: string, surface: string, overlay: string, muted: string, subtle: string, text: string, love: string, gold: string, rose: string, pine: string, foam: string, iris: string }
---@alias PaletteColor "base" | "surface" | "overlay" | "muted" | "subtle" | "text" | "love" | "gold" | "rose" | "pine" | "foam" | "iris" | "highlight_low" | "highlight_med" | "highlight_high"
----@alias Highlight { fg: string, bg: string, sp: string, bold: boolean, italic: boolean, undercurl: boolean, underline: boolean, underdouble: boolean, underdotted: boolean, underdashed: boolean, strikethrough: boolean, inherit: boolean }
+---@alias Highlight { link: string, inherit: boolean } | { fg: string, bg: string, sp: string, bold: boolean, italic: boolean, undercurl: boolean, underline: boolean, underdouble: boolean, underdotted: boolean, underdashed: boolean, strikethrough: boolean, inherit: boolean }
local config = {}
From ea3f15ca95f0c22632b2ed7093b8440c16efd26c Mon Sep 17 00:00:00 2001
From: not
Date: Thu, 8 Feb 2024 13:44:50 -0600
Subject: [PATCH 24/97] fix: markdown delimiter (#238)
---
lua/rose-pine.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 60b3e3c..2085b4d 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -368,7 +368,7 @@ local function set_highlights()
-- ["@markup.raw"] = { bg = palette.surface },
-- ["@markup.raw.block"] = { bg = palette.surface },
- ["@markup.raw.delimiter.markdown"] = { bg = palette.subtle },
+ ["@markup.raw.delimiter.markdown"] = { fg = palette.subtle },
["@markup.list"] = { fg = palette.text },
["@markup.list.checked"] = { fg = palette.foam, bg = palette.foam, blend = 10 },
From e28cda232b7571e0c97cd079bb8a8429d7f7a47c Mon Sep 17 00:00:00 2001
From: not
Date: Sun, 11 Feb 2024 20:11:47 -0600
Subject: [PATCH 25/97] feat: prioritise semantic variable highlighting (#240)
---
lua/rose-pine.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 2085b4d..40ba83e 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -412,7 +412,7 @@ local function set_highlights()
["@lsp.type.namespace"] = { link = "@namespace" },
["@lsp.type.parameter"] = { link = "@parameter" },
["@lsp.type.property"] = { link = "@property" },
- ["@lsp.type.variable"] = {}, -- use treesitter styles for regular variables
+ ["@lsp.type.variable"] = { link = "@variable" },
["@lsp.typemod.function.defaultLibrary"] = { link = "@function.builtin" },
["@lsp.typemod.operator.injected"] = { link = "@operator" },
["@lsp.typemod.string.injected"] = { link = "@string" },
From 12ace889a0f65d4b8eb49dd286ff76947d24fbe1 Mon Sep 17 00:00:00 2001
From: Fitrah
Date: Wed, 14 Feb 2024 23:58:18 +0800
Subject: [PATCH 26/97] fix(migrate): avoid ternary 'falls through' state
(#242)
See: https://riptutorial.com/lua/example/26503/emulating-ternary-operator-with--and---or--logical-operators-#undefined
---
lua/rose-pine/config.lua | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lua/rose-pine/config.lua b/lua/rose-pine/config.lua
index 7b6f8aa..562d2a4 100644
--- a/lua/rose-pine/config.lua
+++ b/lua/rose-pine/config.lua
@@ -133,11 +133,11 @@ local function migrate(options)
-- These never actually existed, but may be set intuitively by the user
-- because of `disable_italics` existing.
- options.styles.bold = (options.disable_bold or options.disable_bolds) and false or options.styles.bold
+ options.styles.bold = not (options.disable_bold or options.disable_bolds) and options.styles.bold or false
-- Similar to bold options, `disable_italic` never existed but could be a
-- common typo of the actual `disable_italics`.
- options.styles.italic = (options.disable_italic or options.disable_italics) and false or options.styles.italic
+ options.styles.italic = not (options.disable_italic or options.disable_italics) and options.styles.italic or false
-- Set h1 through h6 to the same color if only one is specified
if type(options.groups.headings) == "string" then
From c8e97915d1d8be4371803a8077fd2b1ecdba44ca Mon Sep 17 00:00:00 2001
From: Andrew <63322884+winter-again@users.noreply.github.com>
Date: Tue, 5 Mar 2024 09:47:17 -0500
Subject: [PATCH 27/97] feat: add highlight groups for folke/trouble.nvim
(#248)
---
lua/rose-pine.lua | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 40ba83e..649fa99 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -727,6 +727,11 @@ local function set_highlights()
-- folke/noice.nvim
NoiceCursor = { fg = palette.highlight_high, bg = palette.text },
+ -- folke/trouble.nvim
+ TroubleText = { fg = palette.subtle },
+ TroubleCount = { fg = palette.iris, bg = palette.surface },
+ TroubleNormal = { fg = palette.text, bg = groups.panel },
+
-- echasnovski/mini.clue
MiniClueTitle = { bg = groups.panel, bold = styles.bold },
From e901a53e41928b1134fa73f8ad3761e4b9d2137f Mon Sep 17 00:00:00 2001
From: James Knight <61782266+James-Kni@users.noreply.github.com>
Date: Fri, 15 Mar 2024 17:08:52 +0000
Subject: [PATCH 28/97] feat: add mini.statusline highlights (#250)
---
lua/rose-pine.lua | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 649fa99..14d6bb8 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -743,6 +743,18 @@ local function set_highlights()
MiniIndentscopeSymbol = { fg = palette.muted },
MiniIndentscopeSymbolOff = { fg = palette.muted },
+ -- echasnovski/mini.statusline
+ MiniStatuslineDevinfo = { fg = palette.subtle, bg = palette.overlay },
+ MiniStatuslineFileinfo = { link = "MiniStatuslineDevinfo" },
+ MiniStatuslineFilename = { fg = palette.muted, bg = palette.surface },
+ MiniStatuslineInactive = { link = "MiniStatuslineFilename" },
+ MiniStatuslineModeCommand = { fg = palette.base, bg = palette.love, bold = styles.bold },
+ MiniStatuslineModeInsert = { fg = palette.base, bg = palette.foam, bold = styles.bold },
+ MiniStatuslineModeNormal = { fg = palette.base, bg = palette.rose, bold = styles.bold },
+ MiniStatuslineModeOther = { fg = palette.base, bg = palette.rose, bold = styles.bold },
+ MiniStatuslineModeReplace = { fg = palette.base, bg = palette.pine, bold = styles.bold },
+ MiniStatuslineModeVisual = { fg = palette.base, bg = palette.iris, bold = styles.bold },
+
-- goolord/alpha-nvim
AlphaButtons = { fg = palette.foam },
AlphaFooter = { fg = palette.gold },
From 3dbb8a99bd72a3d916f5e9749f86d45dd37d0f1e Mon Sep 17 00:00:00 2001
From: not
Date: Tue, 19 Mar 2024 18:51:46 -0500
Subject: [PATCH 29/97] feat: highlight lsp variable constant (#246)
Closes #245
---
lua/rose-pine.lua | 1 +
1 file changed, 1 insertion(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 14d6bb8..85a39f3 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -416,6 +416,7 @@ local function set_highlights()
["@lsp.typemod.function.defaultLibrary"] = { link = "@function.builtin" },
["@lsp.typemod.operator.injected"] = { link = "@operator" },
["@lsp.typemod.string.injected"] = { link = "@string" },
+ ["@lsp.typemod.variable.constant"] = { link = "@constant" },
["@lsp.typemod.variable.defaultLibrary"] = { link = "@variable.builtin" },
["@lsp.typemod.variable.injected"] = { link = "@variable" },
From a959c739103085c8383c1f6f0f6be9d888b6141f Mon Sep 17 00:00:00 2001
From: Jaehwang Jung
Date: Sun, 24 Mar 2024 03:53:11 +0900
Subject: [PATCH 30/97] fix: clear autocmd when changing colorscheme (#254)
---
lua/rose-pine.lua | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 85a39f3..ffdebe0 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -882,9 +882,13 @@ local function set_highlights()
-- Support StatusLineTerm & StatusLineTermNC from vim
vim.cmd([[
- autocmd TermOpen * if &buftype=='terminal'
- \|setlocal winhighlight=StatusLine:StatusLineTerm,StatusLineNC:StatusLineTermNC
- \|else|setlocal winhighlight=|endif
+ augroup rose-pine
+ autocmd!
+ autocmd TermOpen * if &buftype=='terminal'
+ \|setlocal winhighlight=StatusLine:StatusLineTerm,StatusLineNC:StatusLineTermNC
+ \|else|setlocal winhighlight=|endif
+ autocmd ColorSchemePre * autocmd! rose-pine
+ augroup END
]])
end
end
From 1f22d4e97eb584281f0f76b2961f72615ff9e634 Mon Sep 17 00:00:00 2001
From: not
Date: Thu, 28 Mar 2024 19:32:00 -0500
Subject: [PATCH 31/97] feat: add mini.diff (#259)
---
lua/rose-pine.lua | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index ffdebe0..db6cdba 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -736,6 +736,15 @@ local function set_highlights()
-- echasnovski/mini.clue
MiniClueTitle = { bg = groups.panel, bold = styles.bold },
+ -- echasnovski/mini.diff
+ MiniDiffOverAdd = { fg = groups.git_add, bg = groups.git_add, blend = 20 },
+ MiniDiffOverChange = { fg = groups.git_change, bg = groups.git_change, blend = 20 },
+ MiniDiffOverContext = { bg = palette.surface },
+ MiniDiffOverDelete = { fg = groups.git_delete, bg = groups.git_delete, blend = 20 },
+ MiniDiffSignAdd = { fg = groups.git_add },
+ MiniDiffSignChange = { fg = groups.git_change },
+ MiniDiffSignDelete = { fg = groups.git_delete },
+
-- echasnovski/mini.pick
MiniPickBorderText = { bg = groups.panel },
MiniPickPrompt = { bg = groups.panel, bold = styles.bold },
From 63f461336532a9b48241ac9fdea59f085c287b5d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Julius=20R=C3=BCberg?=
Date: Sat, 30 Mar 2024 01:51:22 +0100
Subject: [PATCH 32/97] feat: add highlights for nvim-treesitter-context (#260)
---
lua/rose-pine.lua | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index db6cdba..554dcf3 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -773,6 +773,10 @@ local function set_highlights()
-- github/copilot.vim
CopilotSuggestion = { fg = palette.muted, italic = styles.italic },
+
+ -- nvim-treesitter/nvim-treesitter-context
+ TreesitterContext = { bg = "overlay" },
+ TreesitterContextLineNumber = { fg = "rose", bg = "overlay" }
}
local transparency_highlights = {
DiagnosticVirtualTextError = { fg = groups.error },
From 01dc90af2f7bc85581741bd9dae1ce1ab6282e2d Mon Sep 17 00:00:00 2001
From: Dave Greene
Date: Fri, 29 Mar 2024 23:39:26 -0400
Subject: [PATCH 33/97] Fixed enum use vs magic string (#261)
---
lua/rose-pine.lua | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 554dcf3..184ef6f 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -775,8 +775,8 @@ local function set_highlights()
CopilotSuggestion = { fg = palette.muted, italic = styles.italic },
-- nvim-treesitter/nvim-treesitter-context
- TreesitterContext = { bg = "overlay" },
- TreesitterContextLineNumber = { fg = "rose", bg = "overlay" }
+ TreesitterContext = { bg = palette.overlay },
+ TreesitterContextLineNumber = { fg = palette.rose, bg = palette.overlay }
}
local transparency_highlights = {
DiagnosticVirtualTextError = { fg = groups.error },
From e4c22a91633f2280f166306c2e14cee087a65914 Mon Sep 17 00:00:00 2001
From: Adam K <105152139+akthe-at@users.noreply.github.com>
Date: Tue, 9 Apr 2024 12:56:29 -0500
Subject: [PATCH 34/97] fix(python): import semantic_tokens from basedpyright
(#257)
* fix(python): import semantic_tokens from basedpyright
* fix: restores svelte string highlights
---
lua/rose-pine.lua | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 184ef6f..ce67514 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -412,13 +412,15 @@ local function set_highlights()
["@lsp.type.namespace"] = { link = "@namespace" },
["@lsp.type.parameter"] = { link = "@parameter" },
["@lsp.type.property"] = { link = "@property" },
- ["@lsp.type.variable"] = { link = "@variable" },
+ ["@lsp.type.variable"] = {}, --defer to treesitter for regular variables
+ ["@lsp.type.variable.svelte"] = { link = "@variable" },
["@lsp.typemod.function.defaultLibrary"] = { link = "@function.builtin" },
["@lsp.typemod.operator.injected"] = { link = "@operator" },
["@lsp.typemod.string.injected"] = { link = "@string" },
["@lsp.typemod.variable.constant"] = { link = "@constant" },
["@lsp.typemod.variable.defaultLibrary"] = { link = "@variable.builtin" },
["@lsp.typemod.variable.injected"] = { link = "@variable" },
+ ["@lsp.type.namespace.python"] = { link = "@variable" },
--- Plugins
-- romgrk/barbar.nvim
From 465b7dc6233bc02b8869a6ebd617cd6181fd295d Mon Sep 17 00:00:00 2001
From: Dhruvin Shah <33428164+dhruvinsh@users.noreply.github.com>
Date: Tue, 9 Apr 2024 13:57:04 -0400
Subject: [PATCH 35/97] feat: adding vim-illuminate highlights (#262)
---
lua/rose-pine.lua | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index ce67514..9cce6b8 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -818,6 +818,10 @@ local function set_highlights()
MiniPickBorderText = { bg = "NONE" },
MiniPickPrompt = { bg = "NONE", bold = styles.bold },
+
+ IlluminatedWordText = { link = "LspReferenceText" },
+ IlluminatedWordRead = { link = "LspReferenceRead" },
+ IlluminatedWordWrite = { link = "LspReferenceWrite" },
}
if config.options.enable.legacy_highlights then
From 8d9c83d145ebf6bce7555d87448c1fc0b66cd4a9 Mon Sep 17 00:00:00 2001
From: not
Date: Tue, 9 Apr 2024 13:00:32 -0500
Subject: [PATCH 36/97] format (#264)
---
lua/rose-pine.lua | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 9cce6b8..514ba50 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -410,9 +410,10 @@ local function set_highlights()
["@lsp.type.interface"] = { link = "@interface" },
["@lsp.type.keyword"] = { link = "@keyword" },
["@lsp.type.namespace"] = { link = "@namespace" },
+ ["@lsp.type.namespace.python"] = { link = "@variable" },
["@lsp.type.parameter"] = { link = "@parameter" },
["@lsp.type.property"] = { link = "@property" },
- ["@lsp.type.variable"] = {}, --defer to treesitter for regular variables
+ ["@lsp.type.variable"] = {}, -- defer to treesitter for regular variables
["@lsp.type.variable.svelte"] = { link = "@variable" },
["@lsp.typemod.function.defaultLibrary"] = { link = "@function.builtin" },
["@lsp.typemod.operator.injected"] = { link = "@operator" },
@@ -420,7 +421,6 @@ local function set_highlights()
["@lsp.typemod.variable.constant"] = { link = "@constant" },
["@lsp.typemod.variable.defaultLibrary"] = { link = "@variable.builtin" },
["@lsp.typemod.variable.injected"] = { link = "@variable" },
- ["@lsp.type.namespace.python"] = { link = "@variable" },
--- Plugins
-- romgrk/barbar.nvim
@@ -778,7 +778,12 @@ local function set_highlights()
-- nvim-treesitter/nvim-treesitter-context
TreesitterContext = { bg = palette.overlay },
- TreesitterContextLineNumber = { fg = palette.rose, bg = palette.overlay }
+ TreesitterContextLineNumber = { fg = palette.rose, bg = palette.overlay },
+
+ -- RRethy/vim-illuminate
+ IlluminatedWordRead = { link = "LspReferenceRead" },
+ IlluminatedWordText = { link = "LspReferenceText" },
+ IlluminatedWordWrite = { link = "LspReferenceWrite" },
}
local transparency_highlights = {
DiagnosticVirtualTextError = { fg = groups.error },
@@ -818,10 +823,6 @@ local function set_highlights()
MiniPickBorderText = { bg = "NONE" },
MiniPickPrompt = { bg = "NONE", bold = styles.bold },
-
- IlluminatedWordText = { link = "LspReferenceText" },
- IlluminatedWordRead = { link = "LspReferenceRead" },
- IlluminatedWordWrite = { link = "LspReferenceWrite" },
}
if config.options.enable.legacy_highlights then
From c8477ee9787f0e3a426646606416ba48a02551e4 Mon Sep 17 00:00:00 2001
From: Hayden Rouille
Date: Thu, 18 Apr 2024 15:48:05 +0100
Subject: [PATCH 37/97] For transparency, remove BG for buffers and gray out
the text (#265)
---
lua/rose-pine.lua | 1 +
1 file changed, 1 insertion(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 514ba50..b980867 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -801,6 +801,7 @@ local function set_highlights()
SignColumn = { fg = palette.text, bg = "NONE" },
StatusLine = { fg = palette.subtle, bg = "NONE" },
StatusLineNC = { fg = palette.muted, bg = "NONE" },
+ TabLine = { bg = "NONE", fg = palette.subtle },
TabLineFill = { bg = "NONE" },
TabLineSel = { fg = palette.text, bg = "NONE", bold = styles.bold },
From cbc2064f4c2e6db97f3733e4c47f473f15706612 Mon Sep 17 00:00:00 2001
From: "PRIZ ;]"
Date: Fri, 10 May 2024 12:22:41 -0500
Subject: [PATCH 38/97] feat: new themes for lualine (#267)
---
lua/lualine/themes/rose-pine-alt.lua | 27 +----
lua/lualine/themes/rose-pine-inv.lua | 2 +
lua/lualine/themes/rose-pine-neutral.lua | 2 +
lua/lualine/themes/rose-pine.lua | 41 +-------
lua/rose-pine/palette.lua | 11 +-
lua/rose-pine/plugins/lualine.lua | 125 +++++++++++++++++++++++
6 files changed, 140 insertions(+), 68 deletions(-)
create mode 100644 lua/lualine/themes/rose-pine-inv.lua
create mode 100644 lua/lualine/themes/rose-pine-neutral.lua
create mode 100644 lua/rose-pine/plugins/lualine.lua
diff --git a/lua/lualine/themes/rose-pine-alt.lua b/lua/lualine/themes/rose-pine-alt.lua
index 05d8af7..0248420 100644
--- a/lua/lualine/themes/rose-pine-alt.lua
+++ b/lua/lualine/themes/rose-pine-alt.lua
@@ -1,26 +1 @@
-local p = require("rose-pine.palette")
-
-return {
- normal = {
- a = { bg = p.surface, fg = p.rose, gui = "bold" },
- b = { bg = p.surface, fg = p.text },
- c = { bg = p.surface, fg = p.subtle, gui = "italic" },
- },
- insert = {
- a = { bg = p.surface, fg = p.foam, gui = "bold" },
- },
- visual = {
- a = { bg = p.surface, fg = p.iris, gui = "bold" },
- },
- replace = {
- a = { bg = p.surface, fg = p.pine, gui = "bold" },
- },
- command = {
- a = { bg = p.surface, fg = p.love, gui = "bold" },
- },
- inactive = {
- a = { bg = p.base, fg = p.subtle, gui = "bold" },
- b = { bg = p.base, fg = p.subtle },
- c = { bg = p.base, fg = p.subtle, gui = "italic" },
- },
-}
+return require("rose-pine.plugins.lualine").alternate
diff --git a/lua/lualine/themes/rose-pine-inv.lua b/lua/lualine/themes/rose-pine-inv.lua
new file mode 100644
index 0000000..9c13a1d
--- /dev/null
+++ b/lua/lualine/themes/rose-pine-inv.lua
@@ -0,0 +1,2 @@
+return require("rose-pine.plugins.lualine").inverse
+
diff --git a/lua/lualine/themes/rose-pine-neutral.lua b/lua/lualine/themes/rose-pine-neutral.lua
new file mode 100644
index 0000000..1459e84
--- /dev/null
+++ b/lua/lualine/themes/rose-pine-neutral.lua
@@ -0,0 +1,2 @@
+return require("rose-pine.plugins.lualine").neutral
+
diff --git a/lua/lualine/themes/rose-pine.lua b/lua/lualine/themes/rose-pine.lua
index 4c2c9a6..2d33786 100644
--- a/lua/lualine/themes/rose-pine.lua
+++ b/lua/lualine/themes/rose-pine.lua
@@ -1,40 +1 @@
-local p = require("rose-pine.palette")
-local config = require("rose-pine.config")
-
-local bg_base = p.base
-if config.options.styles.transparency then
- bg_base = "NONE"
-end
-
-return {
- normal = {
- a = { bg = p.rose, fg = p.base, gui = "bold" },
- b = { bg = p.overlay, fg = p.rose },
- c = { bg = bg_base, fg = p.text },
- },
- insert = {
- a = { bg = p.foam, fg = p.base, gui = "bold" },
- b = { bg = p.overlay, fg = p.foam },
- c = { bg = bg_base, fg = p.text },
- },
- visual = {
- a = { bg = p.iris, fg = p.base, gui = "bold" },
- b = { bg = p.overlay, fg = p.iris },
- c = { bg = bg_base, fg = p.text },
- },
- replace = {
- a = { bg = p.pine, fg = p.base, gui = "bold" },
- b = { bg = p.overlay, fg = p.pine },
- c = { bg = bg_base, fg = p.text },
- },
- command = {
- a = { bg = p.love, fg = p.base, gui = "bold" },
- b = { bg = p.overlay, fg = p.love },
- c = { bg = bg_base, fg = p.text },
- },
- inactive = {
- a = { bg = bg_base, fg = p.muted, gui = "bold" },
- b = { bg = bg_base, fg = p.muted },
- c = { bg = bg_base, fg = p.muted },
- },
-}
+return require("rose-pine.plugins.lualine").normal
diff --git a/lua/rose-pine/palette.lua b/lua/rose-pine/palette.lua
index 540625e..cb85e75 100644
--- a/lua/rose-pine/palette.lua
+++ b/lua/rose-pine/palette.lua
@@ -1,4 +1,5 @@
local options = require("rose-pine.config").options
+
local variants = {
main = {
_nc = "#16141f",
@@ -59,8 +60,14 @@ local variants = {
},
}
+
+local chosen
if variants[options.variant] ~= nil then
- return variants[options.variant]
+ chosen = variants[options.variant]
+else
+ chosen = vim.o.background == "light" and variants.dawn or variants[options.dark_variant or "main"]
end
-return vim.o.background == "light" and variants.dawn or variants[options.dark_variant or "main"]
+chosen.variants = variants
+
+return chosen
diff --git a/lua/rose-pine/plugins/lualine.lua b/lua/rose-pine/plugins/lualine.lua
new file mode 100644
index 0000000..eb59216
--- /dev/null
+++ b/lua/rose-pine/plugins/lualine.lua
@@ -0,0 +1,125 @@
+local palette = require("rose-pine.palette")
+
+local generator = {}
+
+function generator.alternate(p)
+ return {
+ normal = {
+ a = { bg = p.surface, fg = p.rose, gui = "bold" },
+ b = { bg = p.surface, fg = p.text },
+ c = { bg = p.surface, fg = p.subtle, gui = "italic" },
+ },
+ insert = {
+ a = { bg = p.surface, fg = p.foam, gui = "bold" },
+ },
+ visual = {
+ a = { bg = p.surface, fg = p.iris, gui = "bold" },
+ },
+ replace = {
+ a = { bg = p.surface, fg = p.pine, gui = "bold" },
+ },
+ command = {
+ a = { bg = p.surface, fg = p.love, gui = "bold" },
+ },
+ inactive = {
+ a = { bg = p.base, fg = p.subtle, gui = "bold" },
+ b = { bg = p.base, fg = p.subtle },
+ c = { bg = p.base, fg = p.subtle, gui = "italic" },
+ },
+ variants = {},
+ }
+end
+
+function generator.normal(p)
+ local config = require("rose-pine.config")
+
+ local bg_base = p.base
+ if config.options.styles.transparency then
+ bg_base = "NONE"
+ end
+
+ return {
+ normal = {
+ a = { bg = p.rose, fg = p.base, gui = "bold" },
+ b = { bg = p.overlay, fg = p.rose },
+ c = { bg = bg_base, fg = p.text },
+ },
+ insert = {
+ a = { bg = p.foam, fg = p.base, gui = "bold" },
+ b = { bg = p.overlay, fg = p.foam },
+ },
+ visual = {
+ a = { bg = p.iris, fg = p.base, gui = "bold" },
+ b = { bg = p.overlay, fg = p.iris },
+ },
+ replace = {
+ a = { bg = p.pine, fg = p.base, gui = "bold" },
+ b = { bg = p.overlay, fg = p.pine },
+ },
+ command = {
+ a = { bg = p.love, fg = p.base, gui = "bold" },
+ b = { bg = p.overlay, fg = p.love },
+ },
+ inactive = {
+ a = { bg = bg_base, fg = p.muted, gui = "bold" },
+ b = { bg = bg_base, fg = p.muted },
+ c = { bg = bg_base, fg = p.muted },
+ },
+ variants = {},
+ }
+end
+
+function generator.neutral(p)
+ return {
+ normal = {
+ a = { bg = p.rose, fg = p.base, gui = "bold" },
+ b = { bg = p.highlight_med, fg = p.rose },
+ c = { bg = p.highlight_high, fg = p.text },
+ },
+ insert = {
+ a = { bg = p.foam, fg = p.base, gui = "bold" },
+ b = { bg = p.highlight_med, fg = p.foam },
+ },
+ visual = {
+ a = { bg = p.iris, fg = p.base, gui = "bold" },
+ b = { bg = p.highlight_med, fg = p.iris },
+ },
+ replace = {
+ a = { bg = p.pine, fg = p.base, gui = "bold" },
+ b = { bg = p.highlight_med, fg = p.pine },
+ },
+ command = {
+ a = { bg = p.love, fg = p.base, gui = "bold" },
+ b = { bg = p.highlight_med, fg = p.love },
+ },
+ inactive = {
+ a = { bg = p.muted, fg = p.overlay, gui = "bold" },
+ b = { bg = p.muted, fg = p.overlay },
+ c = { bg = p.muted, fg = p.base },
+ },
+ variants = {}
+ }
+end
+
+function generator.inverse(p)
+ if p.base == palette.variants.moon.base then
+ return generator.normal(palette.variants.dawn)
+ elseif p.base == palette.variants.main.base then
+ return generator.normal(palette.variants.dawn)
+ elseif p.base == palette.variants.dawn.base then
+ return generator.normal(palette.variants.moon)
+ end
+end
+
+-- function generator.
+
+local default = {}
+
+for t, fn in pairs(generator) do
+ default[t] = fn(palette)
+ for k, v in pairs(palette.variants) do
+ default[t].variants[k] = fn(v)
+ end
+end
+
+return default
From f67828be44915a1aaf8d0f3abf47c0e1d91da4ef Mon Sep 17 00:00:00 2001
From: not
Date: Tue, 14 May 2024 09:42:41 -0500
Subject: [PATCH 39/97] Revert "feat: new themes for lualine (#267)" (#269)
This reverts commit cbc2064f4c2e6db97f3733e4c47f473f15706612.
---
lua/lualine/themes/rose-pine-alt.lua | 27 ++++-
lua/lualine/themes/rose-pine-inv.lua | 2 -
lua/lualine/themes/rose-pine-neutral.lua | 2 -
lua/lualine/themes/rose-pine.lua | 41 +++++++-
lua/rose-pine/palette.lua | 11 +-
lua/rose-pine/plugins/lualine.lua | 125 -----------------------
6 files changed, 68 insertions(+), 140 deletions(-)
delete mode 100644 lua/lualine/themes/rose-pine-inv.lua
delete mode 100644 lua/lualine/themes/rose-pine-neutral.lua
delete mode 100644 lua/rose-pine/plugins/lualine.lua
diff --git a/lua/lualine/themes/rose-pine-alt.lua b/lua/lualine/themes/rose-pine-alt.lua
index 0248420..05d8af7 100644
--- a/lua/lualine/themes/rose-pine-alt.lua
+++ b/lua/lualine/themes/rose-pine-alt.lua
@@ -1 +1,26 @@
-return require("rose-pine.plugins.lualine").alternate
+local p = require("rose-pine.palette")
+
+return {
+ normal = {
+ a = { bg = p.surface, fg = p.rose, gui = "bold" },
+ b = { bg = p.surface, fg = p.text },
+ c = { bg = p.surface, fg = p.subtle, gui = "italic" },
+ },
+ insert = {
+ a = { bg = p.surface, fg = p.foam, gui = "bold" },
+ },
+ visual = {
+ a = { bg = p.surface, fg = p.iris, gui = "bold" },
+ },
+ replace = {
+ a = { bg = p.surface, fg = p.pine, gui = "bold" },
+ },
+ command = {
+ a = { bg = p.surface, fg = p.love, gui = "bold" },
+ },
+ inactive = {
+ a = { bg = p.base, fg = p.subtle, gui = "bold" },
+ b = { bg = p.base, fg = p.subtle },
+ c = { bg = p.base, fg = p.subtle, gui = "italic" },
+ },
+}
diff --git a/lua/lualine/themes/rose-pine-inv.lua b/lua/lualine/themes/rose-pine-inv.lua
deleted file mode 100644
index 9c13a1d..0000000
--- a/lua/lualine/themes/rose-pine-inv.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-return require("rose-pine.plugins.lualine").inverse
-
diff --git a/lua/lualine/themes/rose-pine-neutral.lua b/lua/lualine/themes/rose-pine-neutral.lua
deleted file mode 100644
index 1459e84..0000000
--- a/lua/lualine/themes/rose-pine-neutral.lua
+++ /dev/null
@@ -1,2 +0,0 @@
-return require("rose-pine.plugins.lualine").neutral
-
diff --git a/lua/lualine/themes/rose-pine.lua b/lua/lualine/themes/rose-pine.lua
index 2d33786..4c2c9a6 100644
--- a/lua/lualine/themes/rose-pine.lua
+++ b/lua/lualine/themes/rose-pine.lua
@@ -1 +1,40 @@
-return require("rose-pine.plugins.lualine").normal
+local p = require("rose-pine.palette")
+local config = require("rose-pine.config")
+
+local bg_base = p.base
+if config.options.styles.transparency then
+ bg_base = "NONE"
+end
+
+return {
+ normal = {
+ a = { bg = p.rose, fg = p.base, gui = "bold" },
+ b = { bg = p.overlay, fg = p.rose },
+ c = { bg = bg_base, fg = p.text },
+ },
+ insert = {
+ a = { bg = p.foam, fg = p.base, gui = "bold" },
+ b = { bg = p.overlay, fg = p.foam },
+ c = { bg = bg_base, fg = p.text },
+ },
+ visual = {
+ a = { bg = p.iris, fg = p.base, gui = "bold" },
+ b = { bg = p.overlay, fg = p.iris },
+ c = { bg = bg_base, fg = p.text },
+ },
+ replace = {
+ a = { bg = p.pine, fg = p.base, gui = "bold" },
+ b = { bg = p.overlay, fg = p.pine },
+ c = { bg = bg_base, fg = p.text },
+ },
+ command = {
+ a = { bg = p.love, fg = p.base, gui = "bold" },
+ b = { bg = p.overlay, fg = p.love },
+ c = { bg = bg_base, fg = p.text },
+ },
+ inactive = {
+ a = { bg = bg_base, fg = p.muted, gui = "bold" },
+ b = { bg = bg_base, fg = p.muted },
+ c = { bg = bg_base, fg = p.muted },
+ },
+}
diff --git a/lua/rose-pine/palette.lua b/lua/rose-pine/palette.lua
index cb85e75..540625e 100644
--- a/lua/rose-pine/palette.lua
+++ b/lua/rose-pine/palette.lua
@@ -1,5 +1,4 @@
local options = require("rose-pine.config").options
-
local variants = {
main = {
_nc = "#16141f",
@@ -60,14 +59,8 @@ local variants = {
},
}
-
-local chosen
if variants[options.variant] ~= nil then
- chosen = variants[options.variant]
-else
- chosen = vim.o.background == "light" and variants.dawn or variants[options.dark_variant or "main"]
+ return variants[options.variant]
end
-chosen.variants = variants
-
-return chosen
+return vim.o.background == "light" and variants.dawn or variants[options.dark_variant or "main"]
diff --git a/lua/rose-pine/plugins/lualine.lua b/lua/rose-pine/plugins/lualine.lua
deleted file mode 100644
index eb59216..0000000
--- a/lua/rose-pine/plugins/lualine.lua
+++ /dev/null
@@ -1,125 +0,0 @@
-local palette = require("rose-pine.palette")
-
-local generator = {}
-
-function generator.alternate(p)
- return {
- normal = {
- a = { bg = p.surface, fg = p.rose, gui = "bold" },
- b = { bg = p.surface, fg = p.text },
- c = { bg = p.surface, fg = p.subtle, gui = "italic" },
- },
- insert = {
- a = { bg = p.surface, fg = p.foam, gui = "bold" },
- },
- visual = {
- a = { bg = p.surface, fg = p.iris, gui = "bold" },
- },
- replace = {
- a = { bg = p.surface, fg = p.pine, gui = "bold" },
- },
- command = {
- a = { bg = p.surface, fg = p.love, gui = "bold" },
- },
- inactive = {
- a = { bg = p.base, fg = p.subtle, gui = "bold" },
- b = { bg = p.base, fg = p.subtle },
- c = { bg = p.base, fg = p.subtle, gui = "italic" },
- },
- variants = {},
- }
-end
-
-function generator.normal(p)
- local config = require("rose-pine.config")
-
- local bg_base = p.base
- if config.options.styles.transparency then
- bg_base = "NONE"
- end
-
- return {
- normal = {
- a = { bg = p.rose, fg = p.base, gui = "bold" },
- b = { bg = p.overlay, fg = p.rose },
- c = { bg = bg_base, fg = p.text },
- },
- insert = {
- a = { bg = p.foam, fg = p.base, gui = "bold" },
- b = { bg = p.overlay, fg = p.foam },
- },
- visual = {
- a = { bg = p.iris, fg = p.base, gui = "bold" },
- b = { bg = p.overlay, fg = p.iris },
- },
- replace = {
- a = { bg = p.pine, fg = p.base, gui = "bold" },
- b = { bg = p.overlay, fg = p.pine },
- },
- command = {
- a = { bg = p.love, fg = p.base, gui = "bold" },
- b = { bg = p.overlay, fg = p.love },
- },
- inactive = {
- a = { bg = bg_base, fg = p.muted, gui = "bold" },
- b = { bg = bg_base, fg = p.muted },
- c = { bg = bg_base, fg = p.muted },
- },
- variants = {},
- }
-end
-
-function generator.neutral(p)
- return {
- normal = {
- a = { bg = p.rose, fg = p.base, gui = "bold" },
- b = { bg = p.highlight_med, fg = p.rose },
- c = { bg = p.highlight_high, fg = p.text },
- },
- insert = {
- a = { bg = p.foam, fg = p.base, gui = "bold" },
- b = { bg = p.highlight_med, fg = p.foam },
- },
- visual = {
- a = { bg = p.iris, fg = p.base, gui = "bold" },
- b = { bg = p.highlight_med, fg = p.iris },
- },
- replace = {
- a = { bg = p.pine, fg = p.base, gui = "bold" },
- b = { bg = p.highlight_med, fg = p.pine },
- },
- command = {
- a = { bg = p.love, fg = p.base, gui = "bold" },
- b = { bg = p.highlight_med, fg = p.love },
- },
- inactive = {
- a = { bg = p.muted, fg = p.overlay, gui = "bold" },
- b = { bg = p.muted, fg = p.overlay },
- c = { bg = p.muted, fg = p.base },
- },
- variants = {}
- }
-end
-
-function generator.inverse(p)
- if p.base == palette.variants.moon.base then
- return generator.normal(palette.variants.dawn)
- elseif p.base == palette.variants.main.base then
- return generator.normal(palette.variants.dawn)
- elseif p.base == palette.variants.dawn.base then
- return generator.normal(palette.variants.moon)
- end
-end
-
--- function generator.
-
-local default = {}
-
-for t, fn in pairs(generator) do
- default[t] = fn(palette)
- for k, v in pairs(palette.variants) do
- default[t].variants[k] = fn(v)
- end
-end
-
-return default
From 511e82e2724cd2adc172bcc5a9abdaa1c4837323 Mon Sep 17 00:00:00 2001
From: abvee <82954751+abvee@users.noreply.github.com>
Date: Sun, 26 May 2024 02:52:38 +0000
Subject: [PATCH 40/97] Added ["@float"] to default_highlights (#272) (#273)
---
lua/rose-pine.lua | 1 +
1 file changed, 1 insertion(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index b980867..5ac2234 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -295,6 +295,7 @@ local function set_highlights()
["@boolean"] = { link = "Boolean" },
["@number"] = { link = "Number" },
["@number.float"] = { link = "Number" },
+ ["@float"] = { link = "Number" },
--- Types
["@type"] = { fg = palette.foam },
From 958dce3da98859900e27ce5918335106a8e6c9a1 Mon Sep 17 00:00:00 2001
From: not
Date: Sun, 9 Jun 2024 10:48:51 -0500
Subject: [PATCH 41/97] feat: support upcoming modes.nvim update (#274)
[modes.nvim](https://github.com/mvllow/modes.nvim) is about to
incorporate replace mode.
---
lua/rose-pine.lua | 1 +
1 file changed, 1 insertion(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 5ac2234..5ac8e67 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -454,6 +454,7 @@ local function set_highlights()
ModesCopy = { bg = palette.gold },
ModesDelete = { bg = palette.love },
ModesInsert = { bg = palette.foam },
+ ModesReplace = { bg = palette.pine },
ModesVisual = { bg = palette.iris },
-- kyazdani42/nvim-tree.lua
From 6d476a5c64f6e712880d8ab5368f006011903eeb Mon Sep 17 00:00:00 2001
From: Evgeni Chasnovski
Date: Thu, 27 Jun 2024 20:51:35 +0300
Subject: [PATCH 42/97] feat: add explicit full 'mini.nvim' support (#279)
---
lua/rose-pine.lua | 120 +++++++++++++++++++++++++++++++++++++++++-----
1 file changed, 108 insertions(+), 12 deletions(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 5ac8e67..1b7da63 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -737,10 +737,34 @@ local function set_highlights()
TroubleCount = { fg = palette.iris, bg = palette.surface },
TroubleNormal = { fg = palette.text, bg = groups.panel },
- -- echasnovski/mini.clue
+ -- echasnovski/mini.nvim
+ MiniAnimateCursor = { reverse = true, nocombine = true },
+ MiniAnimateNormalFloat = { link = "NormalFloat" },
+
+ MiniClueBorder = { link = "FloatBorder" },
+ MiniClueDescGroup = { link = "DiagnosticFloatingWarn" },
+ MiniClueDescSingle = { link = "NormalFloat" },
+ MiniClueNextKey = { link = "DiagnosticFloatingHint" },
+ MiniClueNextKeyWithPostkeys = { link = "DiagnosticFloatingError" },
+ MiniClueSeparator = { link = "DiagnosticFloatingInfo" },
MiniClueTitle = { bg = groups.panel, bold = styles.bold },
- -- echasnovski/mini.diff
+ MiniCompletionActiveParameter = { underline = true },
+
+ MiniCursorword = { underline = true },
+ MiniCursorwordCurrent = { underline = true },
+
+ MiniDepsChangeAdded = { fg = groups.git_add },
+ MiniDepsChangeRemoved = { fg = groups.git_delete },
+ MiniDepsHint = { link = "DiagnosticHint" },
+ MiniDepsInfo = { link = "DiagnosticInfo" },
+ MiniDepsMsgBreaking = { link = "DiagnosticWarn" },
+ MiniDepsPlaceholder = { link = "Comment" },
+ MiniDepsTitle = { link = "Title" },
+ MiniDepsTitleError = { link = "DiffDelete" },
+ MiniDepsTitleSame = { link = "DiffText" },
+ MiniDepsTitleUpdate = { link = "DiffAdd" },
+
MiniDiffOverAdd = { fg = groups.git_add, bg = groups.git_add, blend = 20 },
MiniDiffOverChange = { fg = groups.git_change, bg = groups.git_change, blend = 20 },
MiniDiffOverContext = { bg = palette.surface },
@@ -749,15 +773,75 @@ local function set_highlights()
MiniDiffSignChange = { fg = groups.git_change },
MiniDiffSignDelete = { fg = groups.git_delete },
- -- echasnovski/mini.pick
+ MiniFilesBorder = { link = "FloatBorder" },
+ MiniFilesBorderModified = { link = "DiagnosticFloatingWarn" },
+ MiniFilesCursorLine = { link = "CursorLine" },
+ MiniFilesDirectory = { link = "Directory" },
+ MiniFilesFile = { fg = palette.text },
+ MiniFilesNormal = { link = "NormalFloat" },
+ MiniFilesTitle = { link = "FloatTitle" },
+ MiniFilesTitleFocused = { fg = palette.rose, bold = styles.bold },
+
+ MiniHipatternsFixme = { fg = palette.base, bg = groups.error, bold = styles.bold },
+ MiniHipatternsHack = { fg = palette.base, bg = groups.warn, bold = styles.bold },
+ MiniHipatternsNote = { fg = palette.base, bg = groups.info, bold = styles.bold },
+ MiniHipatternsTodo = { fg = palette.base, bg = groups.hint, bold = styles.bold },
+
+ MiniIconsAzure = { fg = palette.foam },
+ MiniIconsBlue = { fg = palette.pine },
+ MiniIconsCyan = { fg = palette.pine },
+ MiniIconsGreen = { fg = palette.foam },
+ MiniIconsGrey = { fg = palette.text },
+ MiniIconsOrange = { fg = palette.gold },
+ MiniIconsPurple = { fg = palette.iris },
+ MiniIconsRed = { fg = palette.love },
+ MiniIconsYellow = { fg = palette.gold },
+
+ MiniIndentscopeSymbol = { fg = palette.muted },
+ MiniIndentscopeSymbolOff = { fg = palette.gold },
+
+ MiniJump = { sp = palette.gold, undercurl = true },
+
+ MiniJump2dDim = { fg = palette.subtle },
+ MiniJump2dSpot = { fg = palette.gold, bold = styles.bold, nocombine = true },
+ MiniJump2dSpotAhead = { fg = palette.foam, bg = palette.surface, nocombine = true },
+ MiniJump2dSpotUnique = { fg = palette.rose, bold = styles.bold, nocombine = true },
+
+ MiniMapNormal = { link = "NormalFloat" },
+ MiniMapSymbolCount = { link = "Special" },
+ MiniMapSymbolLine = { link = "Title" },
+ MiniMapSymbolView = { link = "Delimiter" },
+
+ MiniNotifyBorder = { link = "FloatBorder" },
+ MiniNotifyNormal = { link = "NormalFloat" },
+ MiniNotifyTitle = { link = "FloatTitle" },
+
+ MiniOperatorsExchangeFrom = { link = "IncSearch" },
+
+ MiniPickBorder = { link = "FloatBorder" },
+ MiniPickBorderBusy = { link = "DiagnosticFloatingWarn" },
MiniPickBorderText = { bg = groups.panel },
+ MiniPickIconDirectory = { link = "Directory" },
+ MiniPickIconFile = { link = "MiniPickNormal" },
+ MiniPickHeader = { link = "DiagnosticFloatingHint" },
+ MiniPickMatchCurrent = { link = "CursorLine" },
+ MiniPickMatchMarked = { link = "Visual" },
+ MiniPickMatchRanges = { fg = palette.foam },
+ MiniPickNormal = { link = "NormalFloat" },
+ MiniPickPreviewLine = { link = "CursorLine" },
+ MiniPickPreviewRegion = { link = "IncSearch" },
MiniPickPrompt = { bg = groups.panel, bold = styles.bold },
- -- echasnovski/mini.indentscope
- MiniIndentscopeSymbol = { fg = palette.muted },
- MiniIndentscopeSymbolOff = { fg = palette.muted },
+ MiniStarterCurrent = { nocombine = true },
+ MiniStarterFooter = { fg = palette.subtle },
+ MiniStarterHeader = { link = "Title" },
+ MiniStarterInactive = { link = "Comment" },
+ MiniStarterItem = { link = "Normal" },
+ MiniStarterItemBullet = { link = "Delimiter" },
+ MiniStarterItemPrefix = { link = "WarningMsg" },
+ MiniStarterSection = { fg = palette.rose },
+ MiniStarterQuery = { link = "MoreMsg" },
- -- echasnovski/mini.statusline
MiniStatuslineDevinfo = { fg = palette.subtle, bg = palette.overlay },
MiniStatuslineFileinfo = { link = "MiniStatuslineDevinfo" },
MiniStatuslineFilename = { fg = palette.muted, bg = palette.surface },
@@ -769,6 +853,23 @@ local function set_highlights()
MiniStatuslineModeReplace = { fg = palette.base, bg = palette.pine, bold = styles.bold },
MiniStatuslineModeVisual = { fg = palette.base, bg = palette.iris, bold = styles.bold },
+ MiniSurround = { link = "IncSearch" },
+
+ MiniTablineCurrent = { fg = palette.text, bg = palette.overlay, bold = styles.bold },
+ MiniTablineFill = { link = "TabLineFill" },
+ MiniTablineHidden = { fg = palette.subtle, bg = groups.panel },
+ MiniTablineModifiedCurrent = { fg = palette.overlay, bg = palette.text, bold = styles.bold },
+ MiniTablineModifiedHidden = { fg = groups.panel, bg = palette.subtle },
+ MiniTablineModifiedVisible = { fg = groups.panel, bg = palette.text },
+ MiniTablineTabpagesection = { link = "Search" },
+ MiniTablineVisible = { fg = palette.text, bg = groups.panel },
+
+ MiniTestEmphasis = { bold = styles.bold },
+ MiniTestFail = { fg = palette.love, bold = styles.bold },
+ MiniTestPass = { fg = palette.foam, bold = styles.bold },
+
+ MiniTrailspace = { bg = palette.love },
+
-- goolord/alpha-nvim
AlphaButtons = { fg = palette.foam },
AlphaFooter = { fg = palette.gold },
@@ -821,11 +922,6 @@ local function set_highlights()
IblIndent = { fg = palette.overlay, bg = "NONE" },
IblScope = { fg = palette.foam, bg = "NONE" },
IblWhitespace = { fg = palette.overlay, bg = "NONE" },
-
- MiniClueTitle = { bg = "NONE", bold = styles.bold },
-
- MiniPickBorderText = { bg = "NONE" },
- MiniPickPrompt = { bg = "NONE", bold = styles.bold },
}
if config.options.enable.legacy_highlights then
From 71852123ccebf4f30cb1aaa69d0532b861b4728c Mon Sep 17 00:00:00 2001
From: not
Date: Thu, 27 Jun 2024 12:55:27 -0500
Subject: [PATCH 43/97] feat: set matching background on MiniFilesTitle (#280)
---
lua/rose-pine.lua | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 1b7da63..159185c 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -779,8 +779,8 @@ local function set_highlights()
MiniFilesDirectory = { link = "Directory" },
MiniFilesFile = { fg = palette.text },
MiniFilesNormal = { link = "NormalFloat" },
- MiniFilesTitle = { link = "FloatTitle" },
- MiniFilesTitleFocused = { fg = palette.rose, bold = styles.bold },
+ MiniFilesTitle = { bg = groups.panel, fg = palette.foam, bold = styles.bold },
+ MiniFilesTitleFocused = { bg = groups.panel, fg = palette.rose, bold = styles.bold },
MiniHipatternsFixme = { fg = palette.base, bg = groups.error, bold = styles.bold },
MiniHipatternsHack = { fg = palette.base, bg = groups.warn, bold = styles.bold },
From 69b3aa9500058e6558c48f867939c2d87ce1856f Mon Sep 17 00:00:00 2001
From: Ilya Kuporosov <88616652+hansumane@users.noreply.github.com>
Date: Wed, 3 Jul 2024 14:23:19 -0700
Subject: [PATCH 44/97] fix: link `@lsp.type.comment.c`,
`@lsp.type.comment.cpp` to `@comment` (#282)
It fixes branches of conditional directives like `#if` and `#ifdef` in C and C++
appearing as if they both are true, without breaking TODO comments.
---
lua/rose-pine.lua | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 159185c..0aa5c78 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -407,6 +407,8 @@ local function set_highlights()
--- Semantic
["@lsp.type.comment"] = {},
+ ["@lsp.type.comment.c"] = { link = "@comment" },
+ ["@lsp.type.comment.cpp"] = { link = "@comment" },
["@lsp.type.enum"] = { link = "@type" },
["@lsp.type.interface"] = { link = "@interface" },
["@lsp.type.keyword"] = { link = "@keyword" },
From fe5f4e11f72908ce3b528397757540ea9ec22823 Mon Sep 17 00:00:00 2001
From: Shaun Clayton
Date: Mon, 15 Jul 2024 11:21:08 -0400
Subject: [PATCH 45/97] chore: update highlights for which-key.nvim (#287)
* chore: update highlights for which-key.nvim
* fix: revert placement of WhichKeyFloat hl group
* feat: add additional highlight groups for icons in which-key
* Revert "feat: add additional highlight groups for icons in which-key"
Need to come up with a different solution.
This reverts commit 18d70420a2a0ff9fa70a0ca88b84b147ff494a39.
* fix: use explicit fg and bg for WhichKeyTitle
* Revert "fix: use explicit fg and bg for WhichKeyTitle"
Breaks extend_background_behind_borders again... Oops
This reverts commit 1389556a198e88fd763f772dec4f4c95bf08ec1c.
---
lua/rose-pine.lua | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 0aa5c78..fbc5445 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -519,10 +519,13 @@ local function set_highlights()
-- folke/which-key.nvim
WhichKey = { fg = palette.iris },
+ WhichKeyBorder = make_border(),
WhichKeyDesc = { fg = palette.gold },
WhichKeyFloat = { bg = groups.panel },
WhichKeyGroup = { fg = palette.foam },
+ WhichKeyNormal = { link = "NormalFloat" },
WhichKeySeparator = { fg = palette.subtle },
+ WhichKeyTitle = make_border(palette.foam),
WhichKeyValue = { fg = palette.rose },
-- lukas-reineke/indent-blankline.nvim
@@ -920,6 +923,7 @@ local function set_highlights()
TelescopeSelectionCaret = { fg = palette.rose },
WhichKeyFloat = { bg = "NONE" },
+ WhichKeyNormal = { bg = "NONE" },
IblIndent = { fg = palette.overlay, bg = "NONE" },
IblScope = { fg = palette.foam, bg = "NONE" },
From c4b55e85fb8d04c8b7062c53034747448c07e901 Mon Sep 17 00:00:00 2001
From: Shaun Clayton
Date: Sun, 21 Jul 2024 14:17:17 -0400
Subject: [PATCH 46/97] feat(palette): add initial support for new color `leaf`
(#290)
* feat(palette): add new color 'leaf'
* feat: add highlight groups to defaults
---
lua/rose-pine.lua | 7 +++++++
lua/rose-pine/config.lua | 3 ++-
lua/rose-pine/palette.lua | 3 +++
3 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index fbc5445..73712cd 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -155,26 +155,32 @@ local function set_highlights()
DiagnosticError = { fg = groups.error },
DiagnosticHint = { fg = groups.hint },
DiagnosticInfo = { fg = groups.info },
+ DiagnosticOk = { fg = groups.ok },
DiagnosticWarn = { fg = groups.warn },
DiagnosticDefaultError = { link = "DiagnosticError" },
DiagnosticDefaultHint = { link = "DiagnosticHint" },
DiagnosticDefaultInfo = { link = "DiagnosticInfo" },
+ DiagnosticDefaultOk = { link = "DiagnosticOk" },
DiagnosticDefaultWarn = { link = "DiagnosticWarn" },
DiagnosticFloatingError = { link = "DiagnosticError" },
DiagnosticFloatingHint = { link = "DiagnosticHint" },
DiagnosticFloatingInfo = { link = "DiagnosticInfo" },
+ DiagnosticFloatingOk = { link = "DiagnosticOk" },
DiagnosticFloatingWarn = { link = "DiagnosticWarn" },
DiagnosticSignError = { link = "DiagnosticError" },
DiagnosticSignHint = { link = "DiagnosticHint" },
DiagnosticSignInfo = { link = "DiagnosticInfo" },
+ DiagnosticSignOk = { link = "DiagnosticOk" },
DiagnosticSignWarn = { link = "DiagnosticWarn" },
DiagnosticUnderlineError = { sp = groups.error, undercurl = true },
DiagnosticUnderlineHint = { sp = groups.hint, undercurl = true },
DiagnosticUnderlineInfo = { sp = groups.info, undercurl = true },
+ DiagnosticUnderlineOk = { sp = groups.ok, undercurl = true },
DiagnosticUnderlineWarn = { sp = groups.warn, undercurl = true },
DiagnosticVirtualTextError = { fg = groups.error, bg = groups.error, blend = 10 },
DiagnosticVirtualTextHint = { fg = groups.hint, bg = groups.hint, blend = 10 },
DiagnosticVirtualTextInfo = { fg = groups.info, bg = groups.info, blend = 10 },
+ DiagnosticVirtualTextOk = { fg = groups.ok, bg = groups.ok, blend = 10 },
DiagnosticVirtualTextWarn = { fg = groups.warn, bg = groups.warn, blend = 10 },
Boolean = { fg = palette.rose },
@@ -897,6 +903,7 @@ local function set_highlights()
DiagnosticVirtualTextError = { fg = groups.error },
DiagnosticVirtualTextHint = { fg = groups.hint },
DiagnosticVirtualTextInfo = { fg = groups.info },
+ DiagnosticVirtualTextOk = { fg = groups.ok },
DiagnosticVirtualTextWarn = { fg = groups.warn },
FloatBorder = { fg = palette.muted, bg = "NONE" },
diff --git a/lua/rose-pine/config.lua b/lua/rose-pine/config.lua
index 562d2a4..cdbec69 100644
--- a/lua/rose-pine/config.lua
+++ b/lua/rose-pine/config.lua
@@ -44,9 +44,10 @@ config.options = {
error = "love",
hint = "iris",
info = "foam",
+ ok = "leaf",
+ warn = "gold",
note = "pine",
todo = "rose",
- warn = "gold",
git_add = "foam",
git_change = "rose",
diff --git a/lua/rose-pine/palette.lua b/lua/rose-pine/palette.lua
index 540625e..ffa5f81 100644
--- a/lua/rose-pine/palette.lua
+++ b/lua/rose-pine/palette.lua
@@ -14,6 +14,7 @@ local variants = {
pine = "#31748f",
foam = "#9ccfd8",
iris = "#c4a7e7",
+ leaf = "#95b1ac",
highlight_low = "#21202e",
highlight_med = "#403d52",
highlight_high = "#524f67",
@@ -33,6 +34,7 @@ local variants = {
pine = "#3e8fb0",
foam = "#9ccfd8",
iris = "#c4a7e7",
+ leaf = "#95b1ac",
highlight_low = "#2a283e",
highlight_med = "#44415a",
highlight_high = "#56526e",
@@ -52,6 +54,7 @@ local variants = {
pine = "#286983",
foam = "#56949f",
iris = "#907aa9",
+ leaf = "#6d8f89",
highlight_low = "#f4ede8",
highlight_med = "#dfdad9",
highlight_high = "#cecacd",
From 2f1733d36f7765d3f0bd99a9c4af482b8a9260eb Mon Sep 17 00:00:00 2001
From: Shaun Clayton
Date: Sun, 21 Jul 2024 17:12:11 -0400
Subject: [PATCH 47/97] feat: add support for icons in which-key.nvim (#291)
* feat: add icon support for which-key.nvim
* fix: incorrect color reference
* feat: set WhichKeyIcon hl group to 'pine' by default
Used when the colors option is set to false.
---
lua/rose-pine.lua | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 73712cd..afea3ea 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -529,6 +529,16 @@ local function set_highlights()
WhichKeyDesc = { fg = palette.gold },
WhichKeyFloat = { bg = groups.panel },
WhichKeyGroup = { fg = palette.foam },
+ WhichKeyIcon = { fg = palette.pine },
+ WhichKeyIconAzure = { fg = palette.pine },
+ WhichKeyIconBlue = { fg = palette.pine },
+ WhichKeyIconCyan = { fg = palette.foam },
+ WhichKeyIconGreen = { fg = palette.leaf },
+ WhichKeyIconGrey = { fg = palette.subtle },
+ WhichKeyIconOrange = { fg = palette.rose },
+ WhichKeyIconPurple = { fg = palette.iris },
+ WhichKeyIconRed = { fg = palette.love },
+ WhichKeyIconYellow = { fg = palette.gold },
WhichKeyNormal = { link = "NormalFloat" },
WhichKeySeparator = { fg = palette.subtle },
WhichKeyTitle = make_border(palette.foam),
From f2bf6e8d49ce1b1db22f8eb5798841f1f1ec8dca Mon Sep 17 00:00:00 2001
From: Shaun Clayton
Date: Sun, 21 Jul 2024 17:39:15 -0400
Subject: [PATCH 48/97] feat: add support for rainbow-delimiters.nvim (#292)
---
lua/rose-pine.lua | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index afea3ea..fed2dc5 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -908,6 +908,15 @@ local function set_highlights()
IlluminatedWordRead = { link = "LspReferenceRead" },
IlluminatedWordText = { link = "LspReferenceText" },
IlluminatedWordWrite = { link = "LspReferenceWrite" },
+
+ -- HiPhish/rainbow-delimiters.nvim
+ RainbowDelimiterBlue = { fg = palette.pine },
+ RainbowDelimiterCyan = { fg = palette.foam },
+ RainbowDelimiterGreen = { fg = palette.leaf },
+ RainbowDelimiterOrange = { fg = palette.rose },
+ RainbowDelimiterRed = { fg = palette.love },
+ RainbowDelimiterViolet = { fg = palette.iris },
+ RainbowDelimiterYellow = { fg = palette.gold },
}
local transparency_highlights = {
DiagnosticVirtualTextError = { fg = groups.error },
From afb46f9b66260542a256bd4c3c3a6bffb62d15a0 Mon Sep 17 00:00:00 2001
From: Shaun Clayton
Date: Mon, 22 Jul 2024 00:06:14 -0400
Subject: [PATCH 49/97] fix: add missing highlight (#293)
---
lua/rose-pine.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index fed2dc5..6daf4b5 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -498,7 +498,7 @@ local function set_highlights()
NeotestFailed = { fg = palette.love },
NeotestFile = { fg = palette.text },
NeotestFocused = { fg = palette.gold, bg = palette.highlight_med },
- NeotestIndent = { fg = "" },
+ NeotestIndent = { fg = palette.highlight_med },
NeotestMarked = { fg = palette.rose, bold = styles.bold },
NeotestNamespace = { fg = palette.gold },
NeotestPassed = { fg = palette.pine },
From 3bbd8a865c03992ad2ae93aa1d7961ecb66e75e1 Mon Sep 17 00:00:00 2001
From: Shaun Clayton
Date: Mon, 22 Jul 2024 01:23:59 -0400
Subject: [PATCH 50/97] fix: broken transparency for treesitter-context (#294)
---
lua/rose-pine.lua | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 6daf4b5..d2eb951 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -954,6 +954,9 @@ local function set_highlights()
IblIndent = { fg = palette.overlay, bg = "NONE" },
IblScope = { fg = palette.foam, bg = "NONE" },
IblWhitespace = { fg = palette.overlay, bg = "NONE" },
+
+ TreesitterContext = { bg = "NONE" },
+ TreesitterContextLineNumber = { fg = palette.rose, bg = "NONE" },
}
if config.options.enable.legacy_highlights then
From bf7ceb32fa4febef3efc80b54288e6257bd242e4 Mon Sep 17 00:00:00 2001
From: Shaun Clayton
Date: Mon, 22 Jul 2024 11:17:13 -0400
Subject: [PATCH 51/97] chore: update mini-icons highlights to use appropriate
colors (#295)
---
lua/rose-pine.lua | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index d2eb951..3399fe5 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -810,10 +810,10 @@ local function set_highlights()
MiniIconsAzure = { fg = palette.foam },
MiniIconsBlue = { fg = palette.pine },
- MiniIconsCyan = { fg = palette.pine },
- MiniIconsGreen = { fg = palette.foam },
- MiniIconsGrey = { fg = palette.text },
- MiniIconsOrange = { fg = palette.gold },
+ MiniIconsCyan = { fg = palette.foam },
+ MiniIconsGreen = { fg = palette.leaf },
+ MiniIconsGrey = { fg = palette.subtle },
+ MiniIconsOrange = { fg = palette.rose },
MiniIconsPurple = { fg = palette.iris },
MiniIconsRed = { fg = palette.love },
MiniIconsYellow = { fg = palette.gold },
From 5929bc8683801aa9c74ff454fec91572b34de156 Mon Sep 17 00:00:00 2001
From: not
Date: Mon, 22 Jul 2024 11:12:10 -0500
Subject: [PATCH 52/97] feat: improve float transparency (#298)
---
lua/rose-pine.lua | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 3399fe5..bf5ef79 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -99,7 +99,7 @@ local function set_highlights()
-- EndOfBuffer = {},
ErrorMsg = { fg = groups.error, bold = styles.bold },
FloatBorder = make_border(),
- FloatTitle = { link = "Directory" },
+ FloatTitle = { fg = palette.foam, bg = groups.panel, bold = styles.bold },
FoldColumn = { fg = palette.muted },
Folded = { fg = palette.text, bg = groups.panel },
IncSearch = { link = "CurSearch" },
@@ -800,8 +800,8 @@ local function set_highlights()
MiniFilesDirectory = { link = "Directory" },
MiniFilesFile = { fg = palette.text },
MiniFilesNormal = { link = "NormalFloat" },
- MiniFilesTitle = { bg = groups.panel, fg = palette.foam, bold = styles.bold },
- MiniFilesTitleFocused = { bg = groups.panel, fg = palette.rose, bold = styles.bold },
+ MiniFilesTitle = { link = "FloatTitle" },
+ MiniFilesTitleFocused = { fg = palette.rose, bg = groups.panel, bold = styles.bold },
MiniHipatternsFixme = { fg = palette.base, bg = groups.error, bold = styles.bold },
MiniHipatternsHack = { fg = palette.base, bg = groups.warn, bold = styles.bold },
@@ -926,6 +926,7 @@ local function set_highlights()
DiagnosticVirtualTextWarn = { fg = groups.warn },
FloatBorder = { fg = palette.muted, bg = "NONE" },
+ FloatTitle = { fg = palette.foam, bg = "NONE", bold = styles.bold },
Folded = { fg = palette.text, bg = "NONE" },
NormalFloat = { bg = "NONE" },
Normal = { fg = palette.text, bg = "NONE" },
@@ -957,6 +958,11 @@ local function set_highlights()
TreesitterContext = { bg = "NONE" },
TreesitterContextLineNumber = { fg = palette.rose, bg = "NONE" },
+
+ MiniFilesTitleFocused = { fg = palette.rose, bg = "NONE", bold = styles.bold },
+
+ MiniPickPrompt = { bg = "NONE", bold = styles.bold },
+ MiniPickBorderText = { bg = "NONE" },
}
if config.options.enable.legacy_highlights then
From 656f360dedfb543d7d23cc65269a69b18dfce527 Mon Sep 17 00:00:00 2001
From: not
Date: Mon, 22 Jul 2024 16:07:45 -0500
Subject: [PATCH 53/97] feat: improve diff text (#297)
---
lua/rose-pine.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index bf5ef79..57c0eab 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -91,7 +91,7 @@ local function set_highlights()
DiffAdd = { bg = groups.git_add, blend = 20 },
DiffChange = { bg = groups.git_change, blend = 20 },
DiffDelete = { bg = groups.git_delete, blend = 20 },
- DiffText = { bg = groups.git_text, blend = 20 },
+ DiffText = { bg = groups.git_text, blend = 40 },
diffAdded = { link = "DiffAdd" },
diffChanged = { link = "DiffChange" },
diffRemoved = { link = "DiffDelete" },
From f7c01f07ee19562385e4915c3805e669db8d31a6 Mon Sep 17 00:00:00 2001
From: Shaun Clayton
Date: Tue, 23 Jul 2024 17:56:40 -0400
Subject: [PATCH 54/97] fix: fzf-lua invisible selection (#299)
* fix: invisible text in selection in fzf-lua
* fix: correct bg color for FzfLuaNormal
* fix: invisible text in selection in fzf-lua
* fix: correct bg color for FzfLuaNormal
* fix: change linking and add highlight for FzfLuaFilePart
* fix: linking to 'FloatTitle' for WhichKeyTitle
This works the same as the original fix, confirmed by testing
against nvim 0.10.0 and nightly.
Prefer linking over previous solution.
---
lua/rose-pine.lua | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 57c0eab..a79d08b 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -541,7 +541,7 @@ local function set_highlights()
WhichKeyIconYellow = { fg = palette.gold },
WhichKeyNormal = { link = "NormalFloat" },
WhichKeySeparator = { fg = palette.subtle },
- WhichKeyTitle = make_border(palette.foam),
+ WhichKeyTitle = { link = "FloatTitle" },
WhichKeyValue = { fg = palette.rose },
-- lukas-reineke/indent-blankline.nvim
@@ -667,13 +667,15 @@ local function set_highlights()
TelescopeTitle = { fg = palette.foam, bold = styles.bold },
-- ibhagwan/fzf-lua
- FzfLuaNormal = { link = "NormalFloat" },
- FzfLuaTitle = { fg = palette.foam, bold = styles.bold },
FzfLuaBorder = make_border(),
- FzfLuaHeaderText = { fg = palette.love },
- FzfLuaHeaderBind = { fg = palette.rose },
- FzfLuaBufFlagCur = { fg = palette.subtle },
FzfLuaBufFlagAlt = { fg = palette.subtle },
+ FzfLuaBufFlagCur = { fg = palette.subtle },
+ FzfLuaCursorLine = { fg = palette.text, bg = palette.overlay },
+ FzfLuaFilePart = { fg = palette.text },
+ FzfLuaHeaderBind = { fg = palette.rose },
+ FzfLuaHeaderText = { fg = palette.love },
+ FzfLuaNormal = { link = "NormalFloat" },
+ FzfLuaTitle = { link = "FloatTitle" },
-- rcarriga/nvim-notify
NotifyDEBUGBorder = make_border(),
From 535240c84679690953b0ef19bc9ad5a625266ddd Mon Sep 17 00:00:00 2001
From: not
Date: Tue, 23 Jul 2024 19:17:59 -0500
Subject: [PATCH 55/97] feat: highlight neotree tabs (#300)
Fixes #263
---
lua/rose-pine.lua | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index a79d08b..3528227 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -518,6 +518,10 @@ local function set_highlights()
NeoTreeGitModified = { fg = groups.git_dirty },
NeoTreeGitRenamed = { fg = groups.git_rename },
NeoTreeGitUntracked = { fg = groups.git_untracked },
+ NeoTreeTabActive = { fg = palette.text, bg = palette.overlay },
+ NeoTreeTabInactive = { fg = palette.subtle },
+ NeoTreeTabSeparatorActive = { link = "WinSeparator" },
+ NeoTreeTabSeparatorInactive = { link = "WinSeparator" },
NeoTreeTitleBar = { link = "StatusLineTerm" },
-- folke/flash.nvim
From d6112a7c5632232f6057deebd13dcf912810ca83 Mon Sep 17 00:00:00 2001
From: not
Date: Tue, 23 Jul 2024 21:51:43 -0500
Subject: [PATCH 56/97] fix(transparency): lualine separator (#301)
Fixes #288
---
lua/lualine/themes/rose-pine.lua | 22 ++++++++--------------
1 file changed, 8 insertions(+), 14 deletions(-)
diff --git a/lua/lualine/themes/rose-pine.lua b/lua/lualine/themes/rose-pine.lua
index 4c2c9a6..96d6b92 100644
--- a/lua/lualine/themes/rose-pine.lua
+++ b/lua/lualine/themes/rose-pine.lua
@@ -1,40 +1,34 @@
local p = require("rose-pine.palette")
-local config = require("rose-pine.config")
-
-local bg_base = p.base
-if config.options.styles.transparency then
- bg_base = "NONE"
-end
return {
normal = {
a = { bg = p.rose, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.rose },
- c = { bg = bg_base, fg = p.text },
+ c = { bg = p.base, fg = p.text },
},
insert = {
a = { bg = p.foam, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.foam },
- c = { bg = bg_base, fg = p.text },
+ c = { bg = p.base, fg = p.text },
},
visual = {
a = { bg = p.iris, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.iris },
- c = { bg = bg_base, fg = p.text },
+ c = { bg = p.base, fg = p.text },
},
replace = {
a = { bg = p.pine, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.pine },
- c = { bg = bg_base, fg = p.text },
+ c = { bg = p.base, fg = p.text },
},
command = {
a = { bg = p.love, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.love },
- c = { bg = bg_base, fg = p.text },
+ c = { bg = p.base, fg = p.text },
},
inactive = {
- a = { bg = bg_base, fg = p.muted, gui = "bold" },
- b = { bg = bg_base, fg = p.muted },
- c = { bg = bg_base, fg = p.muted },
+ a = { bg = p.base, fg = p.muted, gui = "bold" },
+ b = { bg = p.base, fg = p.muted },
+ c = { bg = p.base, fg = p.muted },
},
}
From 8b1a2e73d28f331bc9ecdf5dd84242a6a8d235b7 Mon Sep 17 00:00:00 2001
From: Shaun Clayton
Date: Wed, 24 Jul 2024 17:29:39 -0400
Subject: [PATCH 57/97] feat: add support for markdown.nvim (#303)
* feat: add support for markdown.nvim
* fix: tweaked some highlights to achieve better appearance
* fix: adjust heading highlights to use group linking
---
lua/rose-pine.lua | 22 ++++++++++++++++++++--
lua/rose-pine/config.lua | 2 +-
2 files changed, 21 insertions(+), 3 deletions(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 3528227..e356688 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -363,7 +363,7 @@ local function set_highlights()
["@markup.heading"] = { fg = palette.foam, bold = styles.bold },
- ["@markup.quote"] = { fg = palette.subtle },
+ ["@markup.quote"] = { fg = palette.text },
["@markup.math"] = { link = "Special" },
["@markup.environment"] = { link = "Macro" },
["@markup.environment.name"] = { link = "@type" },
@@ -377,7 +377,7 @@ local function set_highlights()
-- ["@markup.raw.block"] = { bg = palette.surface },
["@markup.raw.delimiter.markdown"] = { fg = palette.subtle },
- ["@markup.list"] = { fg = palette.text },
+ ["@markup.list"] = { fg = palette.pine },
["@markup.list.checked"] = { fg = palette.foam, bg = palette.foam, blend = 10 },
["@markup.list.unchecked"] = { fg = palette.text },
@@ -923,6 +923,24 @@ local function set_highlights()
RainbowDelimiterRed = { fg = palette.love },
RainbowDelimiterViolet = { fg = palette.iris },
RainbowDelimiterYellow = { fg = palette.gold },
+
+ -- MeanderingProgrammer/markdown.nvim
+ RenderMarkdownBullet = { fg = palette.rose },
+ RenderMarkdownChecked = { fg = palette.foam },
+ RenderMarkdownCode = { bg = palette.overlay },
+ RenderMarkdownCodeInline = { fg = palette.text, bg = palette.overlay },
+ RenderMarkdownDash = { fg = palette.muted },
+ RenderMarkdownH1Bg = { bg = groups.h1, blend = 20 },
+ RenderMarkdownH2Bg = { bg = groups.h2, blend = 20 },
+ RenderMarkdownH3Bg = { bg = groups.h3, blend = 20 },
+ RenderMarkdownH4Bg = { bg = groups.h4, blend = 20 },
+ RenderMarkdownH5Bg = { bg = groups.h5, blend = 20 },
+ RenderMarkdownH6Bg = { bg = groups.h6, blend = 20 },
+ RenderMarkdownQuote = { fg = palette.subtle },
+ RenderMarkdownTableFill = { link = "Conceal" },
+ RenderMarkdownTableHead = { fg = palette.subtle },
+ RenderMarkdownTableRow = { fg = palette.subtle },
+ RenderMarkdownUnchecked = { fg = palette.subtle },
}
local transparency_highlights = {
DiagnosticVirtualTextError = { fg = groups.error },
diff --git a/lua/rose-pine/config.lua b/lua/rose-pine/config.lua
index cdbec69..eb05330 100644
--- a/lua/rose-pine/config.lua
+++ b/lua/rose-pine/config.lua
@@ -66,7 +66,7 @@ config.options = {
h3 = "rose",
h4 = "gold",
h5 = "pine",
- h6 = "foam",
+ h6 = "leaf",
---@deprecated Replaced by `options.highlight_groups["Normal"]`
-- background = "base",
From c14da532fae30f089ea6d47fcfe64b0ed1b9bd80 Mon Sep 17 00:00:00 2001
From: Shaun Clayton
Date: Thu, 25 Jul 2024 17:47:21 -0400
Subject: [PATCH 58/97] feat: add support for grug-far.nvim (#304)
* feat: add support for grug-far.nvim
* fix: change link for results match to `CurSearch`
Co-authored-by: not
* fix: add highlights for line numbers
---------
Co-authored-by: not
---
lua/rose-pine.lua | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index e356688..471e57e 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -126,7 +126,7 @@ local function set_highlights()
RedrawDebugClear = { fg = palette.base, bg = palette.gold },
RedrawDebugComposed = { fg = palette.base, bg = palette.pine },
RedrawDebugRecompose = { fg = palette.base, bg = palette.love },
- Search = { fg = palette.base, bg = palette.text },
+ Search = { fg = palette.base, bg = palette.rose },
SignColumn = { fg = palette.text, bg = "NONE" },
SpecialKey = { fg = palette.foam },
SpellBad = { sp = palette.subtle, undercurl = true },
@@ -941,6 +941,24 @@ local function set_highlights()
RenderMarkdownTableHead = { fg = palette.subtle },
RenderMarkdownTableRow = { fg = palette.subtle },
RenderMarkdownUnchecked = { fg = palette.subtle },
+
+ -- MagicDuck/grug-far.nvim
+ GrugFarHelpHeader = { fg = palette.pine },
+ GrugFarHelpHeaderKey = { fg = palette.gold },
+ GrugFarHelpWinActionKey = { fg = palette.gold },
+ GrugFarHelpWinActionPrefix = { fg = palette.foam },
+ GrugFarHelpWinActionText = { fg = palette.pine },
+ GrugFarHelpWinHeader = { link = "FloatTitle" },
+ GrugFarInputLabel = { fg = palette.foam },
+ GrugFarInputPlaceholder = { link = "Comment" },
+ GrugFarResultsActionMessage = { fg = palette.foam },
+ GrugFarResultsChangeIndicator = { fg = groups.git_change },
+ GrugFarResultsHeader = { fg = palette.pine },
+ GrugFarResultsLineNo = { fg = palette.iris },
+ GrugFarResultsLineColumn = { link = "GrugFarResultsLineNo" },
+ GrugFarResultsMatch = { link = "CurSearch" },
+ GrugFarResultsPath = { fg = palette.foam },
+ GrugFarResultsStats = { fg = palette.iris },
}
local transparency_highlights = {
DiagnosticVirtualTextError = { fg = groups.error },
From 7f0b8c4c7f08ed24aeca9a3392f347964b7772dd Mon Sep 17 00:00:00 2001
From: Vlad <52591095+MeanderingProgrammer@users.noreply.github.com>
Date: Mon, 5 Aug 2024 13:59:59 -0700
Subject: [PATCH 59/97] chore: markdown.nvim renamed to render-markdown.nvim
(#309)
Reference to change:
https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/aeb5cec617c3bd5738ab82ba2c3f9ccdc27656c2
---
lua/rose-pine.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 471e57e..1573fa6 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -924,7 +924,7 @@ local function set_highlights()
RainbowDelimiterViolet = { fg = palette.iris },
RainbowDelimiterYellow = { fg = palette.gold },
- -- MeanderingProgrammer/markdown.nvim
+ -- MeanderingProgrammer/render-markdown.nvim
RenderMarkdownBullet = { fg = palette.rose },
RenderMarkdownChecked = { fg = palette.foam },
RenderMarkdownCode = { bg = palette.overlay },
From d97cc7fcd772c203fec60bfcc49ebbec470d3cb0 Mon Sep 17 00:00:00 2001
From: Allan Deutsch
Date: Mon, 12 Aug 2024 16:59:44 -0400
Subject: [PATCH 60/97] fix: nvim-notify background (#308)
---
lua/rose-pine.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 1573fa6..3115710 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -697,7 +697,7 @@ local function set_highlights()
NotifyWARNBorder = make_border(groups.warn),
NotifyWARNIcon = { link = "NotifyWARNTitle" },
NotifyWARNTitle = { fg = groups.warn },
-
+ NotifyBackground = { bg = palette.surface },
-- rcarriga/nvim-dap-ui
DapUIBreakpointsCurrentLine = { fg = palette.gold, bold = styles.bold },
DapUIBreakpointsDisabledLine = { fg = palette.muted },
From 94ffdb774815f9d8b1b00425375b6996ec131beb Mon Sep 17 00:00:00 2001
From: jostaub <67969701+jostaub@users.noreply.github.com>
Date: Wed, 14 Aug 2024 20:40:33 +0200
Subject: [PATCH 61/97] feat: palette overrides (#307)
* feat: palette overrides
* removed option all from palett override
* removed dead code forgotten in last commit
* fix typo in readme and simplified comment
Co-authored-by: not
---------
Co-authored-by: not
---
lua/rose-pine/config.lua | 3 +++
lua/rose-pine/palette.lua | 9 +++++++++
readme.md | 8 ++++++++
3 files changed, 20 insertions(+)
diff --git a/lua/rose-pine/config.lua b/lua/rose-pine/config.lua
index eb05330..bbc9967 100644
--- a/lua/rose-pine/config.lua
+++ b/lua/rose-pine/config.lua
@@ -35,6 +35,9 @@ config.options = {
transparency = false,
},
+ ---@type table>
+ palette = {},
+
---@type table
groups = {
border = "muted",
diff --git a/lua/rose-pine/palette.lua b/lua/rose-pine/palette.lua
index ffa5f81..59c300c 100644
--- a/lua/rose-pine/palette.lua
+++ b/lua/rose-pine/palette.lua
@@ -62,6 +62,15 @@ local variants = {
},
}
+if options.palette ~= nil and next(options.palette) then
+ -- handle variant specific overrides
+ for variant_name, override_palette in pairs(options.palette) do
+ if variants[variant_name] then
+ variants[variant_name] = vim.tbl_extend("force", variants[variant_name], override_palette or {})
+ end
+ end
+end
+
if variants[options.variant] ~= nil then
return variants[options.variant]
end
diff --git a/readme.md b/readme.md
index 7c1ac9b..febb363 100644
--- a/readme.md
+++ b/readme.md
@@ -100,6 +100,14 @@ require("rose-pine").setup({
h6 = "foam",
},
+ pallete = {
+ -- Override the builtin palette per variant
+ -- moon = {
+ -- base = '#18191a',
+ -- overlay = '#363738',
+ -- },
+ },
+
highlight_groups = {
-- Comment = { fg = "foam" },
-- VertSplit = { fg = "muted", bg = "muted" },
From fe9e661cdac2e8f42b20411555dd0d47b5d54691 Mon Sep 17 00:00:00 2001
From: Aaron Pham
Date: Sun, 25 Aug 2024 13:20:43 -0400
Subject: [PATCH 62/97] feat(plugins): add support for avante.nvim (#315)
---
lua/rose-pine.lua | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 3115710..0706a74 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -959,6 +959,14 @@ local function set_highlights()
GrugFarResultsMatch = { link = "CurSearch" },
GrugFarResultsPath = { fg = palette.foam },
GrugFarResultsStats = { fg = palette.iris },
+
+ -- yetone/avante.nvim
+ AvanteTitle = { fg = pallete.highlight_high, bg = pallete.rose },
+ AvanteReversedTitle = { fg = pallete.rose },
+ AvanteSubtitle = { fg = pallete.highlight_med, bg = pallete.foam },
+ AvanteReversedSubtitle = { fg = pallete.foam },
+ AvanteThirdTitle = { fg = pallete.highlight_med, bg = pallete.iris },
+ AvanteReversedThirdTitle = { fg = pallete.iris },
}
local transparency_highlights = {
DiagnosticVirtualTextError = { fg = groups.error },
From 33a1ba312628da66dad067636d292166faa94c61 Mon Sep 17 00:00:00 2001
From: dav-cho <78996780+dav-cho@users.noreply.github.com>
Date: Sun, 25 Aug 2024 13:35:29 -0400
Subject: [PATCH 63/97] fix: wrong spelling for palette (#316)
---
lua/rose-pine.lua | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 0706a74..6f3adfe 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -961,12 +961,12 @@ local function set_highlights()
GrugFarResultsStats = { fg = palette.iris },
-- yetone/avante.nvim
- AvanteTitle = { fg = pallete.highlight_high, bg = pallete.rose },
- AvanteReversedTitle = { fg = pallete.rose },
- AvanteSubtitle = { fg = pallete.highlight_med, bg = pallete.foam },
- AvanteReversedSubtitle = { fg = pallete.foam },
- AvanteThirdTitle = { fg = pallete.highlight_med, bg = pallete.iris },
- AvanteReversedThirdTitle = { fg = pallete.iris },
+ AvanteTitle = { fg = palette.highlight_high, bg = palette.rose },
+ AvanteReversedTitle = { fg = palette.rose },
+ AvanteSubtitle = { fg = palette.highlight_med, bg = palette.foam },
+ AvanteReversedSubtitle = { fg = palette.foam },
+ AvanteThirdTitle = { fg = palette.highlight_med, bg = palette.iris },
+ AvanteReversedThirdTitle = { fg = palette.iris },
}
local transparency_highlights = {
DiagnosticVirtualTextError = { fg = groups.error },
From 22f873c7db1afc5b9400190bb3937a4d852df692 Mon Sep 17 00:00:00 2001
From: not
Date: Sun, 25 Aug 2024 12:37:07 -0500
Subject: [PATCH 64/97] fix: palette typo (#317)
---
readme.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/readme.md b/readme.md
index febb363..5247dbd 100644
--- a/readme.md
+++ b/readme.md
@@ -100,7 +100,7 @@ require("rose-pine").setup({
h6 = "foam",
},
- pallete = {
+ palette = {
-- Override the builtin palette per variant
-- moon = {
-- base = '#18191a',
From 2f44ef189f80c319f750e3190f63338cb328c532 Mon Sep 17 00:00:00 2001
From: not
Date: Sun, 25 Aug 2024 12:41:35 -0500
Subject: [PATCH 65/97] feat: use neutral colours for search (#318)
---
lua/rose-pine.lua | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 6f3adfe..cbd74b6 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -80,7 +80,7 @@ local function set_highlights()
local default_highlights = {
ColorColumn = { bg = palette.surface },
Conceal = { bg = "NONE" },
- CurSearch = { fg = palette.base, bg = palette.gold },
+ CurSearch = { fg = palette.base, bg = palette.text },
Cursor = { fg = palette.text, bg = palette.highlight_high },
CursorColumn = { bg = palette.overlay },
-- CursorIM = {},
@@ -126,7 +126,7 @@ local function set_highlights()
RedrawDebugClear = { fg = palette.base, bg = palette.gold },
RedrawDebugComposed = { fg = palette.base, bg = palette.pine },
RedrawDebugRecompose = { fg = palette.base, bg = palette.love },
- Search = { fg = palette.base, bg = palette.rose },
+ Search = { fg = palette.text, bg = palette.text, blend = 20 },
SignColumn = { fg = palette.text, bg = "NONE" },
SpecialKey = { fg = palette.foam },
SpellBad = { sp = palette.subtle, undercurl = true },
From 8869e546d4873b874bc35d20e287b1775584ad71 Mon Sep 17 00:00:00 2001
From: not
Date: Sun, 25 Aug 2024 13:09:15 -0500
Subject: [PATCH 66/97] feat(transparency): support trouble.nvim (#319)
---
lua/rose-pine.lua | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index cbd74b6..67e52c0 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -999,6 +999,8 @@ local function set_highlights()
TelescopeSelection = { fg = palette.text, bg = "NONE", bold = styles.bold },
TelescopeSelectionCaret = { fg = palette.rose },
+ TroubleNormal = { bg = "NONE" },
+
WhichKeyFloat = { bg = "NONE" },
WhichKeyNormal = { bg = "NONE" },
From 1ebe0a5171c8be76bf62c87fc688d110ab444d42 Mon Sep 17 00:00:00 2001
From: mvllow
Date: Tue, 8 Oct 2024 10:22:29 -0500
Subject: [PATCH 67/97] feat: use gold for search
Closes #305
---
lua/rose-pine.lua | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 67e52c0..65020f9 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -80,7 +80,7 @@ local function set_highlights()
local default_highlights = {
ColorColumn = { bg = palette.surface },
Conceal = { bg = "NONE" },
- CurSearch = { fg = palette.base, bg = palette.text },
+ CurSearch = { fg = palette.base, bg = palette.gold },
Cursor = { fg = palette.text, bg = palette.highlight_high },
CursorColumn = { bg = palette.overlay },
-- CursorIM = {},
@@ -126,7 +126,7 @@ local function set_highlights()
RedrawDebugClear = { fg = palette.base, bg = palette.gold },
RedrawDebugComposed = { fg = palette.base, bg = palette.pine },
RedrawDebugRecompose = { fg = palette.base, bg = palette.love },
- Search = { fg = palette.text, bg = palette.text, blend = 20 },
+ Search = { fg = palette.text, bg = palette.gold, blend = 20 },
SignColumn = { fg = palette.text, bg = "NONE" },
SpecialKey = { fg = palette.foam },
SpellBad = { sp = palette.subtle, undercurl = true },
From 5e7bf83782429fde7f59ba1c98702fdaa77be613 Mon Sep 17 00:00:00 2001
From: Anupam Basu
Date: Wed, 23 Oct 2024 17:59:08 -0500
Subject: [PATCH 68/97] feat: add highlight support for epwalsh/obsidian.nvim
(#323)
---------
Co-authored-by: mvllow
---
lua/rose-pine/plugins/obsidian.lua | 14 ++++++++++++++
1 file changed, 14 insertions(+)
create mode 100644 lua/rose-pine/plugins/obsidian.lua
diff --git a/lua/rose-pine/plugins/obsidian.lua b/lua/rose-pine/plugins/obsidian.lua
new file mode 100644
index 0000000..43cc3b3
--- /dev/null
+++ b/lua/rose-pine/plugins/obsidian.lua
@@ -0,0 +1,14 @@
+--- Rosé Pine for Obsidian(epwalsh)
+--- https://github.com/epwalsh/obsidian.nvim
+---
+--- @usage
+--- local highlights = require("rose-pine.plugins.obsidian")
+--- require("obsidian").setup({ ui = {hl_groups = highlights} })
+
+local p = require("rose-pine.palette")
+
+return {
+ ObsidianBullet = { fg = p.muted },
+ ObsidianRefText = { underline = true, fg = p.iris },
+ ObsidianDone = { bold = true, fg = p.foam }
+}
From a449bb2599bfe04aa134bc049c6cd5bb0d139ea2 Mon Sep 17 00:00:00 2001
From: Metin Yalcinkaya
Date: Wed, 11 Dec 2024 02:39:28 +1100
Subject: [PATCH 69/97] feat: added highlight support for Saghen/blink.cmp
(#329)
Closes #326
---
lua/rose-pine.lua | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 65020f9..39da9bc 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -967,6 +967,46 @@ local function set_highlights()
AvanteReversedSubtitle = { fg = palette.foam },
AvanteThirdTitle = { fg = palette.highlight_med, bg = palette.iris },
AvanteReversedThirdTitle = { fg = palette.iris },
+
+ -- Saghen/blink.cmp
+ BlinkCmpDoc = { fg = palette.text },
+ BlinkCmpDocBorder = { fg = palette.highlight_high },
+ BlinkCmpGhostText = { fg = palette.muted },
+
+ BlinkCmpLabel = { fg = palette.muted },
+ BlinkCmpLabelDeprecated = { fg = palette.muted, strikethrough = true },
+ BlinkCmpLabelMatch = { fg = palette.text, bold = styles.bold },
+
+ BlinkCmpDefault = { fg = palette.highlight_med },
+ BlinkCmpKindText = { fg = palette.pine },
+ BlinkCmpKindMethod = { fg = palette.foam },
+ BlinkCmpKindFunction = { fg = palette.foam },
+ BlinkCmpKindConstructor = { fg = palette.foam },
+ BlinkCmpKindField = { fg = palette.pine },
+ BlinkCmpKindVariable = { fg = palette.rose },
+ BlinkCmpKindClass = { fg = palette.gold },
+ BlinkCmpKindInterface = { fg = palette.gold },
+ BlinkCmpKindModule = { fg = palette.foam },
+ BlinkCmpKindProperty = { fg = palette.foam },
+ BlinkCmpKindUnit = { fg = palette.pine },
+ BlinkCmpKindValue = { fg = palette.love },
+ BlinkCmpKindKeyword = { fg = palette.iris },
+ BlinkCmpKindSnippet = { fg = palette.rose },
+ BlinkCmpKindColor = { fg = palette.love },
+ BlinkCmpKindFile = { fg = palette.foam },
+ BlinkCmpKindReference = { fg = palette.love },
+ BlinkCmpKindFolder = { fg = palette.foam },
+ BlinkCmpKindEnum = { fg = palette.foam },
+ BlinkCmpKindEnumMember = { fg = palette.foam },
+ BlinkCmpKindConstant = { fg = palette.gold },
+ BlinkCmpKindStruct = { fg = palette.foam },
+ BlinkCmpKindEvent = { fg = palette.foam },
+ BlinkCmpKindOperator = { fg = palette.foam },
+ BlinkCmpKindTypeParameter = { fg = palette.iris },
+ BlinkCmpKindCodeium = { fg = palette.foam },
+ BlinkCmpKindCopilot = { fg = palette.foam },
+ BlinkCmpKindSupermaven = { fg = palette.foam },
+ BlinkCmpKindTabNine = { fg = palette.foam },
}
local transparency_highlights = {
DiagnosticVirtualTextError = { fg = groups.error },
From 36526815ee308979b1cd703bba2033a88c2db1f5 Mon Sep 17 00:00:00 2001
From: YarLama <52606645+YarLama@users.noreply.github.com>
Date: Tue, 10 Dec 2024 18:50:19 +0300
Subject: [PATCH 70/97] Update readme.md (#328)
* Update readme.md
Extended description for Structured Setup lazy.nvim
* Update readme.md
---------
Co-authored-by: mvllow
---
readme.md | 23 +++++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/readme.md b/readme.md
index 5247dbd..8a2740c 100644
--- a/readme.md
+++ b/readme.md
@@ -13,15 +13,30 @@
## Getting started
-Install `rose-pine/neovim` using your favourite plugin manager:
+Install `rose-pine/neovim` using your favourite package manager:
-**paq-nvim**
+### [pam.nvim](https://github.com/mvllow/pam.nvim)
```lua
-{ "rose-pine/neovim", as = "rose-pine" }
+{ source = "rose-pine/neovim", as = "rose-pine" }
```
-**lazy.nvim**
+### [lazy.nvim](https://lazy.folke.io/installation)
+
+**Structured Setup**
+
+```lua
+-- lua/plugins/rose-pine.lua
+return {
+ "rose-pine/neovim",
+ name = "rose-pine",
+ config = function()
+ vim.cmd("colorscheme rose-pine")
+ end
+}
+```
+
+**Single file**
```lua
{ "rose-pine/neovim", name = "rose-pine" }
From fc418a716fa1808153da4bd53606f5524328f861 Mon Sep 17 00:00:00 2001
From: mvllow
Date: Tue, 7 Jan 2025 09:47:00 -0600
Subject: [PATCH 71/97] fix: lualine transparency
Fixes #333
---
lua/lualine/themes/rose-pine-alt.lua | 12 +++++++++---
lua/lualine/themes/rose-pine.lua | 22 ++++++++++++++--------
2 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/lua/lualine/themes/rose-pine-alt.lua b/lua/lualine/themes/rose-pine-alt.lua
index 05d8af7..287144f 100644
--- a/lua/lualine/themes/rose-pine-alt.lua
+++ b/lua/lualine/themes/rose-pine-alt.lua
@@ -1,4 +1,10 @@
local p = require("rose-pine.palette")
+local config = require("rose-pine.config")
+
+local bg_base = p.base
+if config.options.styles.transparency then
+ bg_base = "NONE"
+end
return {
normal = {
@@ -19,8 +25,8 @@ return {
a = { bg = p.surface, fg = p.love, gui = "bold" },
},
inactive = {
- a = { bg = p.base, fg = p.subtle, gui = "bold" },
- b = { bg = p.base, fg = p.subtle },
- c = { bg = p.base, fg = p.subtle, gui = "italic" },
+ a = { bg = bg_base, fg = p.subtle, gui = "bold" },
+ b = { bg = bg_base, fg = p.subtle },
+ c = { bg = bg_base, fg = p.subtle, gui = "italic" },
},
}
diff --git a/lua/lualine/themes/rose-pine.lua b/lua/lualine/themes/rose-pine.lua
index 96d6b92..4c2c9a6 100644
--- a/lua/lualine/themes/rose-pine.lua
+++ b/lua/lualine/themes/rose-pine.lua
@@ -1,34 +1,40 @@
local p = require("rose-pine.palette")
+local config = require("rose-pine.config")
+
+local bg_base = p.base
+if config.options.styles.transparency then
+ bg_base = "NONE"
+end
return {
normal = {
a = { bg = p.rose, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.rose },
- c = { bg = p.base, fg = p.text },
+ c = { bg = bg_base, fg = p.text },
},
insert = {
a = { bg = p.foam, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.foam },
- c = { bg = p.base, fg = p.text },
+ c = { bg = bg_base, fg = p.text },
},
visual = {
a = { bg = p.iris, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.iris },
- c = { bg = p.base, fg = p.text },
+ c = { bg = bg_base, fg = p.text },
},
replace = {
a = { bg = p.pine, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.pine },
- c = { bg = p.base, fg = p.text },
+ c = { bg = bg_base, fg = p.text },
},
command = {
a = { bg = p.love, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.love },
- c = { bg = p.base, fg = p.text },
+ c = { bg = bg_base, fg = p.text },
},
inactive = {
- a = { bg = p.base, fg = p.muted, gui = "bold" },
- b = { bg = p.base, fg = p.muted },
- c = { bg = p.base, fg = p.muted },
+ a = { bg = bg_base, fg = p.muted, gui = "bold" },
+ b = { bg = bg_base, fg = p.muted },
+ c = { bg = bg_base, fg = p.muted },
},
}
From c306f1315841038defc10c90f79d0dc9aec2d60f Mon Sep 17 00:00:00 2001
From: mvllow
Date: Wed, 8 Jan 2025 09:09:59 -0600
Subject: [PATCH 72/97] feat: use blended iris for visual
Fixes #277
---
lua/rose-pine.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lua/rose-pine.lua b/lua/rose-pine.lua
index 39da9bc..8c1f782 100644
--- a/lua/rose-pine.lua
+++ b/lua/rose-pine.lua
@@ -143,7 +143,7 @@ local function set_highlights()
TabLineSel = { fg = palette.text, bg = palette.overlay, bold = styles.bold },
Title = { fg = palette.foam, bold = styles.bold },
VertSplit = { fg = groups.border },
- Visual = { bg = palette.highlight_med },
+ Visual = { bg = palette.iris, blend = 15 },
-- VisualNOS = {},
WarningMsg = { fg = groups.warn, bold = styles.bold },
-- Whitespace = {},
From 463742691b259aa63aa6cb0e23fb89eb1aef2667 Mon Sep 17 00:00:00 2001
From: mvllow