Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/stephansama/nvim. neovim configuration for @stephansama
dotfiles lua neovim neovim-configuration nvim nvim-config typescript typescript-to-lua
Something went wrong. Try again.
Lua
12345678910111213141516171819202122232425262728293031323334local theme = require("config.constants")
local function auto_theme(current_theme) local is_darkmode = current_theme == theme.THEME_DARKMODE return function() local next_theme = is_darkmode and "dark" or "light" vim.api.nvim_set_option_value("background", next_theme, {})
vim.cmd(string.format("colorscheme %s", current_theme))
if is_darkmode then vim.cmd([[hi BqfPreviewFloat guibg=#1e1e2e]]) vim.cmd([[hi BqfPreviewTitle guibg=#1e1e2e]]) vim.cmd([[hi BqfPreviewBorder guibg=#1e1e2e]]) vim.cmd([[hi MiniNotifyBorder guibg=none ctermbg=none]]) vim.cmd([[hi MiniNotifyNormal guibg=none ctermbg=none]]) vim.cmd([[hi MiniNotifyTitle guibg=none ctermbg=none]]) end
vim.cmd([[ResetUI]]) endend
return { "f-person/auto-dark-mode.nvim", priority = 1002, lazy = false, opts = { update_interval = 1000, set_dark_mode = auto_theme(theme.THEME_DARKMODE), set_light_mode = auto_theme(theme.THEME_LIGHTMODE), },}