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

@ -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'

View File

@ -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,