diff --git a/lazy-lock.json b/lazy-lock.json index 92930cb..e4e92b6 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -56,7 +56,6 @@ "supermaven-nvim": { "branch": "main", "commit": "07d20fce48a5629686aefb0a7cd4b25e33947d50" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, "telescope.nvim": { "branch": "master", "commit": "5255aa27c422de944791318024167ad5d40aad20" }, - "transparent.nvim": { "branch": "main", "commit": "8ac59883de84e9cd1850ea25cf087031c5ba7d54" }, "typescript-tools.nvim": { "branch": "master", "commit": "c2f5910074103705661e9651aa841e0d7eea9932" }, "vague.nvim": { "branch": "main", "commit": "8c4643f8a5106dbc492918f86ff6b5c81111ce9a" }, "vim-bujo": { "branch": "master", "commit": "ee3fecb5b3206b8073ac3fe4153391f320c99197" }, diff --git a/lua/config/autocmds.lua b/lua/config/autocmds.lua index 77ad37e..b56dca8 100644 --- a/lua/config/autocmds.lua +++ b/lua/config/autocmds.lua @@ -24,6 +24,24 @@ vim.api.nvim_create_autocmd("FileType", { end, }) +local background_group = vim.api.nvim_create_augroup("BackgroundSync", { clear = true }) + +local function sync_background_colorscheme() + local colorscheme = vim.o.background == "light" and "dawnfox" or "duskfox" + + if vim.g.colors_name == colorscheme then + return + end + + vim.cmd.colorscheme(colorscheme) +end + +vim.api.nvim_create_autocmd("OptionSet", { + group = background_group, + pattern = "background", + callback = sync_background_colorscheme, +}) + -- Auto insert mode on TermOpen vim.api.nvim_create_autocmd({ "TermOpen", "BufEnter" }, { pattern = { "*" }, diff --git a/lua/custom/plugins/colorscheme.lua b/lua/custom/plugins/colorscheme.lua index 9ec8201..6e78c0d 100644 --- a/lua/custom/plugins/colorscheme.lua +++ b/lua/custom/plugins/colorscheme.lua @@ -4,115 +4,60 @@ return { dependencies = "rktjmp/lush.nvim", lazy = false, priority = 1000, - config = function() - -- vim.cmd.colorscheme("zenwritten") - end, }, { "mellow-theme/mellow.nvim", lazy = false, priority = 1000, - init = function() - -- vim.cmd("colorscheme mellow") - end, }, { "projekt0n/github-nvim-theme", lazy = false, priority = 1000, - init = function() - -- vim.o.background = "dark" - -- vim.cmd("colorscheme github_dark") - end, }, { "morhetz/gruvbox", lazy = false, priority = 1000, - init = function() - -- vim.o.background = "light" - -- vim.cmd("colorscheme gruvbox") - end, }, { "EdenEast/nightfox.nvim", - opts = {}, lazy = false, priority = 1000, - init = function() - -- vim.o.background = "light" - -- vim.cmd("colorscheme dayfox") - -- vim.o.background = "dark" - -- vim.cmd("colorscheme duskfox") - end, }, { "shaunsingh/nord.nvim", lazy = false, priority = 1000, - opts = {}, - config = function() - -- vim.o.background = "dark" - -- vim.cmd("colorscheme nord") - end, }, { "AlexvZyl/nordic.nvim", lazy = false, priority = 1000, - opts = {}, - config = function() - -- vim.o.background = "dark" - -- vim.cmd("colorscheme nordic") - end, }, { "thesimonho/kanagawa-paper.nvim", lazy = false, priority = 1000, - config = function() - -- vim.o.background = "dark" - -- vim.cmd.colorscheme("kanagawa-paper") - end, }, { "Mofiqul/adwaita.nvim", lazy = false, priority = 1000, - config = function() - -- vim.o.background = "dark" - -- vim.cmd.colorscheme("adwaita") - end, }, { "HoNamDuong/hybrid.nvim", lazy = false, priority = 1000, - config = function() - -- vim.o.background = "dark" - -- vim.cmd.colorscheme("hybrid") - end, }, { "vague2k/vague.nvim", lazy = false, priority = 1000, - config = function() - -- vim.o.background = "dark" - -- vim.cmd.colorscheme("vague") - -- set IblScope highlighting to #1C1C1C - -- vim.api.nvim_set_hl(0, "IblScope", { fg = "#3f3f42" }) - -- vim.api.nvim_set_hl(0, "IblIndent", { fg = "#2a2a2b" }) - -- vim.o.cursorline = false - end, }, { "Shatur/neovim-ayu", lazy = false, priority = 1000, - config = function() - -- vim.o.background = "dark" - -- vim.cmd.colorscheme("ayu") - end, }, } diff --git a/lua/custom/plugins/transparent.lua b/lua/custom/plugins/transparent.lua deleted file mode 100644 index 8879428..0000000 --- a/lua/custom/plugins/transparent.lua +++ /dev/null @@ -1,7 +0,0 @@ -return { - "xiyaowong/transparent.nvim", - lazy = false, - config = function() - vim.cmd([[TransparentEnable]]) - end -}