aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-10-16 22:14:53 +0200
committersrdusr <trevorgray@srdusr.com>2023-10-16 22:14:53 +0200
commit9071f39f24df02a81fdd1339f70d3981055a0988 (patch)
treed8eead23e903e8aa34896a99ca69a70732b54a02
parent9b544636bb0e66659714f232452a184f7c526c61 (diff)
downloaddotfiles-9071f39f24df02a81fdd1339f70d3981055a0988.tar.gz
dotfiles-9071f39f24df02a81fdd1339f70d3981055a0988.zip
Moved colorsheme/ui settings here
-rw-r--r--lua/user/view.lua68
1 files changed, 68 insertions, 0 deletions
diff --git a/lua/user/view.lua b/lua/user/view.lua
new file mode 100644
index 0000000..50cea8c
--- /dev/null
+++ b/lua/user/view.lua
@@ -0,0 +1,68 @@
+-- Colorscheme
+
+-- Colors
+vim.opt.termguicolors = true
+
+-- Available colorschemes:
+-- [[ nightfly ayu onedark doom-one nvimgelion github_dark tokyonight ]]
+
+require('tokyonight').setup({
+ style = 'night',
+ transparent = true,
+ transparent_sidebar = true,
+ styles = {
+ sidebars = 'transparent',
+ floats = 'transparent',
+ },
+})
+
+-- Define default color scheme
+local default_colorscheme = 'tokyonight'
+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.cmd('colorscheme ' .. fallback_colorscheme)
+end
+
+vim.api.nvim_command('syntax on')
+vim.api.nvim_command('highlight Normal guibg=NONE ctermbg=NONE')
+vim.api.nvim_command('highlight NormalNC guibg=NONE')
+vim.api.nvim_command('highlight NormalFloat guibg=NONE ctermbg=NONE')
+vim.api.nvim_command('highlight Float guibg=NONE ctermbg=NONE')
+vim.api.nvim_command('highlight NonText guibg=NONE ctermbg=NONE')
+vim.api.nvim_command('highlight SignColumn guibg=NONE')
+vim.api.nvim_command('highlight FoldColumn guibg=NONE')
+vim.api.nvim_command('highlight CursorLineSign guibg=NONE ctermbg=NONE')
+vim.api.nvim_command('highlight Title guibg=NONE gui=bold')
+vim.api.nvim_command('highlight TabLine guibg=#333842 gui=bold')
+vim.api.nvim_command('highlight TabLineSel guibg=#333842 gui=bold')
+vim.api.nvim_command('highlight TabLineFill guibg=NONE gui=bold')
+vim.api.nvim_command('highlight WinBar guibg=NONE ctermbg=NONE gui=bold')
+vim.api.nvim_command('highlight WinBarNC guibg=NONE ctermbg=NONE')
+vim.api.nvim_command('highlight LineNr guibg=NONE ctermbg=NONE')
+vim.api.nvim_command('highlight WinSeparator guibg=NONE gui=bold ctermbg=NONE')
+vim.api.nvim_command('highlight MsgSeparator guibg=NONE ctermbg=NONE')
+vim.api.nvim_command('highlight EndOfBuffer guibg=NONE guifg=Normal')
+vim.api.nvim_command('highlight Comment guibg=NONE ctermbg=NONE')
+vim.api.nvim_command('highlight Winblend guibg=NONE ctermbg=NONE')
+vim.api.nvim_command('highlight NormalFloat guibg=NONE ctermbg=NONE')
+vim.api.nvim_command('highlight Pumblend guibg=NONE ctermbg=NONE')
+vim.api.nvim_command('highlight WildMenu guibg=NONE ctermbg=NONE')
+vim.api.nvim_command('highlight WarningMsg guibg=NONE ctermbg=NONE')
+vim.api.nvim_command('highlight Pmenu guibg=NONE ctermbg=NONE')
+vim.api.nvim_command('highlight PmenuSel guibg=NONE ctermbg=NONE')
+vim.api.nvim_command('highlight PmenuThumb guibg=NONE ctermbg=NONE')
+vim.api.nvim_command('highlight PmenuSbar guibg=NONE ctermbg=NONE')
+vim.api.nvim_command('highlight PmenuExtra guibg=NONE ctermbg=NONE')
+vim.api.nvim_command('highlight PmenuExtraSel guibg=NONE ctermbg=NONE')
+vim.api.nvim_command('highlight MoreMsg guibg=NONE ctermbg=NONE')
+
+-- Set different window separator colorscheme
+vim.cmd([[
+au WinEnter * setl winhl=WinSeparator:WinSeparatorA
+au WinLeave * setl winhl=WinSeparator:WinSeparator
+]])