mirror of
https://github.com/rose-pine/neovim.git
synced 2025-10-15 12:38:53 +02:00
init
This commit is contained in:
commit
f0c2be8d63
7 changed files with 502 additions and 0 deletions
22
lua/rose-pine/functions.lua
Normal file
22
lua/rose-pine/functions.lua
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
if vim.g.rose_pine_variant_switch == nil then
|
||||
vim.g.rose_pine_variant_switch = 0
|
||||
end
|
||||
|
||||
local select_variant = function(variant)
|
||||
vim.g.rose_pine_variant = variant
|
||||
print("Rosé Pine", variant)
|
||||
vim.cmd([[colorscheme rose-pine]])
|
||||
end
|
||||
|
||||
local toggle_variant = function(variants)
|
||||
local options = variants or { "base", "moon", "dawn" }
|
||||
|
||||
vim.g.rose_pine_variant_switch = (vim.g.rose_pine_variant_switch % table.getn(options)) + 1
|
||||
|
||||
select_variant(options[vim.g.rose_pine_variant_switch])
|
||||
end
|
||||
|
||||
return {
|
||||
select_variant = select_variant,
|
||||
toggle_variant = toggle_variant,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue