mirror of
https://github.com/rose-pine/neovim.git
synced 2025-10-15 12:38:53 +02:00
Compare commits
96 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
72a04c4065 |
||
|
|
0e70556c8c |
||
|
|
72befaffea |
||
|
|
f93360149e |
||
|
|
83c66bcadb |
||
|
|
6b9840790c | ||
|
|
d195ed8673 | ||
|
|
a67f5ef34b | ||
|
|
39ec539f83 | ||
|
|
5ccc379822 | ||
|
|
d7dc9cd3f2 | ||
|
|
44739383b9 | ||
|
|
8b216f7252 | ||
|
|
0511701746 | ||
|
|
946de320f4 | ||
|
|
340cf5ed5e | ||
|
|
f01eac6eed | ||
|
|
3d71ab02f2 | ||
|
|
0ca4bfbc6f | ||
|
|
8db1217704 | ||
|
|
2b88dfb054 | ||
|
|
ffd5b69948 | ||
|
|
6b51153905 | ||
|
|
40f03c4df1 | ||
|
|
463742691b | ||
|
|
c306f13158 | ||
|
|
fc418a716f | ||
|
|
36526815ee | ||
|
|
a449bb2599 | ||
|
|
5e7bf83782 | ||
|
|
1ebe0a5171 | ||
|
|
8869e546d4 | ||
|
|
2f44ef189f | ||
|
|
22f873c7db | ||
|
|
33a1ba3126 | ||
|
|
fe9e661cda | ||
|
|
94ffdb7748 | ||
|
|
d97cc7fcd7 | ||
|
|
7f0b8c4c7f | ||
|
|
c14da532fa | ||
|
|
8b1a2e73d2 | ||
|
|
d6112a7c56 | ||
|
|
535240c846 | ||
|
|
f7c01f07ee | ||
|
|
656f360ded | ||
|
|
5929bc8683 | ||
|
|
bf7ceb32fa | ||
|
|
3bbd8a865c | ||
|
|
afb46f9b66 | ||
|
|
f2bf6e8d49 | ||
|
|
2f1733d36f | ||
|
|
c4b55e85fb | ||
|
|
fe5f4e11f7 | ||
|
|
69b3aa9500 | ||
|
|
71852123cc | ||
|
|
6d476a5c64 | ||
|
|
958dce3da9 | ||
|
|
511e82e272 | ||
|
|
f67828be44 | ||
|
|
cbc2064f4c | ||
|
|
c8477ee978 | ||
|
|
8d9c83d145 | ||
|
|
465b7dc623 | ||
|
|
e4c22a9163 | ||
|
|
01dc90af2f | ||
|
|
63f4613365 | ||
|
|
1f22d4e97e | ||
|
|
a959c73910 | ||
|
|
3dbb8a99bd | ||
|
|
e901a53e41 | ||
|
|
c8e97915d1 | ||
|
|
12ace889a0 | ||
|
|
e28cda232b | ||
|
|
ea3f15ca95 | ||
|
|
4372c4eb49 | ||
|
|
95e9767165 | ||
|
|
9d0e1b70d9 | ||
|
|
75d145fa08 | ||
|
|
4452ecd140 | ||
|
|
0b77ef0e7b | ||
|
|
8514c638bc | ||
|
|
e62a61166e | ||
|
|
7ed74e3f24 | ||
|
|
f4d51d67ee | ||
|
|
aa74893a06 | ||
|
|
1ffdf27819 | ||
|
|
e0674e5e5c | ||
|
|
79e0d756b9 | ||
|
|
46044020c6 | ||
|
|
1edcf47562 | ||
|
|
188190f285 | ||
|
|
bfa2d2b2fb | ||
|
|
2c892088f9 | ||
|
|
76b6d830f6 | ||
|
|
82285ba9f1 | ||
|
|
86fa83761e |
12 changed files with 974 additions and 309 deletions
|
|
@ -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" },
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,34 +1,40 @@
|
|||
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 {
|
||||
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 },
|
||||
},
|
||||
}
|
||||
|
|
|
|||
1092
lua/rose-pine.lua
1092
lua/rose-pine.lua
File diff suppressed because it is too large
Load diff
|
|
@ -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 { 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 = {}
|
||||
|
||||
|
|
@ -21,11 +21,12 @@ 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,
|
||||
legacy_highlights = true,
|
||||
migrations = true,
|
||||
terminal = true,
|
||||
},
|
||||
|
||||
styles = {
|
||||
|
|
@ -34,6 +35,9 @@ config.options = {
|
|||
transparency = false,
|
||||
},
|
||||
|
||||
---@type table<string, table<string, string>>
|
||||
palette = {},
|
||||
|
||||
---@type table<string, string | PaletteColor>
|
||||
groups = {
|
||||
border = "muted",
|
||||
|
|
@ -43,7 +47,10 @@ config.options = {
|
|||
error = "love",
|
||||
hint = "iris",
|
||||
info = "foam",
|
||||
ok = "leaf",
|
||||
warn = "gold",
|
||||
note = "pine",
|
||||
todo = "rose",
|
||||
|
||||
git_add = "foam",
|
||||
git_change = "rose",
|
||||
|
|
@ -56,15 +63,13 @@ config.options = {
|
|||
git_text = "rose",
|
||||
git_untracked = "subtle",
|
||||
|
||||
---@type string | PaletteColor | table<string, string | PaletteColor>
|
||||
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 = "leaf",
|
||||
|
||||
---@deprecated Replaced by `options.highlight_groups["Normal"]`
|
||||
-- background = "base",
|
||||
|
|
@ -72,6 +77,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<string, Highlight>
|
||||
|
|
@ -98,7 +105,13 @@ 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_background then
|
||||
options.highlight_groups["Normal"] = { bg = "NONE" }
|
||||
end
|
||||
|
||||
if options.disable_float_background then
|
||||
|
|
@ -119,27 +132,34 @@ 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.
|
||||
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
|
||||
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,
|
||||
}
|
||||
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
|
||||
|
|
|
|||
|
|
@ -11,12 +11,14 @@ local variants = {
|
|||
love = "#eb6f92",
|
||||
gold = "#f6c177",
|
||||
rose = "#ebbcba",
|
||||
pine = "#3e8fb0",
|
||||
pine = "#31748f",
|
||||
foam = "#9ccfd8",
|
||||
iris = "#c4a7e7",
|
||||
leaf = "#95b1ac",
|
||||
highlight_low = "#21202e",
|
||||
highlight_med = "#403d52",
|
||||
highlight_high = "#524f67",
|
||||
none = "NONE",
|
||||
},
|
||||
moon = {
|
||||
_nc = "#1f1d30",
|
||||
|
|
@ -32,9 +34,11 @@ local variants = {
|
|||
pine = "#3e8fb0",
|
||||
foam = "#9ccfd8",
|
||||
iris = "#c4a7e7",
|
||||
leaf = "#95b1ac",
|
||||
highlight_low = "#2a283e",
|
||||
highlight_med = "#44415a",
|
||||
highlight_high = "#56526e",
|
||||
none = "NONE",
|
||||
},
|
||||
dawn = {
|
||||
_nc = "#f8f0e7",
|
||||
|
|
@ -50,12 +54,23 @@ local variants = {
|
|||
pine = "#286983",
|
||||
foam = "#56949f",
|
||||
iris = "#907aa9",
|
||||
leaf = "#6d8f89",
|
||||
highlight_low = "#f4ede8",
|
||||
highlight_med = "#dfdad9",
|
||||
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
|
||||
return variants[options.variant]
|
||||
end
|
||||
|
|
|
|||
|
|
@ -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 = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- background = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- tab = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
tab_selected = {
|
||||
fg = p.text,
|
||||
bg = p.overlay,
|
||||
},
|
||||
-- tab_close = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- close_button = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- close_button_visible = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- close_button_selected = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
buffer_visible = {
|
||||
fg = p.subtle,
|
||||
|
|
@ -51,172 +51,172 @@ return {
|
|||
italic = true,
|
||||
},
|
||||
-- diagnostic = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- diagnostic_visible = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- diagnostic_selected = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- bold = true,
|
||||
-- italic = true,
|
||||
-- },
|
||||
-- info = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- sp = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- sp = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- info_visible = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- info_selected = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- bold = true,
|
||||
-- italic = true,
|
||||
-- sp = '<color-value-here>',
|
||||
-- sp = "<color-value-here>",
|
||||
-- },
|
||||
-- info_diagnostic = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- sp = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- sp = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- info_diagnostic_visible = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- info_diagnostic_selected = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- bold = true,
|
||||
-- italic = true,
|
||||
-- sp = '<color-value-here>',
|
||||
-- sp = "<color-value-here>",
|
||||
-- },
|
||||
-- warning = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- sp = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- sp = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- warning_visible = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- warning_selected = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- bold = true,
|
||||
-- italic = true,
|
||||
-- sp = '<color-value-here>',
|
||||
-- sp = "<color-value-here>",
|
||||
-- },
|
||||
-- warning_diagnostic = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- sp = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- sp = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- warning_diagnostic_visible = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- warning_diagnostic_selected = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- bold = true,
|
||||
-- italic = true,
|
||||
-- sp = warning_diagnostic_fg,
|
||||
-- },
|
||||
-- error = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- sp = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- sp = "<color-value-here>",
|
||||
-- },
|
||||
-- error_visible = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- error_selected = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- bold = true,
|
||||
-- italic = true,
|
||||
-- sp = '<color-value-here>',
|
||||
-- sp = "<color-value-here>",
|
||||
-- },
|
||||
-- error_diagnostic = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- sp = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- sp = "<color-value-here>",
|
||||
-- },
|
||||
-- error_diagnostic_visible = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- error_diagnostic_selected = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- bold = true,
|
||||
-- italic = true,
|
||||
-- sp = '<color-value-here>',
|
||||
-- sp = "<color-value-here>",
|
||||
-- },
|
||||
-- modified = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- modified_visible = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- modified_selected = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- duplicate_selected = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- italic = true,
|
||||
-- bg = '<color-value-here>',
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- duplicate_visible = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- italic = true,
|
||||
-- bg = '<color-value-here>',
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- duplicate = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- italic = true,
|
||||
-- bg = '<color-value-here>',
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- separator_selected = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- separator_visible = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- separator = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- indicator_selected = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- },
|
||||
-- pick_selected = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- italic = true,
|
||||
-- },
|
||||
-- pick_visible = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- bold = true,
|
||||
-- italic = true,
|
||||
-- },
|
||||
-- pick = {
|
||||
-- fg = '<color-value-here>',
|
||||
-- bg = '<color-value-here>',
|
||||
-- fg = "<color-value-here>",
|
||||
-- bg = "<color-value-here>",
|
||||
-- bold = true,
|
||||
-- italic = true,
|
||||
-- },
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
||||
|
|
|
|||
|
|
@ -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")
|
||||
|
|
|
|||
14
lua/rose-pine/plugins/obsidian.lua
Normal file
14
lua/rose-pine/plugins/obsidian.lua
Normal file
|
|
@ -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 }
|
||||
}
|
||||
|
|
@ -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" },
|
||||
|
|
|
|||
|
|
@ -14,10 +14,17 @@ local function color_to_rgb(color)
|
|||
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
|
||||
local function parse_color(color)
|
||||
function utilities.parse_color(color)
|
||||
if color_cache[color] then
|
||||
return color_cache[color]
|
||||
end
|
||||
|
||||
if color == nil then
|
||||
return print("Invalid color")
|
||||
print("Invalid color: " .. color)
|
||||
return nil
|
||||
end
|
||||
|
||||
color = color:lower()
|
||||
|
|
@ -26,13 +33,21 @@ local function parse_color(color)
|
|||
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)
|
||||
local function blend(fg, bg, alpha)
|
||||
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)
|
||||
|
||||
|
|
@ -41,26 +56,10 @@ local function blend(fg, bg, alpha)
|
|||
return math.floor(math.min(math.max(0, ret), 255) + 0.5)
|
||||
end
|
||||
|
||||
return string.format("#%02X%02X%02X", blend_channel(1), blend_channel(2), blend_channel(3))
|
||||
end
|
||||
local result = string.format("#%02X%02X%02X", blend_channel(1), blend_channel(2), blend_channel(3))
|
||||
|
||||
---@param group string
|
||||
---@param highlight table<string, any>
|
||||
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)
|
||||
blend_cache[cache_key] = result
|
||||
return result
|
||||
end
|
||||
|
||||
return utilities
|
||||
|
|
|
|||
75
readme.md
75
readme.md
|
|
@ -13,18 +13,33 @@
|
|||
|
||||
## 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
|
||||
{ 'rose-pine/neovim', name = 'rose-pine' }
|
||||
-- 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" }
|
||||
```
|
||||
|
||||
## Gallery
|
||||
|
|
@ -51,11 +66,17 @@ 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,
|
||||
extend_background_behind_borders = false,
|
||||
extend_background_behind_borders = true,
|
||||
|
||||
enable = {
|
||||
terminal = true,
|
||||
legacy_highlights = true, -- Improve compatibility for previous versions of Neovim
|
||||
migrations = true, -- Handle deprecated options automatically
|
||||
},
|
||||
|
||||
styles = {
|
||||
bold = true,
|
||||
|
|
@ -71,6 +92,8 @@ require('rose-pine').setup({
|
|||
error = "love",
|
||||
hint = "iris",
|
||||
info = "foam",
|
||||
note = "pine",
|
||||
todo = "rose",
|
||||
warn = "gold",
|
||||
|
||||
git_add = "foam",
|
||||
|
|
@ -84,21 +107,29 @@ 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",
|
||||
},
|
||||
|
||||
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)
|
||||
|
|
@ -114,10 +145,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]
|
||||
|
|
@ -125,6 +156,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).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue