From 44500f4fb9d2ed72a40484e7f996e4e24ae89d57 Mon Sep 17 00:00:00 2001 From: gnat Date: Tue, 10 Sep 2024 02:47:04 -0700 Subject: [PATCH] tweak vim.opt; change statusbar hl groups around --- colors.vim | 17 +++++++++-------- lua/core/opts.lua | 24 ++++++++++++++++++++---- lua/core/statusline.lua | 9 +++++---- 3 files changed, 34 insertions(+), 16 deletions(-) diff --git a/colors.vim b/colors.vim index 12968d0..ee35236 100644 --- a/colors.vim +++ b/colors.vim @@ -6,8 +6,8 @@ hi MyNormalMode guibg=#33b1ff guifg=#161616 hi MyInsertMode guibg=#42be65 guifg=#161616 hi MyVisualMode guibg=#be95ff guifg=#161616 hi MyDefaultMode guibg=#FF7EB6 guifg=#161616 -hi CustomErrorHl guifg=#FF7EB6 guibg=#161616 -hi CustomWarnHl guifg=#FFE97B guibg=#161616 +hi CustomErrorHl guifg=#FF7EB6 guibg=#262626 +hi CustomWarnHl guifg=#FFE97B guibg=#262626 hi tabActive guibg=#FF7EB6 guifg=#161616 hi tabInactive guibg=#3c3836 guifg=#dde1e6 hi tabSepActive guibg=#262626 guifg=#FF7EB6 @@ -17,11 +17,12 @@ hi tabSepInactive2 guifg=#3c3836 guibg=#262626 hi tabSepSpecial guifg=#FF7EB6 guibg=#262626 hi tabSepSpecial2 guifg=#262626 guibg=#262626 hi tabSepSpecial3 guifg=#262626 guibg=#262626 -highlight GitSignsAdd guibg=#161616 guifg=#42be65 -highlight GitSignsChange guibg=#161616 guifg=#33b1ff -highlight GitSignsDelete guibg=#161616 guifg=#ee5396 -highlight GitSignsTopDelete guibg=#161616 guifg=#ee5396 -highlight GitSignsChangeDelete guibg=#161616 guifg=#ee5396 -highlight GitSignsUntracked guibg=#161616 guifg=#be95ff +hi StatusLine guifg=#f2f4f8 guibg=#262626 +hi GitSignsAdd guifg=#42be65 +hi GitSignsChange guifg=#33b1ff +hi GitSignsDelete guifg=#ee5396 +hi GitSignsTopDelete guifg=#ee5396 +hi GitSignsChangeDelete guifg=#ee5396 +hi GitSignsUntracked guifg=#be95ff luafile ~/.config/nvim/lua/core/statusline.lua luafile ~/.config/nvim/lua/core/tabline.lua diff --git a/lua/core/opts.lua b/lua/core/opts.lua index 97b82aa..8f82e1d 100644 --- a/lua/core/opts.lua +++ b/lua/core/opts.lua @@ -2,8 +2,9 @@ local opt = vim.opt opt.expandtab = true opt.smarttab = true -opt.shiftwidth = 4 -opt.tabstop = 4 +opt.shiftwidth = 2 +opt.tabstop = 2 +opt.shiftround = true opt.hlsearch = true opt.incsearch = true @@ -28,6 +29,21 @@ opt.updatetime = 50 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' diff --git a/lua/core/statusline.lua b/lua/core/statusline.lua index 394ebf9..b165dab 100644 --- a/lua/core/statusline.lua +++ b/lua/core/statusline.lua @@ -61,11 +61,11 @@ function get_diagnostic_count() if warning_count + error_count == 0 then return '' elseif error_count == 0 then - return '[%#CustomWarnHl#' .. ' ' .. warning_count .. '%*]' + return '[%#CustomWarnHl#' .. 'W ' .. warning_count .. '%*]' elseif warning_count == 0 then - return "[%#CustomErrorHl# " .. error_count .. '%*]' + return "[%#CustomErrorHl#E " .. error_count .. '%*]' end - return "[%#CustomErrorHl# " .. error_count .. '%*] [%#CustomWarnHl#' .. ' ' .. warning_count .. '%*]' + return "[%#CustomErrorHl#E " .. error_count .. '%*] [%#CustomWarnHl#' .. 'W ' .. warning_count .. '%*]' end function get_buffer_perms() @@ -104,10 +104,11 @@ local function statusline() local rm_highlight = '%*' 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_name, rm_highlight, + "%#StatusLine#", buffer, modified, linecol,