Skip to content

Commit

Permalink
[neovim] Refactor auto-dark-mode config
Browse files Browse the repository at this point in the history
sestrella committed Jan 9, 2025
1 parent bf46bd1 commit 53b0be9
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions home/neovim/plugins/auto-dark-mode/config.lua
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
local auto_dark_mode = require("auto-dark-mode")

local set_mode = function(mode)
return function()
vim.api.nvim_set_option("background", mode)
vim.cmd("colorscheme solarized")
end
end

auto_dark_mode.setup({
require("auto-dark-mode").setup({
update_interval = 1000,
set_dark_mode = set_mode("dark"),
set_light_mode = set_mode("light"),
set_dark_mode = function()
vim.api.nvim_set_option_value("background", "dark", {})
vim.cmd("colorscheme solarized")
end,
set_light_mode = function()
vim.api.nvim_set_option_value("background", "light", {})
vim.cmd("colorscheme solarized")
end,
})
auto_dark_mode.init()

0 comments on commit 53b0be9

Please sign in to comment.