mirror of
https://github.com/rose-pine/neovim.git
synced 2025-10-15 12:38:53 +02:00
fix: reset palette when switching colorschemes
This commit is contained in:
parent
eb057bd6dd
commit
0fb313c3c5
5 changed files with 11 additions and 11 deletions
|
|
@ -1,17 +1,15 @@
|
|||
local config = require('rose-pine.config')
|
||||
local M = {}
|
||||
|
||||
---@param options Config|nil
|
||||
function M.colorscheme(options)
|
||||
if options then
|
||||
config.extend(options)
|
||||
end
|
||||
|
||||
if vim.g.colors_name then
|
||||
vim.cmd('hi clear')
|
||||
end
|
||||
---@param variant Variant|nil
|
||||
function M.colorscheme(variant)
|
||||
config.extend({ variant = variant })
|
||||
|
||||
vim.opt.termguicolors = true
|
||||
if vim.g.colors_name then
|
||||
vim.cmd('hi clear')
|
||||
vim.cmd('syntax reset')
|
||||
end
|
||||
vim.g.colors_name = 'rose-pine'
|
||||
|
||||
require('rose-pine.theme')._load(config.options)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue