aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-06-28 23:53:07 +0200
committersrdusr <trevorgray@srdusr.com>2023-06-28 23:53:07 +0200
commitf191627cbfcdf481fc17c4422e4513a410a845fa (patch)
treeac908caf663b0c61da2a5722d831fd84562c574a
parentf10a15743d5ad38ac7dd9fa37b50fc3cdadf64d0 (diff)
downloaddotfiles-f191627cbfcdf481fc17c4422e4513a410a845fa.tar.gz
dotfiles-f191627cbfcdf481fc17c4422e4513a410a845fa.zip
Made colorscheme fallback
-rw-r--r--lua/plugins/colorscheme.lua16
1 files changed, 11 insertions, 5 deletions
diff --git a/lua/plugins/colorscheme.lua b/lua/plugins/colorscheme.lua
index 10f0432..14edbdf 100644
--- a/lua/plugins/colorscheme.lua
+++ b/lua/plugins/colorscheme.lua
@@ -1,11 +1,17 @@
-- Colorscheme
-- Available colorschemes:
-- [[ nightfly ayu onedark doom-one nvimgelion github_dark tokyonight ]]
-local colorscheme = "tokyonight-night"
-local status_ok, _ = pcall(vim.cmd, "colorscheme " .. colorscheme)
+
+-- Define default color scheme
+local default_colorscheme = "tokyonight-night"
+local fallback_colorscheme = "desert"
+
+-- Attempt to set the default color scheme
+local status_ok, _ = pcall(vim.cmd, "colorscheme " .. default_colorscheme)
+
+-- If the default color scheme is not found, use the fallback color scheme
if not status_ok then
- vim.notify("colorscheme " .. colorscheme .. " not found!")
- return
+ vim.cmd("colorscheme " .. fallback_colorscheme)
end
--local function MyHighlights()
@@ -26,7 +32,7 @@ end
vim.api.nvim_command("syntax on")
-vim.api.nvim_command("highlight Normal guibg=none")
+vim.api.nvim_command("highlight Normal guibg=NONE")
vim.api.nvim_command("highlight NormalNC guibg=none")
vim.api.nvim_command("highlight SignColumn guibg=none")
--vim.api.nvim_command("highlight FoldColumn guibg=none")