mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-25 21:01:45 +00:00
automatic light/dark toggle keymap
This commit is contained in:
parent
2067f93aec
commit
0e848f1dac
@ -10,6 +10,11 @@ return {
|
|||||||
-- Load the colorscheme here.
|
-- Load the colorscheme here.
|
||||||
vim.cmd.colorscheme 'catppuccin-mocha'
|
vim.cmd.colorscheme 'catppuccin-mocha'
|
||||||
|
|
||||||
|
-- Toggle light/dark mode with mocha/latte
|
||||||
|
vim.keymap.set('n', '<leader>tt', function()
|
||||||
|
vim.cmd.colorscheme(vim.o.background == 'dark' and 'catppuccin-latte' or 'catppuccin-mocha')
|
||||||
|
end, { desc = '[T]oggle [T]heme' })
|
||||||
|
|
||||||
-- You can configure highlights by doing something like:
|
-- You can configure highlights by doing something like:
|
||||||
vim.cmd.hi 'Comment gui=none'
|
vim.cmd.hi 'Comment gui=none'
|
||||||
end,
|
end,
|
||||||
|
Loading…
Reference in New Issue
Block a user