Compare commits

..

No commits in common. "main" and "v1.2.2" have entirely different histories.

22 changed files with 1068 additions and 1875 deletions

View file

@ -15,14 +15,30 @@ body:
required: true required: true
- type: input - type: input
attributes: attributes:
label: "Terminal / multiplexer" label: "Terminal"
placeholder: "Kitty / tmux" placeholder: "Kitty"
validations: validations:
required: true required: true
- type: textarea - type: textarea
attributes: attributes:
label: Describe the bug label: Describe the bug
description: A clear and concise description of what the bug is. Please include screenshots if possible and any related errors you see in Neovim. 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.
validations: validations:
required: true required: true
- type: textarea - type: textarea
@ -45,7 +61,7 @@ body:
end end
require("rose-pine").setup({ require("rose-pine").setup({
-- ADD ROSÉ PINE CONFIG THAT IS _NECESSARY_ TO REPRODUCE THE ISSUE -- ADD ROSÉ PINE CONFIG THAT IS _NECESSARY_ FOR REPRODUCING THE ISSUE
}) })
vim.cmd("colorscheme rose-pine") vim.cmd("colorscheme rose-pine")

View file

@ -3,12 +3,24 @@ description: Suggest a new feature
title: "feature: " title: "feature: "
labels: [enhancement] labels: [enhancement]
body: 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 - type: textarea
validations: validations:
required: true required: true
attributes: attributes:
label: Describe the solution you'd like label: Describe the solution you'd like
description: A clear and concise description of what you want to happen. 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 - type: textarea
validations: validations:
required: false required: false

4
.stylua.toml Normal file
View file

@ -0,0 +1,4 @@
column_width = 80
indent_type = "Tabs"
line_endings = "Unix"
quote_style = "AutoPreferSingle"

View file

