tweak vim.opt; change statusbar hl groups around

This commit is contained in:
gnat 2024-09-10 02:47:04 -07:00
parent 5610df67fe
commit 44500f4fb9
3 changed files with 34 additions and 16 deletions

View File

@ -6,8 +6,8 @@ hi MyNormalMode guibg=#33b1ff guifg=#161616
hi MyInsertMode guibg=#42be65 guifg=#161616 hi MyInsertMode guibg=#42be65 guifg=#161616
hi MyVisualMode guibg=#be95ff guifg=#161616 hi MyVisualMode guibg=#be95ff guifg=#161616
hi MyDefaultMode guibg=#FF7EB6 guifg=#161616 hi MyDefaultMode guibg=#FF7EB6 guifg=#161616
hi CustomErrorHl guifg=#FF7EB6 guibg=#161616 hi CustomErrorHl guifg=#FF7EB6 guibg=#262626
hi CustomWarnHl guifg=#FFE97B guibg=#161616 hi CustomWarnHl guifg=#FFE97B guibg=#262626
hi tabActive guibg=#FF7EB6 guifg=#161616 hi tabActive guibg=#FF7EB6 guifg=#161616
hi tabInactive guibg=#3c3836 guifg=#dde1e6 hi tabInactive guibg=#3c3836 guifg=#dde1e6
hi tabSepActive guibg=#262626 guifg=#FF7EB6 hi tabSepActive guibg=#262626 guifg=#FF7EB6
@ -17,11 +17,12 @@ hi tabSepInactive2 guifg=#3c3836 guibg=#262626
hi tabSepSpecial guifg=#FF7EB6 guibg=#262626 hi tabSepSpecial guifg=#FF7EB6 guibg=#262626
hi tabSepSpecial2 guifg=#262626 guibg=#262626 hi tabSepSpecial2 guifg=#262626 guibg=#262626
hi tabSepSpecial3 guifg=#262626 guibg=#262626 hi tabSepSpecial3 guifg=#262626 guibg=#262626
highlight GitSignsAdd guibg=#161616 guifg=#42be65 hi StatusLine guifg=#f2f4f8 guibg=#262626
highlight GitSignsChange guibg=#161616 guifg=#33b1ff hi GitSignsAdd guifg=#42be65
highlight GitSignsDelete guibg=#161616 guifg=#ee5396 hi GitSignsChange guifg=#33b1ff
highlight GitSignsTopDelete guibg=#161616 guifg=#ee5396 hi GitSignsDelete guifg=#ee5396
highlight GitSignsChangeDelete guibg=#161616 guifg=#ee5396 hi GitSignsTopDelete guifg=#ee5396
highlight GitSignsUntracked guibg=#161616 guifg=#be95ff hi GitSignsChangeDelete guifg=#ee5396
hi GitSignsUntracked guifg=#be95ff
luafile ~/.config/nvim/lua/core/statusline.lua luafile ~/.config/nvim/lua/core/statusline.lua
luafile ~/.config/nvim/lua/core/tabline.lua luafile ~/.config/nvim/lua/core/tabline.lua

View File

@ -2,8 +2,9 @@ local opt = vim.opt
opt.expandtab = true opt.expandtab = true
opt.smarttab = true opt.smarttab = true
opt.shiftwidth = 4 opt.shiftwidth = 2
opt.tabstop = 4 opt.tabstop = 2
opt.shiftround = true
opt.hlsearch = true opt.hlsearch = true
opt.incsearch = true opt.incsearch = true
@ -28,6 +29,21 @@ opt.updatetime = 50
opt.clipboard = "unnamedplus" opt.clipboard = "unnamedplus"
border_style = 'rounded' opt.title = true
opt.titlelen = 0
vim.cmd('set showtabline=2') opt.laststatus = 3
opt.showtabline = 2
opt.signcolumn = 'auto:2'
opt.showbreak = '' -- ↪ ⤷
opt.listchars = {
tab = ' ',
extends = '',
precedes = '',
conceal = '',
nbsp = '',
trail = '·'
}
border_style = 'rounded'

View File

@ -61,11 +61,11 @@ function get_diagnostic_count()
if warning_count + error_count == 0 then if warning_count + error_count == 0 then
return '' return ''
elseif error_count == 0 then elseif error_count == 0 then
return '[%#CustomWarnHl#' .. ' ' .. warning_count .. '%*]' return '[%#CustomWarnHl#' .. 'W ' .. warning_count .. '%*]'
elseif warning_count == 0 then elseif warning_count == 0 then
return "[%#CustomErrorHl# " .. error_count .. '%*]' return "[%#CustomErrorHl#E " .. error_count .. '%*]'
end end
return "[%#CustomErrorHl# " .. error_count .. '%*] [%#CustomWarnHl#' .. ' ' .. warning_count .. '%*]' return "[%#CustomErrorHl#E " .. error_count .. '%*] [%#CustomWarnHl#' .. 'W ' .. warning_count .. '%*]'
end end
function get_buffer_perms() function get_buffer_perms()
@ -104,10 +104,11 @@ local function statusline()
local rm_highlight = '%*' local rm_highlight = '%*'
return string.format( return string.format(
"%s [%s] %s%s%s%s%s%s%s%s%s ", "%s [%s] %s%s%s%s%s%s%s%s%s%s%s ",
mode_highlight, mode_highlight,
mode_name, mode_name,
rm_highlight, rm_highlight,
"%#StatusLine#",
buffer, buffer,
modified, modified,
linecol, linecol,