Compare commits

...

122 commits

Author SHA1 Message Date
Antoine Bertin
72a04c4065
feat: add AvantePromptInput highlight support (#368)
* feat: add AvantePromptInput highlight support
2025-08-24 09:50:23 -05:00
HieuDao-code
0e70556c8c
feat(diffview.nvim): add support for sindrets/diffview.nvim (#369) 2025-08-24 09:47:05 -05:00
Dawid Karpiński
72befaffea
fix: do not clear blend prop from highlight (#351)
* add private built-in blend override

---------

Co-authored-by: mvllow <mvllow@icloud.com>
2025-07-18 15:25:55 -05:00
fdcote
f93360149e
feat: add ModesFormat (#367) 2025-06-26 16:32:32 -05:00
Adrian Schneider
83c66bcadb
feat(grug-far): add highlight groups for add/remove results (#366) 2025-06-26 12:31:24 -05:00
fdcote
6b9840790c feat: add QuickFixLine (#357) 2025-05-05 12:13:20 -05:00
Andrei Heidelbacher
d195ed8673 feat(blink.cmp): improve BlinkCmpDoc contrast between current line (#356) 2025-05-01 16:55:24 -05:00
Andrei Heidelbacher
a67f5ef34b fix(blink.cmp): remove dedicated BlinkCmpDoc highlight (#355)
The default `BlinkCmpDoc` highlight is linked to `NormalFloat`, which is
a sensible default. However, due to overriding the default link with
only `fg` provided, the `bg` is cleared and the documentation popup is
indistinguishable from regular text.

This change is technically a no-op in terms of intended palette, because
`NormalFloat` should already use `palette.text`, and only fixes the
cleared `bg` bug.
2025-04-30 20:53:00 -05:00
Andrei Heidelbacher
39ec539f83 feat(lualine): change background from base to surface (#354)
This change improves the contrast of the statusline while aligning with the theme's spec.
2025-04-30 20:02:53 -05:00
aileot
5ccc379822 fix: set background=light if variant is "dawn" (#349)
* fix: set `background=light` if variant is "dawn"

This change might fix https://github.com/rose-pine/neovim/issues/321

* Update lua/rose-pine.lua

* fix: restrict variants that override `&background`

The other variant params are considered as if "auto"
2025-03-31 10:27:19 -05:00
stelo
d7dc9cd3f2 feat: extends DapUIType fg to iris (#348) 2025-03-11 21:25:25 -05:00
mvllow
44739383b9 docs: add highlight group examples with blend and inherit options 2025-02-25 19:58:52 -06:00
Tiago
8b216f7252 feat: add support for vim-sneak (#342) 2025-02-23 15:19:21 -06:00
mvllow
0511701746 feat: use experimental darker text for dawn 2025-02-05 19:49:14 -06:00
mvllow
946de320f4 fix: strip non-standard blend properties 2025-02-05 19:36:24 -06:00
mvllow
340cf5ed5e feat(perf): cache colors for up to 3x speed improvements 2025-02-05 19:35:55 -06:00
mvllow
f01eac6eed fix: invalid palette format 2025-02-03 11:28:57 -06:00
mvllow
3d71ab02f2 feat: reduce background opacity for special comments 2025-02-03 11:06:21 -06:00
mvllow
0ca4bfbc6f feat: set attribute style 2025-02-03 11:05:57 -06:00
mvllow
8db1217704 feat: use consistent variable styles 2025-02-03 11:05:44 -06:00
mvllow
2b88dfb054 refactor: update documentation 2025-02-03 11:05:20 -06:00
aileot
ffd5b69948 refactor(gitsigns): avoid redundant links (#336)
The `SignAdd`, `SignChange`, and `SignDelete` are never referenced by
any other highlight definitions than the previous `GitSigns` ones before
this change.

The isolated definitions are only left for backward compatibility.
2025-02-02 15:09:20 -06:00
Patrick Haun
6b51153905 More obvious match highlight in snacks.picker (#335) 2025-01-15 14:28:37 -06:00
Federico Minaya
40f03c4df1 feat: add snacks indent highlights (#334) 2025-01-14 15:20:19 -06:00
mvllow
463742691b feat: add Notify*Body highlights
Fixes #331
2025-01-08 09:37:09 -06:00
mvllow
c306f13158 feat: use blended iris for visual
Fixes #277
2025-01-08 09:09:59 -06:00
mvllow
fc418a716f fix: lualine transparency
Fixes #333
2025-01-07 09:47:00 -06:00
YarLama
36526815ee Update readme.md (#328)
* Update readme.md

Extended description for Structured Setup lazy.nvim

* Update readme.md

---------

Co-authored-by: mvllow <mvllow@icloud.com>
2024-12-10 09:50:19 -06:00
Metin Yalcinkaya
a449bb2599 feat: added highlight support for Saghen/blink.cmp (#329)
Closes #326
2024-12-10 09:39:28 -06:00
Anupam Basu
5e7bf83782 feat: add highlight support for epwalsh/obsidian.nvim (#323)
---------

Co-authored-by: mvllow <mvllow@icloud.com>
2024-10-23 18:59:08 -04:00
mvllow
1ebe0a5171 feat: use gold for search
Closes #305
2024-10-08 10:22:29 -05:00
not
8869e546d4 feat(transparency): support trouble.nvim (#319) 2024-08-25 13:09:15 -05:00
not
2f44ef189f feat: use neutral colours for search (#318) 2024-08-25 12:41:35 -05:00
not
22f873c7db fix: palette typo (#317) 2024-08-25 12:37:07 -05:00
dav-cho
33a1ba3126 fix: wrong spelling for palette (#316) 2024-08-25 12:35:29 -05:00
Aaron Pham
fe9e661cda feat(plugins): add support for avante.nvim (#315) 2024-08-25 12:20:43 -05:00
jostaub
94ffdb7748 feat: palette overrides (#307)
* feat: palette overrides

* removed option all from palett override

* removed dead code forgotten in last commit

* fix typo in readme and simplified comment

Co-authored-by: not <mvllow@icloud.com>

---------

Co-authored-by: not <mvllow@icloud.com>
2024-08-14 13:40:33 -05:00
Allan Deutsch
d97cc7fcd7 fix: nvim-notify background (#308) 2024-08-12 15:59:44 -05:00
Vlad
7f0b8c4c7f chore: markdown.nvim renamed to render-markdown.nvim (#309)
Reference to change:
aeb5cec617
2024-08-05 15:59:59 -05:00
Shaun Clayton
c14da532fa feat: add support for grug-far.nvim (#304)
* feat: add support for grug-far.nvim

* fix: change link for results match to `CurSearch`

Co-authored-by: not <mvllow@icloud.com>

* fix: add highlights for line numbers

---------

Co-authored-by: not <mvllow@icloud.com>
2024-07-25 16:47:21 -05:00
Shaun Clayton
8b1a2e73d2 feat: add support for markdown.nvim (#303)
* feat: add support for markdown.nvim

* fix: tweaked some highlights to achieve better appearance

* fix: adjust heading highlights to use group linking
2024-07-24 16:29:39 -05:00
not
d6112a7c56 fix(transparency): lualine separator (#301)
Fixes #288
2024-07-23 21:51:43 -05:00
not
535240c846 feat: highlight neotree tabs (#300)
Fixes #263
2024-07-23 19:17:59 -05:00
Shaun Clayton
f7c01f07ee fix: fzf-lua invisible selection (#299)
* fix: invisible text in selection in fzf-lua

* fix: correct bg color for FzfLuaNormal

* fix: invisible text in selection in fzf-lua

* fix: correct bg color for FzfLuaNormal

* fix: change linking and add highlight for FzfLuaFilePart

* fix: linking to 'FloatTitle' for WhichKeyTitle

This works the same as the original fix, confirmed by testing
against nvim 0.10.0 and nightly.

Prefer linking over previous solution.
2024-07-23 16:56:40 -05:00
not
656f360ded feat: improve diff text (#297) 2024-07-22 16:07:45 -05:00
not
5929bc8683 feat: improve float transparency (#298) 2024-07-22 11:12:10 -05:00
Shaun Clayton
bf7ceb32fa chore: update mini-icons highlights to use appropriate colors (#295) 2024-07-22 10:17:13 -05:00
Shaun Clayton
3bbd8a865c fix: broken transparency for treesitter-context (#294) 2024-07-22 00:23:59 -05:00
Shaun Clayton
afb46f9b66 fix: add missing highlight (#293) 2024-07-21 23:06:14 -05:00
Shaun Clayton
f2bf6e8d49 feat: add support for rainbow-delimiters.nvim (#292) 2024-07-21 16:39:15 -05:00
Shaun Clayton
2f1733d36f feat: add support for icons in which-key.nvim (#291)
* feat: add icon support for which-key.nvim

* fix: incorrect color reference

* feat: set WhichKeyIcon hl group to 'pine' by default

Used when the colors option is set to false.
2024-07-21 16:12:11 -05:00
Shaun Clayton
c4b55e85fb feat(palette): add initial support for new color leaf (#290)
* feat(palette): add new color 'leaf'

* feat: add  highlight groups to defaults
2024-07-21 13:17:17 -05:00
Shaun Clayton
fe5f4e11f7 chore: update highlights for which-key.nvim (#287)
* chore: update highlights for which-key.nvim

* fix: revert placement of WhichKeyFloat hl group

* feat: add additional highlight groups for icons in which-key

* Revert "feat: add additional highlight groups for icons in which-key"

Need to come up with a different solution.

This reverts commit 18d70420a2.

* fix: use explicit fg and bg for WhichKeyTitle

* Revert "fix: use explicit fg and bg for WhichKeyTitle"

Breaks extend_background_behind_borders again... Oops

This reverts commit 1389556a19.
2024-07-15 10:21:08 -05:00
Ilya Kuporosov
69b3aa9500 fix: link @lsp.type.comment.c, @lsp.type.comment.cpp to @comment (#282)
It fixes branches of conditional directives like `#if` and `#ifdef` in C and C++
appearing as if they both are true, without breaking TODO comments.
2024-07-03 16:23:19 -05:00
not
71852123cc feat: set matching background on MiniFilesTitle (#280) 2024-06-27 12:55:27 -05:00
Evgeni Chasnovski
6d476a5c64 feat: add explicit full 'mini.nvim' support (#279) 2024-06-27 12:51:35 -05:00
not
958dce3da9 feat: support upcoming modes.nvim update (#274)
[modes.nvim](https://github.com/mvllow/modes.nvim) is about to
incorporate replace mode.
2024-06-09 10:48:51 -05:00
abvee
511e82e272 Added ["@float"] to default_highlights (#272) (#273) 2024-05-25 21:52:38 -05:00
not
f67828be44 Revert "feat: new themes for lualine (#267)" (#269)
This reverts commit cbc2064f4c.
2024-05-14 09:42:41 -05:00
PRIZ ;]
cbc2064f4c feat: new themes for lualine (#267) 2024-05-10 12:22:41 -05:00
Hayden Rouille
c8477ee978 For transparency, remove BG for buffers and gray out the text (#265) 2024-04-18 09:48:05 -05:00
not
8d9c83d145 format (#264) 2024-04-09 13:00:32 -05:00
Dhruvin Shah
465b7dc623 feat: adding vim-illuminate highlights (#262) 2024-04-09 12:57:04 -05:00
Adam K
e4c22a9163 fix(python): import semantic_tokens from basedpyright (#257)
* fix(python): import semantic_tokens from basedpyright

* fix: restores svelte string highlights
2024-04-09 12:56:29 -05:00
Dave Greene
01dc90af2f Fixed enum use vs magic string (#261) 2024-03-29 22:39:26 -05:00
Julius Rüberg
63f4613365 feat: add highlights for nvim-treesitter-context (#260) 2024-03-29 19:51:22 -05:00
not
1f22d4e97e feat: add mini.diff (#259) 2024-03-28 19:32:00 -05:00
Jaehwang Jung
a959c73910 fix: clear autocmd when changing colorscheme (#254) 2024-03-23 13:53:11 -05:00
not
3dbb8a99bd feat: highlight lsp variable constant (#246)
Closes #245
2024-03-19 18:51:46 -05:00
James Knight
e901a53e41 feat: add mini.statusline highlights (#250) 2024-03-15 12:08:52 -05:00
Andrew
c8e97915d1 feat: add highlight groups for folke/trouble.nvim (#248) 2024-03-05 08:47:17 -06:00
Fitrah
12ace889a0 fix(migrate): avoid ternary 'falls through' state (#242)
See: https://riptutorial.com/lua/example/26503/emulating-ternary-operator-with--and---or--logical-operators-#undefined
2024-02-14 09:58:18 -06:00
not
e28cda232b feat: prioritise semantic variable highlighting (#240) 2024-02-11 20:11:47 -06:00
not
ea3f15ca95 fix: markdown delimiter (#238) 2024-02-08 13:44:50 -06:00
not
4372c4eb49 feat: improve markdown syntax (#237)
* types: update highlight type

* feat: improve markdown highlighting
2024-02-08 13:42:03 -06:00
Maxim Kozhukh
95e9767165 feat: use treesitter highlights for @lsp.type.variable (#233) 2024-01-29 09:57:21 -06:00
Lin Tinusgrag
9d0e1b70d9 feat: make markdown headings distinguishable with treesitter (#232) 2024-01-29 09:54:19 -06:00
Maxim Kozhukh
75d145fa08 fix: unable to override linked groups (#230) 2024-01-29 09:48:02 -06:00
Eric Milford
4452ecd140 feat: Add support for Neotest (#225)
https://github.com/nvim-neotest/neotest/
2024-01-27 21:02:37 -06:00
not
0b77ef0e7b chore: update variable highlights (#226) 2024-01-27 20:34:00 -06:00
Wahyu Wiyoko
8514c638bc fix: misspelled highlight group name (#223) 2024-01-27 09:43:15 -06:00
not
e62a61166e fix: regression in options (#221)
* fix: headings not migrating to flat options

* fix: invalid key when using inherit
2024-01-26 21:43:53 -06:00
not
7ed74e3f24 feat: add new treesitter highlights (#217)
* feat: add WinBar and WinBarNC

* feat: add new treesitter highlight groups

* perf: parse necessary values upfront

This commit no longer parses each highlight group, but rather user
config values only.

* fix: titles are no longer dynamically coloured

Closes #216 #218 #219
2024-01-26 14:12:54 -06:00
not
f4d51d67ee feat: add mini.clue and mini.pick (#215) 2024-01-18 10:28:16 -06:00
not
aa74893a06 fix: unlink TabLine from StatusLine (#214) 2024-01-16 08:31:18 -06:00
atinylittleshell
1ffdf27819 feat(transparency): remove lualine background (#212) 2024-01-14 21:28:49 -06:00
not
e0674e5e5c feat: support folke/flash.nvim (#211) 2024-01-12 20:46:04 -06:00
Robin Gruyters
79e0d756b9 chore: update highlights for indent-blanklines (#210) 2024-01-12 20:39:12 -06:00
not
46044020c6 feat: improve neogit support (#209)
* feat: improve neogit support

* add change copied
2024-01-09 15:44:36 -06:00
not
1edcf47562 fix: mismatched WinSeparator background (#208)
* fix: mismatched WinSeparator background

* feat: use border group for bolded vert split

* fix: Pmenu fg typo
2024-01-08 09:43:57 -06:00
not
188190f285 revert: improve palette contrast (#207)
This commit restores the official palette colours. A future update will
address contrast.
2024-01-08 09:27:46 -06:00
not
bfa2d2b2fb feat(transparency): remove more backgrounds (#205)
* feat(transparency): remove border background

* chore(transparency): remove telescope selection caret background
2024-01-07 23:41:02 -06:00
not
2c892088f9 fix: transparency not affecting Normal background (#204) 2024-01-07 19:27:50 -06:00
not
76b6d830f6 feat!: enable extend_background_behind_borders by default (#201) 2024-01-07 17:55:48 -06:00
not
82285ba9f1 fix: none palette value (#200) 2024-01-07 17:35:36 -06:00
not
86fa83761e feat: re-add inherit option for custom highlight groups (#198) 2024-01-07 15:39:30 -06:00
not
29477a109a feat!: add new options with better support for transparency (#185)
This commit adds a few new options and improves transparency support.

Enable transparency styles:

```lua
styles = { transparency = true }
```

Feedback is appreciated!
2024-01-07 13:42:09 -06:00
mortezadadgar
84a88f68e1 Add support for fzf-lua (#194)
In a attempt make it more like telescope colors.
2024-01-07 13:14:25 -06:00
not
c48de5d8f8 Update readme.md (#181) 2023-10-25 14:43:34 -05:00
not
8f37719a51 docs: fix readme typo (#179) 2023-07-28 23:04:08 +02:00
not
bca840fc90 docs: update installation (#178) 2023-07-28 23:03:23 +02:00
Tobias Sommer
70c641a0b7 docs: add inherit option (#175)
* Remove the option, which is not longer implemented
* Add an example for the inherit highlight config
2023-07-22 16:31:03 +02:00
Asthestarsfalll
eb4c5591c7 feat: color for flash (#174) 2023-07-21 10:09:29 +02:00
Niamh Ferns
805a183dde feat!: custom user highlight groups are merged with Rosé Pine defaults (#171)
Configuring `highlight_groups` now merge by default. For example, to add italics without changing the colour:

```diff
- Keyword = { fg = "pine", italic = true }
+ Keyword = { italic = true }
```

Opt out of this behaviour via `inherit = false`.
2023-07-15 17:04:58 +02:00
not
c552fcadac feat: update tag and includes for consistency with semantic tokens (#168) 2023-06-21 16:34:13 +02:00
not
3b3ca9ebb9 feat: change @method from iris to rose (#167)
Closes #164
2023-06-21 15:37:44 +02:00
Pedro Cattori
4e0e82b3af feat: colors for hop (#165) 2023-06-19 19:48:24 +02:00
Pedro Cattori
838b33cdc4 feat: colors for neo-tree (#166) 2023-06-19 19:48:02 +02:00
Sebastian Wiegandt
9ecd30d749 Improve Treesitter heading highlighting for Markdown (#163) 2023-06-10 23:56:22 +02:00
mvllow
ab6ab41da0 chore: clean up types and setup logic 2023-06-07 00:14:45 +02:00
mvllow
0fb313c3c5 fix: reset palette when switching colorschemes 2023-05-28 17:25:09 +02:00
not
eb057bd6dd Update bug_report.yml (#157) 2023-04-30 16:27:50 -05:00
not
75bb6e5a6d Update bug_report.yml 2023-04-27 12:23:40 -05:00
not
89bcc4b197 Update bug_report.yml 2023-04-27 12:22:09 -05:00
Fitrah
9cb8497413 fix: reset @lsp.type.comment (#155) 2023-04-18 11:29:36 -05:00
Егор Мартынов
15eeca1d44 fix(indent-blankline): fix italic indent lines (#154) 2023-04-12 18:02:24 -05:00
not
adc339c315 docs: remove empty setup function (#151) 2023-03-30 17:04:49 -05:00
not
196cb4cb06 chore: update config types (#150) 2023-03-30 13:00:32 -05:00
mvllow
8b63bcd142 feat: update bufferline selected tab
Ref #149
2023-03-30 12:23:39 -05:00
mvllow
3044a86a2c Merge branch 'main' of github.com:rose-pine/neovim 2023-03-23 14:03:19 -05:00
mvllow
88dfcf9e8a feat: match editor background for GitSigns* gutter 2023-03-23 14:02:37 -05:00
Егор Мартынов
3eb035f569 feat: add lsp injected highlights (#148) 2023-03-23 08:17:32 -05:00
22 changed files with 1907 additions and 1086 deletions

View file

@ -15,30 +15,14 @@ body:
required: true
- type: input
attributes:
label: "Terminal"
placeholder: "Kitty"
label: "Terminal / multiplexer"
placeholder: "Kitty / tmux"
validations:
required: true
- type: textarea
attributes:
label: Describe the bug
description: A clear and concise description of what the bug is. Please include any related errors you see in Neovim.
validations:
required: true
- type: textarea
attributes:
label: Steps To Reproduce
description: Steps to reproduce the behavior.
placeholder: |
1.
2.
3.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A concise description of what you expected to happen.
description: A clear and concise description of what the bug is. Please include screenshots if possible and any related errors you see in Neovim.
validations:
required: true
- type: textarea
@ -46,36 +30,25 @@ body:
label: Repro
description: Minimal `init.lua` to reproduce this issue. Save as `repro.lua` and run with `nvim -u repro.lua`
value: |
-- DO NOT change the paths and do not remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
vim.o.packpath = "/tmp/nvim/site"
-- Set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- Bootstrap lazy.nvim
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath, })
end
vim.opt.runtimepath:prepend(lazypath)
-- Install plugins
local plugins = {
"rose-pine/neovim",
name = "rose-pine",
config = function()
-- Add relevant Rosé Pine config below
require("rose-pine").setup({})
end
rose_pine = "https://github.com/rose-pine/neovim",
-- ADD OTHER PLUGINS _NECESSARY_ TO REPRODUCE THE ISSUE
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
for name, url in pairs(plugins) do
local install_path = "/tmp/nvim/site/pack/test/start/" .. name
if vim.fn.isdirectory(install_path) == 0 then
vim.fn.system({ "git", "clone", "--depth=1", url, install_path })
end
end
require("rose-pine").setup({
-- ADD ROSÉ PINE CONFIG THAT IS _NECESSARY_ TO REPRODUCE THE ISSUE
})
vim.cmd.colorscheme("rose-pine")
-- Add anything else here
vim.cmd("colorscheme rose-pine")
render: Lua
validations:
required: false

View file

@ -3,24 +3,12 @@ description: Suggest a new feature
title: "feature: "
labels: [enhancement]
body:
- type: textarea
validations:
required: true
attributes:
label: Is your feature request related to a problem? Please describe.
description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
- type: textarea
validations:
required: true
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
- type: textarea
validations:
required: true
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
- type: textarea
validations:
required: false

View file

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

82
changelog.md Normal file
View file

@ -0,0 +1,82 @@
# Changelog
## v2.0.0-next.1
### What's new
- Add proper support for `StatusLineTerm` & `StatusLineTermNC`, controlled via `enable.terminal`
- Add background glow to diagnostic virtual text
- Add `extend_background_behind_borders`
- Add `styles.bold` and alternatively styling when disabled
- Add `before_highlight` hook to allow changing palette values and behaviours
- Increase contrast of search, visual selections, and more
### Features
**extend_background_behind_borders**
Extend float backgrounds behind borders. Results vary depending on your border characters.
```lua
{
extend_background_behind_borders = true
}
```
**styles.transparency**
Enable a unique experience focused around transparent terminals, avoiding large backgrounds and differentiating selections with foreground colours when possible.
```lua
{
styles = {
transparency = true
}
}
```
**before_highlight**
```lua
{
before_highlight = function(group, highlight, palette)
-- Disable all undercurls
if highlight.undercurl then
highlight.undercurl = false
end
-- Change palette colour
if highlight.fg == palette.pine then
highlight.fg = palette.foam
end
end,
}
```
### Breaking changes
> [!WARNING]
> Removed or renamed options should continue to work via internal migrations but backwards compatibility is not tested and may break at any time.
```diff
- dim_nc_background = true,
+ dim_inactive_windows = true,
- disable_background = true,
- disable_float_background = true,
+ styles.transparency = true
- disable_italics = true,
+ styles.italic = false,
- groups = {
- background = "...",
- comment = "...",
- punctuation = "...",
- },
+ highlight_groups = {
+ Normal = { bg = "..." },
+ Comment = { fg = "..." },
+ ["@punctuation"] = { fg = "..." },
+ }
```

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,34 +1,40 @@
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 {
normal = {
a = { bg = p.rose, fg = p.base, gui = 'bold' },
a = { bg = p.rose, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.rose },
c = { bg = p.base, fg = p.text },
c = { bg = bg_base, fg = p.text },
},
insert = {
a = { bg = p.foam, fg = p.base, gui = 'bold' },
a = { bg = p.foam, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.foam },
c = { bg = p.base, fg = p.text },
c = { bg = bg_base, fg = p.text },
},
visual = {
a = { bg = p.iris, fg = p.base, gui = 'bold' },
a = { bg = p.iris, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.iris },
c = { bg = p.base, fg = p.text },
c = { bg = bg_base, fg = p.text },
},
replace = {
a = { bg = p.pine, fg = p.base, gui = 'bold' },
a = { bg = p.pine, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.pine },
c = { bg = p.base, fg = p.text },
c = { bg = bg_base, fg = p.text },
},
command = {
a = { bg = p.love, fg = p.base, gui = 'bold' },
a = { bg = p.love, fg = p.base, gui = "bold" },
b = { bg = p.overlay, fg = p.love },
c = { bg = p.base, fg = p.text },
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 },
},
}

File diff suppressed because it is too large Load diff

View file

@ -1,104 +1,176 @@
local M = {}
---@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 }
---@class Groups
---@field background string
---@field background_nc string
---@field panel string
---@field panel_nc string
---@field border string
---@field comment string
---@field link string
---@field punctuation string
---@field error string
---@field hint string
---@field info string
---@field warn string
---@field git_add string
---@field git_change string
---@field git_delete string
---@field git_dirty string
---@field git_ignore string
---@field git_merge string
---@field git_rename string
---@field git_stage string
---@field git_text string
---@field headings Headings|string
local config = {}
---@class Headings
---@field h1 string
---@field h2 string
---@field h3 string
---@field h4 string
---@field h5 string
---@field h6 string
---@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",
---@class Config
---@field variant 'auto'|'main'|'moon'|'dawn'
---@field dark_variant 'main'|'moon'|'dawn'
---@field bold_vert_split boolean
---@field dim_nc_background boolean
---@field disable_background boolean
---@field disable_float_background boolean
---@field disable_italics boolean
---@field groups Groups
---@field highlight_groups table<string, any>
local defaults = {
variant = 'auto',
dark_variant = 'main',
bold_vert_split = false,
dim_nc_background = false,
disable_background = false,
disable_float_background = false,
disable_italics = false,
---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 = {},
groups = {
background = 'base',
background_nc = '_experimental_nc',
panel = 'surface',
panel_nc = 'base',
border = 'highlight_med',
comment = 'muted',
link = 'iris',
punctuation = 'muted',
error = 'love',
hint = 'iris',
info = 'foam',
warn = 'gold',
git_add = 'foam',
git_change = 'rose',
git_delete = 'love',
git_dirty = 'rose',
git_ignore = 'muted',
git_merge = 'iris',
git_rename = 'pine',
git_stage = 'iris',
git_text = 'rose',
headings = {
h1 = 'iris',
h2 = 'foam',
h3 = 'rose',
h4 = 'gold',
h5 = 'pine',
h6 = 'foam',
},
},
---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
}
---@type Config
M.options = {}
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
---@param options Config|nil
function M.setup(options)
M.options = vim.tbl_deep_extend('force', {}, defaults, options or {})
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 Config|nil
function M.extend(options)
M.options =
vim.tbl_deep_extend('force', {}, M.options or defaults, options or {})
---@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
M.setup()
return M
return config

View file

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

View file

@ -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')
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>',
-- },
-- tab_selected = {
-- 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,
-- },

View file

@ -2,9 +2,9 @@
--- 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')
local p = require("rose-pine.palette")
return {
bg = p.surface,

View file

@ -2,9 +2,9 @@
--- 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')
local p = require("rose-pine.palette")
return { p.foam, p.rose, p.iris }

View 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 }
}

View file

@ -2,14 +2,14 @@
--- 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' },
NormalFloat = { link = 'Normal' },
FloatBorder = { link = 'FloatBorder' },
SignColumn = { link = 'SignColumn' },
StatusLine = { link = 'StatusLine' },
StatusLineNC = { link = 'StatusLineNC' },
Normal = { link = "Normal" },
NormalFloat = { link = "Normal" },
FloatBorder = { link = "FloatBorder" },
SignColumn = { link = "SignColumn" },
StatusLine = { link = "StatusLine" },
StatusLineNC = { link = "StatusLineNC" },
}

View file

@ -1,574 +0,0 @@
local M = {}
---@param options Config
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
h('ColorColumn', { bg = p.overlay })
h('Conceal', { bg = p.none })
h('CurSearch', { link = 'IncSearch' })
h('Cursor', { fg = p.text, bg = p.highlight_high })
h('CursorColumn', { bg = p.highlight_low })
-- CursorIM = {},
h('CursorLine', { bg = p.highlight_low })
h('CursorLineNr', { fg = p.text })
h('DarkenedPanel', { bg = maybe.surface })
h('DarkenedStatusline', { bg = maybe.surface })
h('DiffAdd', { bg = groups.git_add, blend = 20 })
h('DiffChange', { bg = p.overlay })
h('DiffDelete', { bg = groups.git_delete, blend = 20 })
h('DiffText', { bg = groups.git_text, blend = 20 })
h('diffAdded', { link = 'DiffAdd' })
h('diffChanged', { link = 'DiffChange' })
h('diffRemoved', { link = 'DiffDelete' })
h('Directory', { fg = p.foam, bg = p.none })
-- EndOfBuffer = {},
h('ErrorMsg', { fg = p.love, bold = true })
h('FloatBorder', { fg = groups.border, bg = maybe.surface })
h('FloatTitle', { fg = p.muted })
h('FoldColumn', { fg = p.muted })
h('Folded', { fg = p.text, bg = maybe.surface })
h('IncSearch', { fg = groups.background, bg = p.rose })
h('LineNr', { fg = p.muted })
h('MatchParen', { fg = p.text, bg = p.highlight_med })
h('ModeMsg', { fg = p.subtle })
h('MoreMsg', { fg = p.iris })
h('NonText', { fg = p.muted })
h('Normal', { fg = p.text, bg = maybe.base })
h('NormalFloat', { fg = p.text, bg = maybe.surface })
h('NormalNC', { fg = p.text, bg = maybe.dim_nc_background })
h('NvimInternalError', { fg = '#ffffff', bg = p.love })
h('Pmenu', { fg = p.subtle, bg = maybe.surface })
h('PmenuSbar', { bg = p.highlight_low })
h('PmenuSel', { fg = p.text, bg = p.overlay })
h('PmenuThumb', { bg = p.highlight_med })
h('Question', { fg = p.gold })
-- QuickFixLine = {},
-- RedrawDebugNormal = {}
h('RedrawDebugClear', { fg = '#ffffff', bg = p.gold })
h('RedrawDebugComposed', { fg = '#ffffff', bg = p.pine })
h('RedrawDebugRecompose', { fg = '#ffffff', bg = p.love })
h('Search', { bg = p.highlight_med })
h('SpecialKey', { fg = p.foam })
h('SpellBad', { sp = p.subtle, undercurl = true })
h('SpellCap', { sp = p.subtle, undercurl = true })
h('SpellLocal', { sp = p.subtle, undercurl = true })
h('SpellRare', { sp = p.subtle, undercurl = true })
h('SignColumn', {
fg = p.text,
bg = (options.dim_nc_background and p.none) or maybe.base,
})
h('StatusLine', { fg = p.subtle, bg = groups.panel })
h('StatusLineNC', { fg = p.muted, bg = groups.panel_nc })
h('StatusLineTerm', { link = 'StatusLine' })
h('StatusLineTermNC', { link = 'StatusLineNC' })
h('TabLine', { fg = p.subtle, bg = groups.panel })
h('TabLineFill', { bg = groups.panel })
h('TabLineSel', { fg = p.text, bg = p.overlay })
h('Title', { fg = p.text })
h('VertSplit', { fg = groups.border, bg = maybe.bold_vert_split })
h('Visual', { bg = p.highlight_med })
-- VisualNOS = {},
h('WarningMsg', { fg = p.gold })
-- Whitespace = {},
h('WildMenu', { link = 'IncSearch' })
h('Boolean', { fg = p.rose })
h('Character', { fg = p.gold })
h('Comment', { fg = groups.comment, italic = maybe.italic })
h('Conditional', { fg = p.pine })
h('Constant', { fg = p.gold })
h('Debug', { fg = p.rose })
h('Define', { fg = p.iris })
h('Delimiter', { fg = p.subtle })
h('Error', { fg = p.love })
h('Exception', { fg = p.pine })
h('Float', { fg = p.gold })
h('Function', { fg = p.rose })
h('Identifier', { fg = p.rose })
-- Ignore = {},
h('Include', { fg = p.iris })
h('Keyword', { fg = p.pine })
h('Label', { fg = p.foam })
h('Macro', { fg = p.iris })
h('Number', { fg = p.gold })
h('Operator', { fg = p.subtle })
h('PreCondit', { fg = p.iris })
h('PreProc', { fg = p.iris })
h('Repeat', { fg = p.pine })
h('Special', { fg = p.rose })
h('SpecialChar', { fg = p.rose })
h('SpecialComment', { fg = p.iris })
h('Statement', { fg = p.pine })
h('StorageClass', { fg = p.foam })
h('String', { fg = p.gold })
h('Structure', { fg = p.foam })
h('Tag', { fg = p.rose })
h('Todo', { fg = p.iris })
h('Type', { fg = p.foam })
h('Typedef', { link = 'Type' })
h('Underlined', { underline = true })
h('htmlArg', { fg = p.iris })
h('htmlBold', { bold = true })
h('htmlEndTag', { fg = p.subtle })
h('htmlH1', { fg = groups.headings.h1, bold = true })
h('htmlH2', { fg = groups.headings.h2, bold = true })
h('htmlH3', { fg = groups.headings.h3, bold = true })
h('htmlH4', { fg = groups.headings.h4, bold = true })
h('htmlH5', { fg = groups.headings.h5, bold = true })
h('htmlItalic', { italic = maybe.italic })
h('htmlLink', { fg = groups.link })
h('htmlTag', { fg = p.subtle })
h('htmlTagN', { fg = p.text })
h('htmlTagName', { fg = p.foam })
h('markdownDelimiter', { fg = p.subtle })
h('markdownH1', { fg = groups.headings.h1, bold = true })
h('markdownH1Delimiter', { link = 'markdownH1' })
h('markdownH2', { fg = groups.headings.h2, bold = true })
h('markdownH2Delimiter', { link = 'markdownH2' })
h('markdownH3', { fg = groups.headings.h3, bold = true })
h('markdownH3Delimiter', { link = 'markdownH3' })
h('markdownH4', { fg = groups.headings.h4, bold = true })
h('markdownH4Delimiter', { link = 'markdownH4' })
h('markdownH5', { fg = groups.headings.h5, bold = true })
h('markdownH5Delimiter', { link = 'markdownH5' })
h('markdownH6', { fg = groups.headings.h6, bold = true })
h('markdownH6Delimiter', { link = 'markdownH6' })
h(
'markdownLinkText',
{ fg = groups.link, sp = groups.link, underline = true }
)
h('markdownUrl', { link = 'markdownLinkText' })
h('mkdCode', { fg = p.foam, italic = maybe.italic })
h('mkdCodeDelimiter', { fg = p.rose })
h('mkdCodeEnd', { fg = p.foam })
h('mkdCodeStart', { fg = p.foam })
h('mkdFootnotes', { fg = p.foam })
h('mkdID', { fg = p.foam, underline = true })
h('mkdInlineURL', { fg = groups.link, underline = true })
h('mkdLink', { link = 'mkdInlineURL' })
h('mkdLinkDef', { link = 'mkdInlineURL' })
h('mkdListItemLine', { fg = p.text })
h('mkdRule', { fg = p.subtle })
h('mkdURL', { link = 'mkdInlineURL' })
h('DiagnosticError', { fg = groups.error })
h('DiagnosticHint', { fg = groups.hint })
h('DiagnosticInfo', { fg = groups.info })
h('DiagnosticWarn', { fg = groups.warn })
h('DiagnosticDefaultError', { fg = groups.error })
h('DiagnosticDefaultHint', { fg = groups.hint })
h('DiagnosticDefaultInfo', { fg = groups.info })
h('DiagnosticDefaultWarn', { fg = groups.warn })
h('DiagnosticFloatingError', { fg = groups.error })
h('DiagnosticFloatingHint', { fg = groups.hint })
h('DiagnosticFloatingInfo', { fg = groups.info })
h('DiagnosticFloatingWarn', { fg = groups.warn })
h('DiagnosticSignError', { fg = groups.error })
h('DiagnosticSignHint', { fg = groups.hint })
h('DiagnosticSignInfo', { fg = groups.info })
h('DiagnosticSignWarn', { fg = groups.warn })
h('DiagnosticStatusLineError', { fg = groups.error, bg = groups.panel })
h('DiagnosticStatusLineHint', { fg = groups.hint, bg = groups.panel })
h('DiagnosticStatusLineInfo', { fg = groups.info, bg = groups.panel })
h('DiagnosticStatusLineWarn', { fg = groups.warn, bg = groups.panel })
h('DiagnosticUnderlineError', { sp = groups.error, undercurl = true })
h('DiagnosticUnderlineHint', { sp = groups.hint, undercurl = true })
h('DiagnosticUnderlineInfo', { sp = groups.info, undercurl = true })
h('DiagnosticUnderlineWarn', { sp = groups.warn, undercurl = true })
h('DiagnosticVirtualTextError', { fg = groups.error })
h('DiagnosticVirtualTextHint', { fg = groups.hint })
h('DiagnosticVirtualTextInfo', { fg = groups.info })
h('DiagnosticVirtualTextWarn', { fg = groups.warn })
-- healthcheck
h('healthError', { fg = groups.error })
h('healthSuccess', { fg = groups.info })
h('healthWarning', { fg = groups.warn })
-- Treesitter
h('@boolean', { link = 'Boolean' })
h('@character', { link = 'Character' })
h('@character.special', { link = '@character' })
h('@class', { fg = p.foam })
h('@comment', { link = 'Comment' })
h('@conditional', { link = 'Conditional' })
h('@constant', { link = 'Constant' })
h('@constant.builtin', { fg = p.love })
h('@constant.macro', { link = '@constant' })
h('@constructor', { fg = p.foam })
h('@field', { fg = p.foam })
h('@function', { link = 'Function' })
h('@function.builtin', { fg = p.love })
h('@function.macro', { link = '@function' })
h('@include', { link = 'Include' })
h('@interface', { fg = p.foam })
h('@keyword', { link = 'Keyword' })
h('@keyword.operator', { fg = p.subtle })
h('@label', { link = 'Label' })
h('@macro', { link = 'Macro' })
h('@method', { fg = p.iris })
h('@number', { link = 'Number' })
h('@operator', { link = 'Operator' })
h('@parameter', { fg = p.iris, italic = maybe.italic })
h('@preproc', { link = 'PreProc' })
h('@property', { fg = p.foam, italic = maybe.italic })
h('@punctuation', { fg = groups.punctuation })
h('@punctuation.bracket', { link = '@punctuation' })
h('@punctuation.delimiter', { link = '@punctuation' })
h('@punctuation.special', { link = '@punctuation' })
h('@regexp', { link = 'String' })
h('@repeat', { link = 'Repeat' })
h('@storageclass', { link = 'StorageClass' })
h('@string', { link = 'String' })
h('@string.escape', { fg = p.pine })
h('@string.special', { link = '@string' })
h('@symbol', { link = 'Identifier' })
h('@tag', { link = 'Tag' })
h('@tag.attribute', { fg = p.iris })
h('@tag.delimiter', { fg = p.subtle })
h('@text', { fg = p.text })
h('@text.strong', { bold = true })
h('@text.emphasis', { italic = true })
h('@text.underline', { underline = true })
h('@text.strike', { strikethrough = true })
h('@text.math', { link = 'Special' })
h('@text.environment', { link = 'Macro' })
h('@text.environment.name', { link = 'Type' })
h('@text.title', { link = 'Title' })
h('@text.uri', { fg = groups.link })
h('@text.note', { link = 'SpecialComment' })
h('@text.warning', { fg = groups.warn })
h('@text.danger', { fg = groups.error })
h('@todo', { link = 'Todo' })
h('@type', { link = 'Type' })
h('@variable', { fg = p.text, italic = maybe.italic })
h('@variable.builtin', { fg = p.love })
h('@namespace', { link = '@include' })
-- LSP Semantic Token Groups
h('@lsp.type.enum', { link = '@type' })
h('@lsp.type.keyword', { link = '@keyword' })
h('@lsp.type.interface', { link = '@interface' })
h('@lsp.type.namespace', { link = '@namespace' })
h('@lsp.type.parameter', { link = '@parameter' })
h('@lsp.type.property', { link = '@property' })
h('@lsp.type.variable', {}) -- use treesitter styles for regular variables
h('@lsp.typemod.function.defaultLibrary', { link = 'Special' })
h('@lsp.typemod.variable.defaultLibrary', { link = '@variable.builtin' })
-- vim.lsp.buf.document_highlight()
h('LspReferenceText', { bg = p.highlight_med })
h('LspReferenceRead', { bg = p.highlight_med })
h('LspReferenceWrite', { bg = p.highlight_med })
-- lsp-highlight-codelens
h('LspCodeLens', { fg = p.subtle }) -- virtual text of code len
h('LspCodeLensSeparator', { fg = p.highlight_high }) -- separator between two or more code len
-- romgrk/barbar.nvim
h('BufferCurrent', { fg = p.text, bg = p.overlay })
h('BufferCurrentIndex', { fg = p.text, bg = p.overlay })
h('BufferCurrentMod', { fg = p.foam, bg = p.overlay })
h('BufferCurrentSign', { fg = p.subtle, bg = p.overlay })
h('BufferCurrentTarget', { fg = p.gold, bg = p.overlay })
h('BufferInactive', { fg = p.subtle })
h('BufferInactiveIndex', { fg = p.subtle })
h('BufferInactiveMod', { fg = p.foam })
h('BufferInactiveSign', { fg = p.muted })
h('BufferInactiveTarget', { fg = p.gold })
h('BufferTabpageFill', { fg = groups.background, bg = groups.background })
h('BufferVisible', { fg = p.subtle })
h('BufferVisibleIndex', { fg = p.subtle })
h('BufferVisibleMod', { fg = p.foam })
h('BufferVisibleSign', { fg = p.muted })
h('BufferVisibleTarget', { fg = p.gold })
-- lewis6991/gitsigns.nvim
h('GitSignsAdd', { fg = groups.git_add })
h('GitSignsChange', { fg = groups.git_change })
h('GitSignsDelete', { fg = groups.git_delete })
h('SignAdd', { link = 'GitSignsAdd' })
h('SignChange', { link = 'GitSignsChange' })
h('SignDelete', { link = 'GitSignsDelete' })
-- mvllow/modes.nvim
h('ModesCopy', { bg = p.gold })
h('ModesDelete', { bg = p.love })
h('ModesInsert', { bg = p.foam })
h('ModesVisual', { bg = p.iris })
-- kyazdani42/nvim-tree.lua
h('NvimTreeEmptyFolderName', { fg = p.muted })
h('NvimTreeFileDeleted', { fg = p.love })
h('NvimTreeFileDirty', { fg = p.rose })
h('NvimTreeFileMerge', { fg = p.iris })
h('NvimTreeFileNew', { fg = p.foam })
h('NvimTreeFileRenamed', { fg = p.pine })
h('NvimTreeFileStaged', { fg = p.iris })
h('NvimTreeFolderIcon', { fg = p.subtle })
h('NvimTreeFolderName', { fg = p.foam })
h('NvimTreeGitDeleted', { fg = groups.git_delete })
h('NvimTreeGitDirty', { fg = groups.git_dirty })
h('NvimTreeGitIgnored', { fg = groups.git_ignore })
h('NvimTreeGitMerge', { fg = groups.git_merge })
h('NvimTreeGitNew', { fg = groups.git_add })
h('NvimTreeGitRenamed', { fg = groups.git_rename })
h('NvimTreeGitStaged', { fg = groups.git_stage })
h('NvimTreeImageFile', { fg = p.text })
h('NvimTreeNormal', { fg = p.text })
h('NvimTreeOpenedFile', { fg = p.text, bg = p.highlight_med })
h('NvimTreeOpenedFolderName', { link = 'NvimTreeFolderName' })
h('NvimTreeRootFolder', { fg = p.iris })
h('NvimTreeSpecialFile', { link = 'NvimTreeNormal' })
h('NvimTreeWindowPicker', { fg = p.love, bg = p.love, blend = 10 })
-- nvim-neo-tree/neo-tree.nvim
h('NeoTreeTitleBar', { fg = p.surface, bg = p.pine })
-- folke/which-key.nvim
h('WhichKey', { fg = p.iris })
h('WhichKeyGroup', { fg = p.foam })
h('WhichKeySeparator', { fg = p.subtle })
h('WhichKeyDesc', { fg = p.gold })
h('WhichKeyFloat', { bg = maybe.surface })
h('WhichKeyValue', { fg = p.rose })
-- luka-reineke/indent-blankline.nvim
h('IndentBlanklineChar', { fg = p.muted })
h('IndentBlanklineSpaceChar', { fg = p.muted })
h('IndentBlanklineSpaceCharBlankline', { fg = p.muted })
-- hrsh7th/nvim-cmp
h('CmpItemAbbr', { fg = p.subtle })
h('CmpItemAbbrDeprecated', { fg = p.subtle, strikethrough = true })
h('CmpItemAbbrMatch', { fg = p.text, bold = true })
h('CmpItemAbbrMatchFuzzy', { fg = p.text, bold = true })
h('CmpItemKind', { fg = p.subtle })
h('CmpItemKindClass', { fg = p.pine })
h('CmpItemKindFunction', { fg = p.rose })
h('CmpItemKindInterface', { fg = p.foam })
h('CmpItemKindMethod', { fg = p.iris })
h('CmpItemKindSnippet', { fg = p.gold })
h('CmpItemKindVariable', { fg = p.text })
-- TimUntersberger/neogit
h('NeogitDiffAddHighlight', { fg = p.foam, bg = p.highlight_med })
h('NeogitDiffContextHighlight', { bg = p.highlight_low })
h('NeogitDiffDeleteHighlight', { fg = p.love, bg = p.highlight_med })
h('NeogitHunkHeader', { bg = p.highlight_low })
h('NeogitHunkHeaderHighlight', { bg = p.highlight_low })
-- vimwiki/vimwiki
h('VimwikiHR', { fg = p.subtle })
h('VimwikiHeader1', { fg = groups.headings.h1, bold = true })
h('VimwikiHeader2', { fg = groups.headings.h2, bold = true })
h('VimwikiHeader3', { fg = groups.headings.h3, bold = true })
h('VimwikiHeader4', { fg = groups.headings.h4, bold = true })
h('VimwikiHeader5', { fg = groups.headings.h5, bold = true })
h('VimwikiHeader6', { fg = groups.headings.h6, bold = true })
h('VimwikiHeaderChar', { fg = p.pine })
h('VimwikiLink', { fg = groups.link, underline = true })
h('VimwikiList', { fg = p.iris })
h('VimwikiNoExistsLink', { fg = p.love })
-- nvim-neorg/neorg
h('NeorgHeading1Prefix', { fg = groups.headings.h1, bold = true })
h('NeorgHeading1Title', { link = 'NeorgHeading1Prefix' })
h('NeorgHeading2Prefix', { fg = groups.headings.h2, bold = true })
h('NeorgHeading2Title', { link = 'NeorgHeading2Prefix' })
h('NeorgHeading3Prefix', { fg = groups.headings.h3, bold = true })
h('NeorgHeading3Title', { link = 'NeorgHeading3Prefix' })
h('NeorgHeading4Prefix', { fg = groups.headings.h4, bold = true })
h('NeorgHeading4Title', { link = 'NeorgHeading4Prefix' })
h('NeorgHeading5Prefix', { fg = groups.headings.h5, bold = true })
h('NeorgHeading5Title', { link = 'NeorgHeading5Prefix' })
h('NeorgHeading6Prefix', { fg = groups.headings.h6, bold = true })
h('NeorgHeading6Title', { link = 'NeorgHeading6Prefix' })
h('NeorgMarkerTitle', { fg = p.text, bold = true })
-- tami5/lspsaga.nvim (fork of glepnir/lspsaga.nvim)
h('DefinitionCount', { fg = p.rose })
h('DefinitionIcon', { fg = p.rose })
h('DefintionPreviewTitle', { fg = p.rose, bold = true })
h('LspFloatWinBorder', { fg = groups.border })
h('LspFloatWinNormal', { bg = maybe.surface })
h('LspSagaAutoPreview', { fg = p.subtle })
h('LspSagaCodeActionBorder', { fg = groups.border })
h('LspSagaCodeActionContent', { fg = p.foam })
h('LspSagaCodeActionTitle', { fg = p.gold, bold = true })
h('LspSagaCodeActionTruncateLine', { link = 'LspSagaCodeActionBorder' })
h('LspSagaDefPreviewBorder', { fg = groups.border })
h('LspSagaDiagnosticBorder', { fg = groups.border })
h('LspSagaDiagnosticHeader', { fg = p.gold, bold = true })
h('LspSagaDiagnosticTruncateLine', { link = 'LspSagaDiagnosticBorder' })
h('LspSagaDocTruncateLine', { link = 'LspSagaHoverBorder' })
h('LspSagaFinderSelection', { fg = p.gold })
h('LspSagaHoverBorder', { fg = groups.border })
h('LspSagaLspFinderBorder', { fg = groups.border })
h('LspSagaRenameBorder', { fg = p.pine })
h('LspSagaRenamePromptPrefix', { fg = p.love })
h('LspSagaShTruncateLine', { link = 'LspSagaSignatureHelpBorder' })
h('LspSagaSignatureHelpBorder', { fg = p.pine })
h('ReferencesCount', { fg = p.rose })
h('ReferencesIcon', { fg = p.rose })
h('SagaShadow', { bg = p.overlay })
h('TargetWord', { fg = p.iris })
-- ray-x/lsp_signature.nvim
h('LspSignatureActiveParameter', { bg = p.overlay })
-- rlane/pounce.nvim
h('PounceAccept', { fg = p.love, bg = p.highlight_high })
h('PounceAcceptBest', { fg = p.base, bg = p.gold })
h('PounceGap', { link = 'Search' })
h('PounceMatch', { link = 'Search' })
local float_background = options.dim_nc_background
and (options.disable_float_background and groups.panel_nc or groups.panel)
or maybe.surface
-- ggandor/leap.nvim
h('LeapMatch', { link = 'MatchParen' })
h('LeapLabelPrimary', { link = 'IncSearch' })
h('LeapLabelSecondary', { fg = p.base, bg = p.pine })
-- nvim-telescope/telescope.nvim
h('TelescopeBorder', { fg = groups.border, bg = float_background })
h('TelescopeMatching', { fg = p.rose })
h('TelescopeNormal', { fg = p.subtle, bg = float_background })
h('TelescopePromptNormal', { fg = p.text, bg = float_background })
h('TelescopePromptPrefix', { fg = p.subtle })
h('TelescopeSelection', { fg = p.text, bg = p.overlay })
h('TelescopeSelectionCaret', { fg = p.rose, bg = p.overlay })
h('TelescopeTitle', { fg = p.subtle })
-- rcarriga/nvim-notify
h('NotifyINFOBorder', { fg = p.foam })
h('NotifyINFOTitle', { link = 'NotifyINFOBorder' })
h('NotifyINFOIcon', { link = 'NotifyINFOBorder' })
h('NotifyWARNBorder', { fg = p.gold })
h('NotifyWARNTitle', { link = 'NotifyWARNBorder' })
h('NotifyWARNIcon', { link = 'NotifyWARNBorder' })
h('NotifyDEBUGBorder', { fg = p.muted })
h('NotifyDEBUGTitle', { link = 'NotifyDEBUGBorder' })
h('NotifyDEBUGIcon', { link = 'NotifyDEBUGBorder' })
h('NotifyTRACEBorder', { fg = p.iris })
h('NotifyTRACETitle', { link = 'NotifyTRACEBorder' })
h('NotifyTRACEIcon', { link = 'NotifyTRACEBorder' })
h('NotifyERRORBorder', { fg = p.love })
h('NotifyERRORTitle', { link = 'NotifyERRORBorder' })
h('NotifyERRORIcon', { link = 'NotifyERRORBorder' })
-- rcarriga/nvim-dap-ui
h('DapUIVariable', { link = 'Normal' })
h('DapUIValue', { link = 'Normal' })
h('DapUIFrameName', { link = 'Normal' })
h('DapUIThread', { fg = p.gold })
h('DapUIWatchesValue', { link = 'DapUIThread' })
h('DapUIBreakpointsInfo', { link = 'DapUIThread' })
h('DapUIBreakpointsCurrentLine', { fg = p.gold, bold = true })
h('DapUIWatchesEmpty', { fg = p.love })
h('DapUIWatchesError', { link = 'DapUIWatchesEmpty' })
h('DapUIBreakpointsDisabledLine', { fg = p.muted })
h('DapUISource', { fg = p.iris })
h('DapUIBreakpointsPath', { fg = p.foam })
h('DapUIScope', { link = 'DapUIBreakpointsPath' })
h('DapUILineNumber', { link = 'DapUIBreakpointsPath' })
h('DapUIBreakpointsLine', { link = 'DapUIBreakpointsPath' })
h('DapUIFloatBorder', { link = 'DapUIBreakpointsPath' })
h('DapUIStoppedThread', { link = 'DapUIBreakpointsPath' })
h('DapUIDecoration', { link = 'DapUIBreakpointsPath' })
h('DapUIModifiedValue', { fg = p.foam, bold = true })
-- glepnir/dashboard-nvim
h('DashboardShortcut', { fg = p.love })
h('DashboardHeader', { fg = p.pine })
h('DashboardCenter', { fg = p.gold })
h('DashboardFooter', { fg = p.iris })
-- SmiteshP/nvim-navic
h('NavicIconsFile', { fg = p.base })
h('NavicIconsModule', { fg = p.rose })
h('NavicIconsNamespace', { fg = p.base })
h('NavicIconsPackage', { fg = p.base })
h('NavicIconsClass', { fg = p.foam })
h('NavicIconsMethod', { fg = p.iris })
h('NavicIconsProperty', { fg = p.foam })
h('NavicIconsField', { fg = p.foam })
h('NavicIconsConstructor', { fg = p.gold })
h('NavicIconsEnum', { fg = p.gold })
h('NavicIconsInterface', { fg = p.foam })
h('NavicIconsFunction', { fg = p.pine })
h('NavicIconsVariable', { fg = p.text })
h('NavicIconsConstant', { fg = p.gold })
h('NavicIconsString', { fg = p.gold })
h('NavicIconsNumber', { fg = p.gold })
h('NavicIconsBoolean', { fg = p.rose })
h('NavicIconsArray', { fg = p.gold })
h('NavicIconsObject', { fg = p.gold })
h('NavicIconsKey', { fg = p.iris })
h('NavicIconsKeyword', { fg = p.pine })
h('NavicIconsNull', { fg = p.love })
h('NavicIconsEnumMember', { fg = p.foam })
h('NavicIconsStruct', { fg = p.foam })
h('NavicIconsEvent', { fg = p.gold })
h('NavicIconsOperator', { fg = p.subtle })
h('NavicIconsTypeParameter', { fg = p.foam })
h('NavicText', { fg = p.subtle })
h('NavicSeparator', { fg = p.subtle })
-- folke/noice.nvim
h('NoiceCursor', { fg = p.highlight_high, bg = p.text })
-- echasnovski/mini.indentscope
h('MiniIndentscopeSymbol', { fg = p.highlight_med })
h('MiniIndentscopeSymbolOff', { fg = p.highlight_med })
-- goolord/alpha-nvim
h('AlphaHeader', { fg = p.pine })
h('AlphaButtons', { fg = p.foam })
h('AlphaShortcut', { fg = p.rose })
h('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 user highlights
for group, color in pairs(options.highlight_groups) do
h(group, color)
end
end
return M

View file

@ -1,71 +0,0 @@
local util = {}
local function byte(value, offset)
return bit.band(bit.rshift(value, offset), 0xFF)
end
local function rgb(color)
color = vim.api.nvim_get_color_by_name(color)
if color == -1 then
color = vim.opt.background:get() == 'dark' and 000 or 255255255
end
return { byte(color, 16), byte(color, 8), byte(color, 0) }
end
local function parse_color(color)
if color == nil then
return print('invalid color')
end
color = color:lower()
if not color:find('#') and color ~= 'none' then
color = require('rose-pine.palette')[color]
or vim.api.nvim_get_color_by_name(color)
end
return color
end
---@param fg string foreground color
---@param bg string background color
---@param alpha number number between 0 (background) and 1 (foreground)
util.blend = function(fg, bg, alpha)
local fg_rgb = rgb(parse_color(fg))
local bg_rgb = rgb(parse_color(bg))
local function blend_channel(i)
local ret = (alpha * fg_rgb[i] + ((1 - alpha) * bg_rgb[i]))
return math.floor(math.min(math.max(0, ret), 255) + 0.5)
end
return string.format(
'#%02X%02X%02X',
blend_channel(1),
blend_channel(2),
blend_channel(3)
)
end
---@param group string
---@param color table<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

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

170
readme.md
View file

@ -11,27 +11,36 @@
</a>
</p>
## Usage
## Getting started
> With [lazy.nvim](https://github.com/folke/lazy.nvim)
Install `rose-pine/neovim` using your favourite package manager:
### [pam.nvim](https://github.com/mvllow/pam.nvim)
```lua
require("lazy").setup({
{ 'rose-pine/neovim', name = 'rose-pine' }
})
vim.cmd('colorscheme rose-pine')
{ source = "rose-pine/neovim", as = "rose-pine" }
```
> With [packer.nvim](https://github.com/wbthomason/packer.nvim)
### [lazy.nvim](https://lazy.folke.io/installation)
**Structured Setup**
```lua
use({ 'rose-pine/neovim', as = 'rose-pine' })
vim.cmd('colorscheme rose-pine')
-- lua/plugins/rose-pine.lua
return {
"rose-pine/neovim",
name = "rose-pine",
config = function()
vim.cmd("colorscheme rose-pine")
end
}
```
_Supported plugins are listed in the [wiki](https://github.com/rose-pine/neovim/wiki#supported-plugins)_
**Single file**
```lua
{ "rose-pine/neovim", name = "rose-pine" }
```
## Gallery
@ -49,69 +58,104 @@ _Supported plugins are listed in the [wiki](https://github.com/rose-pine/neovim/
## Options
> Options should be set **before** colorscheme
> [!IMPORTANT]
> Configure options _before_ setting colorscheme.
Variant respects `vim.o.background`, using dawn when light and `dark_variant` when dark
Rosé Pine has three variants: main, moon, and dawn. By default, `vim.o.background` is followed, using dawn when light and `dark_variant` when dark.
Colour values accept named colours from the [Rosé Pine palette](https://rosepinetheme.com/palette/ingredients/), e.g. "foam", or valid hex, e.g. "#fa8072".
```lua
require('rose-pine').setup({
--- @usage 'auto'|'main'|'moon'|'dawn'
variant = 'auto',
--- @usage 'main'|'moon'|'dawn'
dark_variant = 'main',
bold_vert_split = false,
dim_nc_background = false,
disable_background = false,
disable_float_background = false,
disable_italics = false,
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 = true,
--- @usage string hex value or named color from rosepinetheme.com/palette
groups = {
background = 'base',
background_nc = '_experimental_nc',
panel = 'surface',
panel_nc = 'base',
border = 'highlight_med',
comment = 'muted',
link = 'iris',
punctuation = 'subtle',
enable = {
terminal = true,
legacy_highlights = true, -- Improve compatibility for previous versions of Neovim
migrations = true, -- Handle deprecated options automatically
},
error = 'love',
hint = 'iris',
info = 'foam',
warn = 'gold',
styles = {
bold = true,
italic = true,
transparency = false,
},
headings = {
h1 = 'iris',
h2 = 'foam',
h3 = 'rose',
h4 = 'gold',
h5 = 'pine',
h6 = 'foam',
}
-- or set all headings at once
-- headings = 'subtle'
},
groups = {
border = "muted",
link = "iris",
panel = "surface",
-- Change specific vim highlight groups
-- https://github.com/rose-pine/neovim/wiki/Recipes
highlight_groups = {
ColorColumn = { bg = 'rose' },
error = "love",
hint = "iris",
info = "foam",
note = "pine",
todo = "rose",
warn = "gold",
-- Blend colours against the "base" background
CursorLine = { bg = 'foam', blend = 10 },
StatusLine = { fg = 'love', bg = 'love', blend = 10 },
}
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",
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)
-- Disable all undercurls
-- if highlight.undercurl then
-- highlight.undercurl = false
-- end
--
-- Change palette colour
-- if highlight.fg == palette.pine then
-- highlight.fg = palette.foam
-- end
end,
})
-- Set colorscheme after options
vim.cmd('colorscheme rose-pine')
vim.cmd("colorscheme rose-pine")
-- vim.cmd("colorscheme rose-pine-main")
-- vim.cmd("colorscheme rose-pine-moon")
-- vim.cmd("colorscheme rose-pine-dawn")
```
> [!NOTE]
> Visit the [wiki](https://github.com/rose-pine/neovim/wiki) for [plugin configurations](https://github.com/rose-pine/neovim/wiki/Plugin-configurations) and [recipes](https://github.com/rose-pine/neovim/wiki/Recipes).
## Contributing
We welcome and appreciate any help in creating a lovely experience for all.
We welcome and appreciate contributions of any kind. Create an issue or start a discussion for any proposed changes. Pull requests are encouraged for supporting additional plugins or [treesitter improvements](https://github.com/nvim-treesitter/nvim-treesitter/blob/master/CONTRIBUTING.md#highlights).
- Get highlight groups under cursor via `:Inspect` in Neovim 0.9 or [nvim-treesitter/playground](https://github.com/nvim-treesitter/playground#show-treesitter-and-syntax-highlight-groups-under-the-cursor)
- [Adding new highlight groups](https://github.com/rose-pine/neovim/issues/6#issuecomment-962466323)
- [Palette reference by name](https://rosepinetheme.com/palette)
Feel free to update the [wiki](https://github.com/rose-pine/neovim/wiki/) with any [recipes](https://github.com/rose-pine/neovim/wiki/Recipes).