@ -1,82 +0,0 @@
# 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 = "..." },
+ }
```

View file

@ -1,2 +1,2 @@
package.loaded["rose-pine.palette"] = nil package.loaded['rose-pine.palette'] = nil
require("rose-pine").colorscheme("dawn") require('rose-pine').colorscheme('dawn')

View file

@ -1,2 +1,2 @@
package.loaded["rose-pine.palette"] = nil package.loaded['rose-pine.palette'] = nil
require("rose-pine").colorscheme("main") require('rose-pine').colorscheme('main')

View file

@ -1,2 +1,2 @@
package.loaded["rose-pine.palette"] = nil package.loaded['rose-pine.palette'] = nil
require("rose-pine").colorscheme("moon") require('rose-pine').colorscheme('moon')

View file

@ -1,2 +1,2 @@
package.loaded["rose-pine.palette"] = nil package.loaded['rose-pine.palette'] = nil
require("rose-pine").colorscheme() require('rose-pine').colorscheme()

View file

@ -1,32 +1,26 @@
local p = require("rose-pine.palette") 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 { return {
normal = { 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 }, 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 = { insert = {
a = { bg = p.surface, fg = p.foam, gui = "bold" }, a = { bg = p.surface, fg = p.foam, gui = 'bold' },
}, },
visual = { visual = {
a = { bg = p.surface, fg = p.iris, gui = "bold" }, a = { bg = p.surface, fg = p.iris, gui = 'bold' },
}, },
replace = { replace = {
a = { bg = p.surface, fg = p.pine, gui = "bold" }, a = { bg = p.surface, fg = p.pine, gui = 'bold' },
}, },
command = { command = {
a = { bg = p.surface, fg = p.love, gui = "bold" }, a = { bg = p.surface, fg = p.love, gui = 'bold' },
}, },
inactive = { inactive = {
a = { bg = bg_base, fg = p.subtle, gui = "bold" }, a = { bg = p.base, fg = p.subtle, gui = 'bold' },
b = { bg = bg_base, fg = p.subtle }, b = { bg = p.base, fg = p.subtle },
c = { bg = bg_base, fg = p.subtle, gui = "italic" }, c = { bg = p.base, fg = p.subtle, gui = 'italic' },
}, },
} }

View file

@ -1,40 +1,34 @@
local p = require("rose-pine.palette") local p = require('rose-pine.palette')
local config = require("rose-pine.config")
local bg_base = p.surface
if config.options.styles.transparency then
bg_base = "NONE"
end
return { return {
normal = { 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 }, b = { bg = p.overlay, fg = p.rose },
c = { bg = bg_base, fg = p.text }, c = { bg = p.base, fg = p.text },
}, },
insert = { 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 }, b = { bg = p.overlay, fg = p.foam },
c = { bg = bg_base, fg = p.text }, c = { bg = p.base, fg = p.text },
}, },
visual = { 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 }, b = { bg = p.overlay, fg = p.iris },
c = { bg = bg_base, fg = p.text }, c = { bg = p.base, fg = p.text },
}, },
replace = { 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 }, b = { bg = p.overlay, fg = p.pine },
c = { bg = bg_base, fg = p.text }, c = { bg = p.base, fg = p.text },
}, },
command = { 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 }, b = { bg = p.overlay, fg = p.love },
c = { bg = bg_base, fg = p.text }, c = { bg = p.base, fg = p.text },
}, },
inactive = { inactive = {
a = { bg = bg_base, fg = p.muted, gui = "bold" }, a = { bg = p.base, fg = p.muted, gui = 'bold' },
b = { bg = bg_base, fg = p.muted }, b = { bg = p.base, fg = p.muted },
c = { bg = bg_base, fg = p.muted }, c = { bg = p.base, fg = p.muted },
}, },
} }

File diff suppressed because it is too large Load diff

View file

@ -1,176 +1,68 @@
---@alias Variant "main" | "moon" | "dawn" ---@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 Color { fg: string, bg: string, sp: string, bold: boolean, italic: boolean, undercurl: boolean, underline: boolean, underdouble: boolean, underdotted: boolean, underdashed: boolean, strikethrough: boolean }
---@alias PaletteColor "base" | "surface" | "overlay" | "muted" | "subtle" | "text" | "love" | "gold" | "rose" | "pine" | "foam" | "iris" | "highlight_low" | "highlight_med" | "highlight_high"
---@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 = {} local M = {}
---@class Options ---@class Options
config.options = { M.options = {
---Set the desired variant: "auto" will follow the vim background, ---Set the desired variant: "auto" will follow the vim background,
---defaulting to `dark_variant` or "main" for dark and "dawn" for light. ---defaulting to "main" for dark and "dawn" for light. To change the dark
---variant, use `options.dark_variant = "moon"`.
---@type "auto" | Variant ---@type "auto" | Variant
variant = "auto", variant = 'auto',
---Set the desired dark variant when `options.variant` is set to "auto". ---Set the desired dark variant: applies when `options.variant` is set to
---"auto" to match `vim.o.background`.
---@type Variant ---@type Variant
dark_variant = "main", dark_variant = 'main',
---Differentiate between active and inactive windows and panels. bold_vert_split = false,
dim_inactive_windows = false,
---Extend background behind borders. Appearance differs based on which dim_nc_background = false,
---border characters you are using.
extend_background_behind_borders = true,
enable = { disable_background = false,
legacy_highlights = true, disable_float_background = false,
migrations = true, disable_italics = false,
terminal = true,
},
styles = {
bold = true,
italic = true,
transparency = false,
},
---@type table<string, table<string, string>>
palette = {},
---@type table<string, string | PaletteColor>
groups = { groups = {
border = "muted", background = 'base',
link = "iris", background_nc = 'nc',
panel = "surface", panel = 'surface',
panel_nc = 'base',
error = "love", border = 'highlight_med',
hint = "iris", comment = 'muted',
info = "foam", link = 'iris',
ok = "leaf", punctuation = 'muted',
warn = "gold", error = 'love',
note = "pine", hint = 'iris',
todo = "rose", info = 'foam',
warn = 'gold',
git_add = "foam", git_add = 'foam',
git_change = "rose", git_change = 'rose',
git_delete = "love", git_delete = 'love',
git_dirty = "rose", git_dirty = 'rose',
git_ignore = "muted", git_ignore = 'muted',
git_merge = "iris", git_merge = 'iris',
git_rename = "pine", git_rename = 'pine',
git_stage = "iris", git_stage = 'iris',
git_text = "rose", git_text = 'rose',
git_untracked = "subtle", headings = {
h1 = 'iris',
---@type string | PaletteColor h2 = 'foam',
h1 = "iris", h3 = 'rose',
h2 = "foam", h4 = 'gold',
h3 = "rose", h5 = 'pine',
h4 = "gold", h6 = 'foam',
h5 = "pine", },
h6 = "leaf",
---@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",
---@deprecated Expects a table with values h1...h6
-- headings = "text",
}, },
---@type table<string, Highlight> ---@type table<string, Color>
highlight_groups = {}, 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
} }
local function migrate(options) ---@param options Options|nil
if options.bold_vert_split then function M.extend(options)
local border = options.groups.border or "muted" M.options = vim.tbl_deep_extend('force', M.options, options or {})
options.highlight_groups["VertSplit"] = { fg = border, bg = border }
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
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 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.
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 = 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
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
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
options.groups.headings = nil
return options
end end
---@param options Options | nil return M
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

View file

@ -1,78 +1,74 @@
local options = require("rose-pine.config").options local options = require('rose-pine.config').options
local variants = { local variants = {
main = { main = {
_nc = "#16141f", ---@deprecated for backwards compatibility
base = "#191724", _experimental_nc = '#16141f',
surface = "#1f1d2e", nc = '#16141f',
overlay = "#26233a", base = '#191724',
muted = "#6e6a86", surface = '#1f1d2e',
subtle = "#908caa", overlay = '#26233a',
text = "#e0def4", muted = '#6e6a86',
love = "#eb6f92", subtle = '#908caa',
gold = "#f6c177", text = '#e0def4',
rose = "#ebbcba", love = '#eb6f92',
pine = "#31748f", gold = '#f6c177',
foam = "#9ccfd8", rose = '#ebbcba',
iris = "#c4a7e7", pine = '#31748f',
leaf = "#95b1ac", foam = '#9ccfd8',
highlight_low = "#21202e", iris = '#c4a7e7',
highlight_med = "#403d52", highlight_low = '#21202e',
highlight_high = "#524f67", highlight_med = '#403d52',
none = "NONE", highlight_high = '#524f67',
none = 'NONE',
}, },
moon = { moon = {
_nc = "#1f1d30", ---@deprecated for backwards compatibility
base = "#232136", _experimental_nc = '#1f1d30',
surface = "#2a273f", nc = '#1f1d30',
overlay = "#393552", base = '#232136',
muted = "#6e6a86", surface = '#2a273f',
subtle = "#908caa", overlay = '#393552',
text = "#e0def4", muted = '#6e6a86',
love = "#eb6f92", subtle = '#908caa',
gold = "#f6c177", text = '#e0def4',
rose = "#ea9a97", love = '#eb6f92',
pine = "#3e8fb0", gold = '#f6c177',
foam = "#9ccfd8", rose = '#ea9a97',
iris = "#c4a7e7", pine = '#3e8fb0',
leaf = "#95b1ac", foam = '#9ccfd8',
highlight_low = "#2a283e", iris = '#c4a7e7',
highlight_med = "#44415a", highlight_low = '#2a283e',
highlight_high = "#56526e", highlight_med = '#44415a',
none = "NONE", highlight_high = '#56526e',
none = 'NONE',
}, },
dawn = { dawn = {
_nc = "#f8f0e7", ---@deprecated for backwards compatibility
base = "#faf4ed", _experimental_nc = '#f8f0e7',
surface = "#fffaf3", nc = '#f8f0e7',
overlay = "#f2e9e1", base = '#faf4ed',
muted = "#9893a5", surface = '#fffaf3',
subtle = "#797593", overlay = '#f2e9e1',
text = "#464261", muted = '#9893a5',
love = "#b4637a", subtle = '#797593',
gold = "#ea9d34", text = '#575279',
rose = "#d7827e", love = '#b4637a',
pine = "#286983", gold = '#ea9d34',
foam = "#56949f", rose = '#d7827e',
iris = "#907aa9", pine = '#286983',
leaf = "#6d8f89", foam = '#56949f',
highlight_low = "#f4ede8", iris = '#907aa9',
highlight_med = "#dfdad9", highlight_low = '#f4ede8',
highlight_high = "#cecacd", highlight_med = '#dfdad9',
none = "NONE", highlight_high = '#cecacd',
none = 'NONE',
}, },
} }
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 if variants[options.variant] ~= nil then
return variants[options.variant] return variants[options.variant]
end 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']

View file

@ -2,43 +2,43 @@
--- https://github.com/akinsho/bufferline.nvim --- https://github.com/akinsho/bufferline.nvim
--- ---
--- @usage --- @usage
--- local highlights = require("rose-pine.plugins.bufferline") --- local highlights = require('rose-pine.plugins.bufferline')
--- require("bufferline").setup({ highlights = highlights }) --- require('bufferline').setup({ highlights = highlights })
local p = require("rose-pine.palette") local p = require('rose-pine.palette')
return { return {
-- fill = { -- fill = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- background = { -- background = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- tab = { -- tab = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
tab_selected = { tab_selected = {
fg = p.text, fg = p.text,
bg = p.overlay, bg = p.overlay,
}, },
-- tab_close = { -- tab_close = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- close_button = { -- close_button = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- close_button_visible = { -- close_button_visible = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- close_button_selected = { -- close_button_selected = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
buffer_visible = { buffer_visible = {
fg = p.subtle, fg = p.subtle,
@ -51,172 +51,172 @@ return {
italic = true, italic = true,
}, },
-- diagnostic = { -- diagnostic = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- diagnostic_visible = { -- diagnostic_visible = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- diagnostic_selected = { -- diagnostic_selected = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- bold = true, -- bold = true,
-- italic = true, -- italic = true,
-- }, -- },
-- info = { -- info = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- sp = "<color-value-here>", -- sp = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- info_visible = { -- info_visible = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- info_selected = { -- info_selected = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- bold = true, -- bold = true,
-- italic = true, -- italic = true,
-- sp = "<color-value-here>", -- sp = '<color-value-here>',
-- }, -- },
-- info_diagnostic = { -- info_diagnostic = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- sp = "<color-value-here>", -- sp = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- info_diagnostic_visible = { -- info_diagnostic_visible = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- info_diagnostic_selected = { -- info_diagnostic_selected = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- bold = true, -- bold = true,
-- italic = true, -- italic = true,
-- sp = "<color-value-here>", -- sp = '<color-value-here>',
-- }, -- },
-- warning = { -- warning = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- sp = "<color-value-here>", -- sp = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- warning_visible = { -- warning_visible = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- warning_selected = { -- warning_selected = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- bold = true, -- bold = true,
-- italic = true, -- italic = true,
-- sp = "<color-value-here>", -- sp = '<color-value-here>',
-- }, -- },
-- warning_diagnostic = { -- warning_diagnostic = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- sp = "<color-value-here>", -- sp = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- warning_diagnostic_visible = { -- warning_diagnostic_visible = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- warning_diagnostic_selected = { -- warning_diagnostic_selected = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- bold = true, -- bold = true,
-- italic = true, -- italic = true,
-- sp = warning_diagnostic_fg, -- sp = warning_diagnostic_fg,
-- }, -- },
-- error = { -- error = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- sp = "<color-value-here>", -- sp = '<color-value-here>',
-- }, -- },
-- error_visible = { -- error_visible = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- error_selected = { -- error_selected = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- bold = true, -- bold = true,
-- italic = true, -- italic = true,
-- sp = "<color-value-here>", -- sp = '<color-value-here>',
-- }, -- },
-- error_diagnostic = { -- error_diagnostic = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- sp = "<color-value-here>", -- sp = '<color-value-here>',
-- }, -- },
-- error_diagnostic_visible = { -- error_diagnostic_visible = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- error_diagnostic_selected = { -- error_diagnostic_selected = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- bold = true, -- bold = true,
-- italic = true, -- italic = true,
-- sp = "<color-value-here>", -- sp = '<color-value-here>',
-- }, -- },
-- modified = { -- modified = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- modified_visible = { -- modified_visible = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- modified_selected = { -- modified_selected = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- duplicate_selected = { -- duplicate_selected = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- italic = true, -- italic = true,
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- duplicate_visible = { -- duplicate_visible = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- italic = true, -- italic = true,
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- duplicate = { -- duplicate = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- italic = true, -- italic = true,
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- separator_selected = { -- separator_selected = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- separator_visible = { -- separator_visible = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- separator = { -- separator = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- indicator_selected = { -- indicator_selected = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- }, -- },
-- pick_selected = { -- pick_selected = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- italic = true, -- italic = true,
-- }, -- },
-- pick_visible = { -- pick_visible = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- bold = true, -- bold = true,
-- italic = true, -- italic = true,
-- }, -- },
-- pick = { -- pick = {
-- fg = "<color-value-here>", -- fg = '<color-value-here>',
-- bg = "<color-value-here>", -- bg = '<color-value-here>',
-- bold = true, -- bold = true,
-- italic = true, -- italic = true,
-- }, -- },

View file

@ -2,9 +2,9 @@
--- https://github.com/NTBBloodbath/galaxyline.nvim --- https://github.com/NTBBloodbath/galaxyline.nvim
--- ---
--- @usage --- @usage
--- local highlights = require("rose-pine.plugins.galaxyline") --- local highlights = require('rose-pine.plugins.galaxyline')
local p = require("rose-pine.palette") local p = require('rose-pine.palette')
return { return {
bg = p.surface, bg = p.surface,

View file

@ -2,9 +2,9 @@
--- https://github.com/David-Kunz/markid --- https://github.com/David-Kunz/markid
--- ---
--- @usage --- @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 } }) --- 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 } return { p.foam, p.rose, p.iris }

View file

@ -1,14 +0,0 @@
--- 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 }
}

View file

@ -2,14 +2,14 @@
--- https://github.com/akinsho/toggleterm.nvim --- https://github.com/akinsho/toggleterm.nvim
--- ---
--- @usage --- @usage
--- local highlights = require("rose-pine.plugins.toggleterm") --- local highlights = require('rose-pine.plugins.toggleterm')
--- require("toggleterm").setup({ highlights = highlights }) --- require('toggleterm').setup({ highlights = highlights })
return { return {
Normal = { link = "Normal" }, Normal = { link = 'Normal' },
NormalFloat = { link = "Normal" }, NormalFloat = { link = 'Normal' },
FloatBorder = { link = "FloatBorder" }, FloatBorder = { link = 'FloatBorder' },
SignColumn = { link = "SignColumn" }, SignColumn = { link = 'SignColumn' },
StatusLine = { link = "StatusLine" }, StatusLine = { link = 'StatusLine' },
StatusLineNC = { link = "StatusLineNC" }, StatusLineNC = { link = 'StatusLineNC' },
} }

629
lua/rose-pine/theme.lua Normal file
View file

@ -0,0 +1,629 @@
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

71
lua/rose-pine/util.lua Normal file
View file

@ -0,0 +1,71 @@
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<string, any>
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

View file

@ -1,65 +0,0 @@
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
local color_cache = {}
---@param color string Palette key or hex value
function utilities.parse_color(color)
if color_cache[color] then
return color_cache[color]
end
if color == nil then
print("Invalid color: " .. color)
return nil
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
color_cache[color] = color
return color
end
local blend_cache = {}
---@param fg string Foreground color
---@param bg string Background color
---@param alpha number Between 0 (background) and 1 (foreground)
function utilities.blend(fg, bg, alpha)
local cache_key = fg .. bg .. alpha
if blend_cache[cache_key] then
return blend_cache[cache_key]
end
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
local result = string.format("#%02X%02X%02X", blend_channel(1), blend_channel(2), blend_channel(3))
blend_cache[cache_key] = result
return result
end
return utilities

172
readme.md
View file

@ -11,35 +11,30 @@
</a> </a>
</p> </p>
## Getting started ## Install
Install `rose-pine/neovim` using your favourite package manager: **[Paq](https://github.com/savq/paq-nvim)**
### [pam.nvim](https://github.com/mvllow/pam.nvim)
```lua ```lua
{ source = "rose-pine/neovim", as = "rose-pine" } require('paq')({
{ 'rose-pine/neovim', as = 'rose-pine' }
})
``` ```
### [lazy.nvim](https://lazy.folke.io/installation) **[lazy.nvim](https://github.com/folke/lazy.nvim)**
**Structured Setup**
```lua ```lua
-- lua/plugins/rose-pine.lua require("lazy").setup({
return { { 'rose-pine/neovim', name = 'rose-pine' }
"rose-pine/neovim", })
name = "rose-pine",
config = function()
vim.cmd("colorscheme rose-pine")
end
}
``` ```
**Single file** **[packer.nvim](https://github.com/wbthomason/packer.nvim)**
```lua ```lua
{ "rose-pine/neovim", name = "rose-pine" } require('packer').startup(function(use)
use({ 'rose-pine/neovim', as = 'rose-pine' })
end)
``` ```
## Gallery ## Gallery
@ -58,104 +53,75 @@ return {
## Options ## Options
> [!IMPORTANT] > [!NOTE]
> Configure options _before_ setting colorscheme. > Options should be set **before** colorscheme
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. Variant respects `vim.o.background`, 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 ```lua
require("rose-pine").setup({ require('rose-pine').setup({
variant = "auto", -- auto, main, moon, or dawn --- @usage 'auto'|'main'|'moon'|'dawn'
dark_variant = "main", -- main, moon, or dawn variant = 'auto',
dim_inactive_windows = false, --- @usage 'main'|'moon'|'dawn'
extend_background_behind_borders = true, dark_variant = 'main',
bold_vert_split = false,
dim_nc_background = false,
disable_background = false,
disable_float_background = false,
disable_italics = false,
enable = { --- @usage string hex value or named color from rosepinetheme.com/palette
terminal = true, groups = {
legacy_highlights = true, -- Improve compatibility for previous versions of Neovim background = 'base',
migrations = true, -- Handle deprecated options automatically background_nc = '_experimental_nc',
}, panel = 'surface',
panel_nc = 'base',
border = 'highlight_med',
comment = 'muted',
link = 'iris',
punctuation = 'subtle',
styles = { error = 'love',
bold = true, hint = 'iris',
italic = true, info = 'foam',
transparency = false, warn = 'gold',
},
groups = { headings = {
border = "muted", h1 = 'iris',
link = "iris", h2 = 'foam',
panel = "surface", h3 = 'rose',
h4 = 'gold',
h5 = 'pine',
h6 = 'foam',
}
-- or set all headings at once
-- headings = 'subtle'
},
error = "love", -- Change specific vim highlight groups
hint = "iris", -- https://github.com/rose-pine/neovim/wiki/Recipes
info = "foam", highlight_groups = {
note = "pine", ColorColumn = { bg = 'rose' },
todo = "rose",
warn = "gold",
git_add = "foam", -- Blend colours against the "base" background
git_change = "rose", CursorLine = { bg = 'foam', blend = 10 },
git_delete = "love", StatusLine = { fg = 'love', bg = 'love', blend = 10 },
git_dirty = "rose",
git_ignore = "muted",
git_merge = "iris",
git_rename = "pine",
git_stage = "iris",
git_text = "rose",
git_untracked = "subtle",
h1 = "iris", -- By default each group adds to the existing config.
h2 = "foam", -- If you only want to set what is written in this config exactly,
h3 = "rose", -- you can set the inherit option:
h4 = "gold", Search = { bg = 'gold', inherit = false },
h5 = "pine", }
h6 = "foam",
},
palette = {
-- Override the builtin palette per variant
-- moon = {
-- base = '#18191a',
-- overlay = '#363738',
-- },
},
-- NOTE: Highlight groups are extended (merged) by default. Disable this
-- per group via `inherit = false`
highlight_groups = {
-- Comment = { fg = "foam" },
-- StatusLine = { fg = "love", bg = "love", blend = 15 },
-- VertSplit = { fg = "muted", bg = "muted" },
-- Visual = { fg = "base", bg = "text", inherit = false },
},
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,
}) })
vim.cmd("colorscheme rose-pine") -- Set colorscheme after options
-- vim.cmd("colorscheme rose-pine-main") vim.cmd('colorscheme rose-pine')
-- 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 ## 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 or [treesitter improvements](https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md#highlights). We welcome and appreciate any help in creating a lovely experience for all.
Feel free to update the [wiki](https://github.com/rose-pine/neovim/wiki/) with any [recipes](https://github.com/rose-pine/neovim/wiki/Recipes). - 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)