aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua/user/view.lua
diff options
context:
space:
mode:
authorsrdusr <trevorgray@srdusr.com>2023-10-17 21:26:40 +0200
committersrdusr <trevorgray@srdusr.com>2023-10-17 21:26:40 +0200
commit54a7c1bf02da30c353ddb4af51b065d895801f47 (patch)
tree08dfaa302a7c7018d0dc03fe00518c8129c87c7b /.config/nvim/lua/user/view.lua
parent1938838a043b13169a550af5ea37239adfc75293 (diff)
parentc3c0307c2fc26410249df9578c7bf16eb0caa9df (diff)
downloaddotfiles-54a7c1bf02da30c353ddb4af51b065d895801f47.tar.gz
dotfiles-54a7c1bf02da30c353ddb4af51b065d895801f47.zip
Merge commit '67d475c7259bf2448fa3f1d330885ea88036668d'
Diffstat (limited to '.config/nvim/lua/user/view.lua')
-rw-r--r--.config/nvim/lua/user/view.lua68
1 files changed, 68 insertions, 0 deletions
diff --git a/.config/nvim/lua/user/view.lua b/.config/nvim/lua/user/view.lua
new file mode 100644
index 0000000..50cea8c
--- /dev/null
+++ b/.config/nvim/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
+]])