Simplify light mode toggle with a switch
This commit is contained in:
parent
c34dee4d4e
commit
84e339864c
2 changed files with 7 additions and 5 deletions
5
init.lua
5
init.lua
|
@ -1,3 +1,6 @@
|
|||
-- set to true for light mode
|
||||
vim.g.light_mode = true
|
||||
|
||||
-- Neovim configuration
|
||||
-- Modularized structure for better organization
|
||||
|
||||
|
@ -15,4 +18,4 @@ require("lazy").setup({
|
|||
|
||||
-- Load additional configuration
|
||||
require("colorizer").setup()
|
||||
require("config.formatting")
|
||||
require("config.formatting")
|
||||
|
|
|
@ -7,11 +7,10 @@ return {
|
|||
priority = 1000,
|
||||
dependencies = "rktjmp/lush.nvim",
|
||||
config = function()
|
||||
vim.cmd.colorscheme("zenwritten")
|
||||
local term_bg = os.getenv("TERM_BACKGROUND")
|
||||
if term_bg == "light" then
|
||||
vim.opt.background = "light"
|
||||
if vim.g.light_mode then
|
||||
vim.o.background = "light"
|
||||
end
|
||||
vim.cmd.colorscheme("zenbones")
|
||||
end,
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue