setup: add ui config with transparent bg
This commit also setup highlight for EOF-char & Window-Separator to match the highlight on Cursor-Line-Number. And sets auto-command to reset colors after changing the colorscheme.
This commit is contained in:
parent
7a52a46ad4
commit
721ef79eda
|
|
@ -11,3 +11,12 @@ vim.api.nvim_create_autocmd('TextYankPost', {
|
|||
vim.hl.on_yank()
|
||||
end,
|
||||
})
|
||||
|
||||
vim.api.nvim_create_autocmd('ColorScheme', {
|
||||
desc = 'Reset colors for some elemnts after changeing the colorscheme.',
|
||||
group = vim.api.nvim_create_augroup('ElementsColorReset', { clear = true }),
|
||||
callback = function()
|
||||
vim.api.nvim_set_hl(0, 'WinSeparator', vim.api.nvim_get_hl(0, { name = 'CursorLineNr' }))
|
||||
vim.api.nvim_set_hl(0, 'EndOfBuffer', vim.api.nvim_get_hl(0, { name = 'CursorLineNr' }))
|
||||
end,
|
||||
})
|
||||
|
|
|
|||
|
|
@ -4,3 +4,4 @@ require 'core.keymaps'
|
|||
require 'core.diagnostics'
|
||||
require 'core.autocommands'
|
||||
require 'core.lazy-nvim'
|
||||
require 'core.ui'
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
-- [[ UI Configs ]]
|
||||
-- set transparency
|
||||
vim.api.nvim_set_hl(0, 'Normal', { bg = 'none', ctermbg = 'none' })
|
||||
vim.api.nvim_set_hl(0, 'NonText', { bg = 'none', ctermbg = 'none' })
|
||||
vim.api.nvim_set_hl(0, 'SignColumn', { bg = 'none', ctermbg = 'none' })
|
||||
vim.api.nvim_set_hl(0, 'FoldColumn', { bg = 'none', ctermbg = 'none' })
|
||||
|
||||
-- set WinSeparator & EndOfBuffer to match the highlight on cursor-line-number
|
||||
vim.api.nvim_set_hl(0, 'WinSeparator', vim.api.nvim_get_hl(0, { name = 'CursorLineNr' }))
|
||||
vim.api.nvim_set_hl(0, 'EndOfBuffer', vim.api.nvim_get_hl(0, { name = 'CursorLineNr' }))
|
||||
Loading…
Reference in New Issue