luukvbaal / statuscol.nvim

Status column plugin that provides a configurable 'statuscolumn' and click handlers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`auto = true` option only hides the part of the segment that has no matching signs, instead of hiding the entire segment.

dnaik42 opened this issue · comments

I'm using the following configuration for my fold column

{
 text = { " %C " },
 auto = true,
}

There are two whitespaces next to the foldchars for padding. However, when there are no folds, only the foldchar part is hidden, and the two whitespaces are still drawn, wasting unnecessary space.

auto = true is only a valid key for sign segments. The foldcolumn %C segment follows the Neovim 'foldcolumn' option. If you set that to auto:x, it will hide automatically. The same applies to builtin.foldfunc.

@luukvbaal my foldcolumn is already set to auto, however the behaviour is the same as what I described.

Right, the whitespace you added need their own segment.condition. I'm on mobile so typing out a full config is hard but args.fold.width > 0 should work.

Okay, thanks for explaining