diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-07-14 17:35:37 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-07-14 17:35:37 +0200 |
| commit | 90982cf76ae6bf29840f2ecd6fc790151fc0fffe (patch) | |
| tree | c4b3cc68248dacbf9ed832647980d139ccea30f3 /.config/nvim/lua/plugins/colorscheme.lua | |
| parent | 863eda5cb97493b0d63ad457069d88c5c5b7a8f5 (diff) | |
| parent | d72187703f539920b879439c73ebf4849cc3dbdd (diff) | |
| download | dotfiles-90982cf76ae6bf29840f2ecd6fc790151fc0fffe.tar.gz dotfiles-90982cf76ae6bf29840f2ecd6fc790151fc0fffe.zip | |
Merge commit '600fd511151dec5bc6eafe7912579b9133921125'
Diffstat (limited to '.config/nvim/lua/plugins/colorscheme.lua')
| -rw-r--r-- | .config/nvim/lua/plugins/colorscheme.lua | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/.config/nvim/lua/plugins/colorscheme.lua b/.config/nvim/lua/plugins/colorscheme.lua index 10f0432..14edbdf 100644 --- a/.config/nvim/lua/plugins/colorscheme.lua +++ b/.config/nvim/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") |
