File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,10 +5,11 @@ Base class for various bars & lines. All bars/lines extends from it.
55
66## 📦 Variables
77
8- | Name | Kind | Description |
9- |----------| -------|---------------------|
10- | `state` | table | Bars state. |
11- | `config` | table | Bars configuration. |
8+ | Name | Kind | Description |
9+ |--------------------| ---------|-----------------------------------------------|
10+ | `state` | table | Bars state. |
11+ | `config` | table | Bars configuration. |
12+ | `use_blank_output` | boolean | Uses blank output for windows without styles. |
1213
1314## 🚧 Functions
1415
@@ -57,6 +58,7 @@ function generic:set_default_state ()
5758 };
5859
5960 self .config = {};
61+ self .use_blank_output = false ;
6062end
6163
6264--- @param src any
@@ -356,7 +358,11 @@ function generic:get_styled_output (win, components)
356358 end
357359
358360 if not get_var (" _" .. self .var_name ) then
359- self :update_style (win );
361+ if self .use_blank_output then
362+ return " " ;
363+ else
364+ self :update_style (win );
365+ end
360366 end
361367
362368 local style = get_var (self .var_name ) or
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ statuscolumn:set_default_state();
44
55statuscolumn .default = " %!v:lua.require('bars.statuscolumn').render()" ;
66statuscolumn .var_name = " bars_statuscolumn_style" ;
7+ -- statuscolumn.use_blank_output = true;
78
89--- @class bars.statusline.state
910statuscolumn .state = {
@@ -39,7 +40,7 @@ statuscolumn.config = {
3940 force_attach = {},
4041
4142 ignore_filetypes = { " blink-cmp-menu" },
42- ignore_buftypes = { " help" , " quickfix" },
43+ ignore_buftypes = { " help" , " quickfix" , " terminal " },
4344
4445 condition = function (buffer )
4546 local ft , bt = vim .bo [buffer ].ft , vim .bo [buffer ].bt ;
@@ -206,11 +207,19 @@ statuscolumn.config = {
206207 --- | fE
207208 },
208209
209- terminal = {
210+ disabled = {
210211 --- | fS
211212
212213 condition = function (buffer )
213- return vim .bo [buffer ].bt == " terminal" ;
214+ local ft , bt = vim .bo [buffer ].filetype , vim .bo [buffer ].buftype ;
215+
216+ if vim .list_contains (statuscolumn .config .ignore_filetypes , ft ) then
217+ return true ;
218+ elseif vim .list_contains (statuscolumn .config .ignore_buftypes , bt ) then
219+ return true ;
220+ end
221+
222+ return false ;
214223 end ,
215224
216225 components = {}
You can’t perform that action at this time.
0 commit comments