mirror of
https://github.com/rose-pine/neovim.git
synced 2025-10-15 12:38:53 +02:00
Merge remote-tracking branch 'upstream/main'
This commit is contained in:
commit
76225c3549
8 changed files with 345 additions and 348 deletions
94
readme.md
94
readme.md
|
|
@ -17,11 +17,8 @@
|
|||
use({
|
||||
'rose-pine/neovim',
|
||||
as = 'rose-pine',
|
||||
tag = 'v0.1.0', -- Optional tag release
|
||||
config = function()
|
||||
-- Options (see available options below)
|
||||
vim.g.rose_pine_variant = 'base'
|
||||
|
||||
-- Load colorscheme after options
|
||||
vim.cmd('colorscheme rose-pine')
|
||||
end
|
||||
})
|
||||
|
|
@ -70,49 +67,40 @@ use({
|
|||
|
||||
## Options
|
||||
|
||||
> Options should be set before colorscheme
|
||||
|
||||
### Interface
|
||||
> Options should be set **before** colorscheme
|
||||
|
||||
```lua
|
||||
-- Set variant
|
||||
-- Defaults to 'dawn' if vim background is light
|
||||
-- @usage 'base' | 'moon' | 'dawn' | 'rose-pine[-moon][-dawn]'
|
||||
vim.g.rose_pine_variant = 'base'
|
||||
-- Set theme variant
|
||||
-- Matches terminal theme if unset
|
||||
-- @usage 'main' | 'moon' | 'dawn'
|
||||
vim.g.rose_pine_variant = ''
|
||||
|
||||
-- Disable italics
|
||||
vim.g.rose_pine_bold_vertical_split_line = false
|
||||
vim.g.rose_pine_inactive_background = false
|
||||
vim.g.rose_pine_disable_background = false
|
||||
vim.g.rose_pine_disable_float_background = false
|
||||
vim.g.rose_pine_disable_italics = false
|
||||
|
||||
-- Use terminal background
|
||||
vim.g.rose_pine_disable_background = false
|
||||
|
||||
-- Use bold vertical split line
|
||||
vim.g.rose_pine_bold_vertical_split_line = true
|
||||
```
|
||||
|
||||
### Custom colours
|
||||
|
||||
```lua
|
||||
local p = require('rose-pine.palette')
|
||||
vim.g.rose_pine_colors = {
|
||||
punctuation = '#fa8072',
|
||||
comment = '#ffffff',
|
||||
hint = '#9745be',
|
||||
info = '#78ccc5',
|
||||
warn = '#f5c359',
|
||||
error = '#c75c6a',
|
||||
headings = {
|
||||
h1 = '#999999',
|
||||
h2 = '#888888',
|
||||
h3 = '#777777',
|
||||
h4 = '#666666',
|
||||
h5 = '#555555',
|
||||
}
|
||||
punctuation = p.subtle,
|
||||
comment = p.subtle,
|
||||
hint = p.iris,
|
||||
info = p.foam,
|
||||
warn = p.gold,
|
||||
error = p.love,
|
||||
|
||||
-- Or set all headings to one colour: `headings = p.text`
|
||||
headings = {
|
||||
h1 = p.iris,
|
||||
h2 = p.foam,
|
||||
h3 = p.rose,
|
||||
h4 = p.gold,
|
||||
h5 = p.pine,
|
||||
h6 = p.foam,
|
||||
},
|
||||
}
|
||||
```
|
||||
|
||||
Be sure to set the colorscheme _after_ options
|
||||
|
||||
```lua
|
||||
-- Set colorscheme after options
|
||||
vim.cmd('colorscheme rose-pine')
|
||||
```
|
||||
|
|
@ -120,26 +108,28 @@ vim.cmd('colorscheme rose-pine')
|
|||
## Functions
|
||||
|
||||
```lua
|
||||
-- Toggle between the three variants
|
||||
require('rose-pine.functions').toggle_variant()
|
||||
-- Toggle between all variants
|
||||
require('rose-pine').toggle()
|
||||
|
||||
-- Toggle between base and dawn
|
||||
require('rose-pine.functions').toggle_variant({'base', 'dawn'})
|
||||
-- Toggle between some variants
|
||||
require('rose-pine').toggle({'main', 'dawn'})
|
||||
|
||||
-- Switch to specified variant
|
||||
require('rose-pine.functions').select_variant('moon')
|
||||
-- Set specific variant
|
||||
require('rose-pine').set('moon')
|
||||
```
|
||||
|
||||
## Keymaps
|
||||
|
||||
```lua
|
||||
-- Toggle variant
|
||||
vim.api.nvim_set_keymap('n', '<c-m>', [[<cmd>lua require('rose-pine.functions').toggle_variant()<cr>]], { noremap = true, silent = true })
|
||||
> These are only suggestions; no keymaps are set by the theme
|
||||
|
||||
-- Select each variant
|
||||
vim.api.nvim_set_keymap('n', '<c-8>', [[<cmd>lua require('rose-pine.functions').select_variant('dawn')<cr>]], { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<c-9>', [[<cmd>lua require('rose-pine.functions').select_variant('moon')<cr>]], { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<c-0>', [[<cmd>lua require('rose-pine.functions').select_variant('base')<cr>]], { noremap = true, silent = true })
|
||||
```lua
|
||||
-- Toggle variants
|
||||
vim.api.nvim_set_keymap('n', '<c-m>', [[<cmd>lua require('rose-pine').toggle()<cr>]], { noremap = true, silent = true })
|
||||
|
||||
-- Set variant
|
||||
vim.api.nvim_set_keymap('n', '<c-0>', [[<cmd>lua require('rose-pine').set('main')<cr>]], { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<c-9>', [[<cmd>lua require('rose-pine').set('moon')<cr>]], { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap('n', '<c-8>', [[<cmd>lua require('rose-pine').set('dawn')<cr>]], { noremap = true, silent = true })
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue