diff options
| author | srdusr <trevorgray@srdusr.com> | 2023-05-08 20:53:13 +0200 |
|---|---|---|
| committer | srdusr <trevorgray@srdusr.com> | 2023-05-08 20:53:13 +0200 |
| commit | 4cda03e7274e56234af81e7f0202ba1f2c7e421f (patch) | |
| tree | 9c6706bb9291b7cafb478ddb965cc5e2574d06f6 /lua | |
| parent | 3b194b8c8191038dd6730a6270dcf3209d200e73 (diff) | |
| download | dotfiles-4cda03e7274e56234af81e7f0202ba1f2c7e421f.tar.gz dotfiles-4cda03e7274e56234af81e7f0202ba1f2c7e421f.zip | |
Add specialsections for special/terminal statusline
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/plugins/heirline.lua | 42 |
1 files changed, 18 insertions, 24 deletions
diff --git a/lua/plugins/heirline.lua b/lua/plugins/heirline.lua index a23b5bb..93b3e32 100644 --- a/lua/plugins/heirline.lua +++ b/lua/plugins/heirline.lua @@ -779,40 +779,34 @@ local InactiveStatusline = { { Align, hl = { bg = colors.nobg, force = true } }, } +local specialleft = { + { ViMode, hl = { fg = utils.get_highlight("statusline").bg, force = true } }, + { LeftSpace, hl = { bg = colors.nobg, force = true } }, + { Space, hl = { bg = colors.nobg, force = true } }, + } +local specialmiddle = { + { Align, hl = { bg = colors.nobg, force = true } }, + { DAPMessages, hl = { bg = colors.nobg, force = true } }, + { Align, hl = { bg = colors.nobg, force = true } }, + } +local specialright = { + { RightSpace, hl = { bg = colors.nobg, force = true } }, + { Ruler, hl = { fg = utils.get_highlight("statusline").bg, force = true } }, + } +local specialsections = { specialleft, specialmiddle, specialright } + local SpecialStatusline = { condition = function() return conditions.buffer_matches({ buftype = { "nofile", "prompt", "help", "quickfix" }, filetype = { "^git.*", "fugitive", "dashboard", }, }) - end, - { ViMode, hl = { fg = utils.get_highlight("statusline").bg, force = true } }, - { LeftSpace, hl = { bg = colors.nobg, force = true } }, - { Space, hl = { bg = colors.nobg, force = true } }, - { Align, hl = { bg = colors.nobg, force = true } }, - { DAPMessages, hl = { bg = colors.nobg, force = true } }, - { Align, hl = { bg = colors.nobg, force = true } }, - { RightSpace, hl = { bg = colors.nobg, force = true } }, - { Ruler, hl = { fg = utils.get_highlight("statusline").bg, force = true } }, -} + end, specialsections } local TerminalStatusline = { condition = function() return conditions.buffer_matches({ buftype = { "terminal" } }) - end, - - -- Quickly add a condition to the ViMode to only show it when buffer is active! - --{ condition = conditions.is_active, ViMode, Space }, - { ViMode, hl = { fg = utils.get_highlight("statusline").bg, force = true } }, - { LeftSpace, hl = { bg = colors.nobg, force = true } }, - { FileNameBlock, hl = { bg = colors.nobg, force = true } }, - { Space, hl = { bg = colors.nobg, force = true } }, - { Align, hl = { bg = colors.nobg, force = true } }, - { DAPMessages, hl = { bg = colors.nobg, force = true } }, - { Align, hl = { bg = colors.nobg, force = true } }, - { RightSpace, hl = { bg = colors.nobg, force = true } }, - { Ruler, hl = { fg = utils.get_highlight("statusline").bg, force = true } }, -} + end, specialsections } local StatusLine = { static = { |
