mirror of
https://github.com/rose-pine/neovim.git
synced 2025-10-15 12:38:53 +02:00
Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
26142478d7 |
16 changed files with 286 additions and 1837 deletions
|
|
@ -1,2 +1 @@
|
||||||
package.loaded["rose-pine.palette"] = nil
|
|
||||||
require("rose-pine").colorscheme("dawn")
|
require("rose-pine").colorscheme("dawn")
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
package.loaded["rose-pine.palette"] = nil
|
|
||||||
require("rose-pine").colorscheme("main")
|
require("rose-pine").colorscheme("main")
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
package.loaded["rose-pine.palette"] = nil
|
|
||||||
require("rose-pine").colorscheme("moon")
|
require("rose-pine").colorscheme("moon")
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1 @@
|
||||||
package.loaded["rose-pine.palette"] = nil
|
|
||||||
require("rose-pine").colorscheme()
|
require("rose-pine").colorscheme()
|
||||||
|
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
local p = require("rose-pine.palette")
|
|
||||||
local config = require("rose-pine.config")
|
|
||||||
|
|
||||||
local bg_base = p.base
|
|
||||||
if config.options.styles.transparency then
|
|
||||||
bg_base = "NONE"
|
|
||||||
end
|
|
||||||
|
|
||||||
return {
|
|
||||||
normal = {
|
|
||||||
a = { bg = p.surface, fg = p.rose, gui = "bold" },
|
|
||||||
b = { bg = p.surface, fg = p.text },
|
|
||||||
c = { bg = p.surface, fg = p.subtle, gui = "italic" },
|
|
||||||
},
|
|
||||||
insert = {
|
|
||||||
a = { bg = p.surface, fg = p.foam, gui = "bold" },
|
|
||||||
},
|
|
||||||
visual = {
|
|
||||||
a = { bg = p.surface, fg = p.iris, gui = "bold" },
|
|
||||||
},
|
|
||||||
replace = {
|
|
||||||
a = { bg = p.surface, fg = p.pine, gui = "bold" },
|
|
||||||
},
|
|
||||||
command = {
|
|
||||||
a = { bg = p.surface, fg = p.love, gui = "bold" },
|
|
||||||
},
|
|
||||||
inactive = {
|
|
||||||
a = { bg = bg_base, fg = p.subtle, gui = "bold" },
|
|
||||||
b = { bg = bg_base, fg = p.subtle },
|
|
||||||
c = { bg = bg_base, fg = p.subtle, gui = "italic" },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
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 = bg_base, fg = p.text },
|
|
||||||
},
|
|
||||||
insert = {
|
|
||||||
a = { bg = p.foam, fg = p.base, gui = "bold" },
|
|
||||||
b = { bg = p.overlay, fg = p.foam },
|
|
||||||
c = { bg = bg_base, fg = p.text },
|
|
||||||
},
|
|
||||||
visual = {
|
|
||||||
a = { bg = p.iris, fg = p.base, gui = "bold" },
|
|
||||||
b = { bg = p.overlay, fg = p.iris },
|
|
||||||
c = { bg = bg_base, fg = p.text },
|
|
||||||
},
|
|
||||||
replace = {
|
|
||||||
a = { bg = p.pine, fg = p.base, gui = "bold" },
|
|
||||||
b = { bg = p.overlay, fg = p.pine },
|
|
||||||
c = { bg = bg_base, fg = p.text },
|
|
||||||
},
|
|
||||||
command = {
|
|
||||||
a = { bg = p.love, fg = p.base, gui = "bold" },
|
|
||||||
b = { bg = p.overlay, fg = p.love },
|
|
||||||
c = { bg = bg_base, fg = p.text },
|
|
||||||
},
|
|
||||||
inactive = {
|
|
||||||
a = { bg = bg_base, fg = p.muted, gui = "bold" },
|
|
||||||
b = { bg = bg_base, fg = p.muted },
|
|
||||||
c = { bg = bg_base, fg = p.muted },
|
|
||||||
},
|
|
||||||
}
|
|
||||||
1492
lua/rose-pine.lua
1492
lua/rose-pine.lua
File diff suppressed because it is too large
Load diff
|
|
@ -1,176 +0,0 @@
|
||||||
---@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 { 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 = {}
|
|
||||||
|
|
||||||
---@class Options
|
|
||||||
config.options = {
|
|
||||||
---Set the desired variant: "auto" will follow the vim background,
|
|
||||||
---defaulting to `dark_variant` or "main" for dark and "dawn" for light.
|
|
||||||
---@type "auto" | Variant
|
|
||||||
variant = "auto",
|
|
||||||
|
|
||||||
---Set the desired dark variant when `options.variant` is set to "auto".
|
|
||||||
---@type Variant
|
|
||||||
dark_variant = "main",
|
|
||||||
|
|
||||||
---Differentiate between active and inactive windows and panels.
|
|
||||||
dim_inactive_windows = false,
|
|
||||||
|
|
||||||
---Extend background behind borders. Appearance differs based on which
|
|
||||||
---border characters you are using.
|
|
||||||
extend_background_behind_borders = true,
|
|
||||||
|
|
||||||
enable = {
|
|
||||||
legacy_highlights = true,
|
|
||||||
migrations = true,
|
|
||||||
terminal = true,
|
|
||||||
},
|
|
||||||
|
|
||||||
styles = {
|
|
||||||
bold = true,
|
|
||||||
italic = true,
|
|
||||||
transparency = false,
|
|
||||||
},
|
|
||||||
|
|
||||||
---@type table<string, table<string, string>>
|
|
||||||
palette = {},
|
|
||||||
|
|
||||||
---@type table<string, string | PaletteColor>
|
|
||||||
groups = {
|
|
||||||
border = "muted",
|
|
||||||
link = "iris",
|
|
||||||
panel = "surface",
|
|
||||||
|
|
||||||
error = "love",
|
|
||||||
hint = "iris",
|
|
||||||
info = "foam",
|
|
||||||
ok = "leaf",
|
|
||||||
warn = "gold",
|
|
||||||
note = "pine",
|
|
||||||
todo = "rose",
|
|
||||||
|
|
||||||
git_add = "foam",
|
|
||||||
git_change = "rose",
|
|
||||||
git_delete = "love",
|
|
||||||
git_dirty = "rose",
|
|
||||||
git_ignore = "muted",
|
|
||||||
git_merge = "iris",
|
|
||||||
git_rename = "pine",
|
|
||||||
git_stage = "iris",
|
|
||||||
git_text = "rose",
|
|
||||||
git_untracked = "subtle",
|
|
||||||
|
|
||||||
---@type string | PaletteColor
|
|
||||||
h1 = "iris",
|
|
||||||
h2 = "foam",
|
|
||||||
h3 = "rose",
|
|
||||||
h4 = "gold",
|
|
||||||
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>
|
|
||||||
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)
|
|
||||||
if options.bold_vert_split then
|
|
||||||
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
|
|
||||||
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
|
|
||||||
|
|
||||||
---@param options Options | nil
|
|
||||||
function config.extend_options(options)
|
|
||||||
config.options = vim.tbl_deep_extend("force", config.options, options or {})
|
|
||||||
|
|
||||||
if config.options.enable.migrations then
|
|
||||||
config.options = migrate(config.options)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
return config
|
|
||||||
0
lua/rose-pine/health.lua
Normal file
0
lua/rose-pine/health.lua
Normal file
|
|
@ -1,78 +0,0 @@
|
||||||
local options = require("rose-pine.config").options
|
|
||||||
local variants = {
|
|
||||||
main = {
|
|
||||||
_nc = "#16141f",
|
|
||||||
base = "#191724",
|
|
||||||
surface = "#1f1d2e",
|
|
||||||
overlay = "#26233a",
|
|
||||||
muted = "#6e6a86",
|
|
||||||
subtle = "#908caa",
|
|
||||||
text = "#e0def4",
|
|
||||||
love = "#eb6f92",
|
|
||||||
gold = "#f6c177",
|
|
||||||
rose = "#ebbcba",
|
|
||||||
pine = "#31748f",
|
|
||||||
foam = "#9ccfd8",
|
|
||||||
iris = "#c4a7e7",
|
|
||||||
leaf = "#95b1ac",
|
|
||||||
highlight_low = "#21202e",
|
|
||||||
highlight_med = "#403d52",
|
|
||||||
highlight_high = "#524f67",
|
|
||||||
none = "NONE",
|
|
||||||
},
|
|
||||||
moon = {
|
|
||||||
_nc = "#1f1d30",
|
|
||||||
base = "#232136",
|
|
||||||
surface = "#2a273f",
|
|
||||||
overlay = "#393552",
|
|
||||||
muted = "#6e6a86",
|
|
||||||
subtle = "#908caa",
|
|
||||||
text = "#e0def4",
|
|
||||||
love = "#eb6f92",
|
|
||||||
gold = "#f6c177",
|
|
||||||
rose = "#ea9a97",
|
|
||||||
pine = "#3e8fb0",
|
|
||||||
foam = "#9ccfd8",
|
|
||||||
iris = "#c4a7e7",
|
|
||||||
leaf = "#95b1ac",
|
|
||||||
highlight_low = "#2a283e",
|
|
||||||
highlight_med = "#44415a",
|
|
||||||
highlight_high = "#56526e",
|
|
||||||
none = "NONE",
|
|
||||||
},
|
|
||||||
dawn = {
|
|
||||||
_nc = "#f8f0e7",
|
|
||||||
base = "#faf4ed",
|
|
||||||
surface = "#fffaf3",
|
|
||||||
overlay = "#f2e9e1",
|
|
||||||
muted = "#9893a5",
|
|
||||||
subtle = "#797593",
|
|
||||||
text = "#464261",
|
|
||||||
love = "#b4637a",
|
|
||||||
gold = "#ea9d34",
|
|
||||||
rose = "#d7827e",
|
|
||||||
pine = "#286983",
|
|
||||||
foam = "#56949f",
|
|
||||||
iris = "#907aa9",
|
|
||||||
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
|
|
||||||
|
|
||||||
return vim.o.background == "light" and variants.dawn or variants[options.dark_variant or "main"]
|
|
||||||
|
|
@ -1,223 +0,0 @@
|
||||||
--- Rosé Pine for bufferline
|
|
||||||
--- https://github.com/akinsho/bufferline.nvim
|
|
||||||
---
|
|
||||||
--- @usage
|
|
||||||
--- local highlights = require("rose-pine.plugins.bufferline")
|
|
||||||
--- require("bufferline").setup({ highlights = highlights })
|
|
||||||
|
|
||||||
local p = require("rose-pine.palette")
|
|
||||||
|
|
||||||
return {
|
|
||||||
-- fill = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- background = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- tab = {
|
|
||||||
-- 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>",
|
|
||||||
-- },
|
|
||||||
-- close_button = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- close_button_visible = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- close_button_selected = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
buffer_visible = {
|
|
||||||
fg = p.subtle,
|
|
||||||
bg = p.base,
|
|
||||||
},
|
|
||||||
buffer_selected = {
|
|
||||||
fg = p.text,
|
|
||||||
bg = p.surface,
|
|
||||||
bold = true,
|
|
||||||
italic = true,
|
|
||||||
},
|
|
||||||
-- diagnostic = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- diagnostic_visible = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- diagnostic_selected = {
|
|
||||||
-- 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>",
|
|
||||||
-- },
|
|
||||||
-- info_visible = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- info_selected = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- bold = true,
|
|
||||||
-- italic = true,
|
|
||||||
-- sp = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- info_diagnostic = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- sp = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- info_diagnostic_visible = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- info_diagnostic_selected = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- bold = true,
|
|
||||||
-- italic = true,
|
|
||||||
-- sp = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- warning = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- sp = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- warning_visible = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- warning_selected = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- bold = true,
|
|
||||||
-- italic = true,
|
|
||||||
-- sp = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- warning_diagnostic = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- sp = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- warning_diagnostic_visible = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- warning_diagnostic_selected = {
|
|
||||||
-- 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>",
|
|
||||||
-- },
|
|
||||||
-- error_visible = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- error_selected = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- bold = true,
|
|
||||||
-- italic = true,
|
|
||||||
-- sp = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- error_diagnostic = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- sp = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- error_diagnostic_visible = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- error_diagnostic_selected = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- bold = true,
|
|
||||||
-- italic = true,
|
|
||||||
-- sp = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- modified = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- modified_visible = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- modified_selected = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- duplicate_selected = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- italic = true,
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- duplicate_visible = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- italic = true,
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- duplicate = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- italic = true,
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- separator_selected = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- separator_visible = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- separator = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- indicator_selected = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- },
|
|
||||||
-- pick_selected = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- italic = true,
|
|
||||||
-- },
|
|
||||||
-- pick_visible = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- bold = true,
|
|
||||||
-- italic = true,
|
|
||||||
-- },
|
|
||||||
-- pick = {
|
|
||||||
-- fg = "<color-value-here>",
|
|
||||||
-- bg = "<color-value-here>",
|
|
||||||
-- bold = true,
|
|
||||||
-- italic = true,
|
|
||||||
-- },
|
|
||||||
}
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
--- Rosé Pine for galaxyline fork
|
|
||||||
--- https://github.com/NTBBloodbath/galaxyline.nvim
|
|
||||||
---
|
|
||||||
--- @usage
|
|
||||||
--- local highlights = require("rose-pine.plugins.galaxyline")
|
|
||||||
|
|
||||||
local p = require("rose-pine.palette")
|
|
||||||
|
|
||||||
return {
|
|
||||||
bg = p.surface,
|
|
||||||
fg = p.text,
|
|
||||||
fg_alt = p.subtle,
|
|
||||||
yellow = p.gold,
|
|
||||||
cyan = p.rose,
|
|
||||||
green = p.pine,
|
|
||||||
orange = p.muted,
|
|
||||||
magenta = p.iris,
|
|
||||||
blue = p.foam,
|
|
||||||
red = p.love,
|
|
||||||
}
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
--- Rosé Pine for markid
|
|
||||||
--- https://github.com/David-Kunz/markid
|
|
||||||
---
|
|
||||||
--- @usage
|
|
||||||
--- local highlights = require("rose-pine.plugins.markid")
|
|
||||||
--- require("nvim-treesitter.configs").setup({ markid = { enable = true, colors = highlights } })
|
|
||||||
|
|
||||||
local p = require("rose-pine.palette")
|
|
||||||
|
|
||||||
return { p.foam, p.rose, p.iris }
|
|
||||||
|
|
@ -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 }
|
|
||||||
}
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
--- Rosé Pine for toggleterm
|
|
||||||
--- https://github.com/akinsho/toggleterm.nvim
|
|
||||||
---
|
|
||||||
--- @usage
|
|
||||||
--- local highlights = require("rose-pine.plugins.toggleterm")
|
|
||||||
--- require("toggleterm").setup({ highlights = highlights })
|
|
||||||
|
|
||||||
return {
|
|
||||||
Normal = { link = "Normal" },
|
|
||||||
NormalFloat = { link = "Normal" },
|
|
||||||
FloatBorder = { link = "FloatBorder" },
|
|
||||||
SignColumn = { link = "SignColumn" },
|
|
||||||
StatusLine = { link = "StatusLine" },
|
|
||||||
StatusLineNC = { link = "StatusLineNC" },
|
|
||||||
}
|
|
||||||
|
|
@ -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
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue