luukvbaal / statuscol.nvim

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request: `minwidth`?

vishalbalaji opened this issue · comments

I find this lacking especially for lnumfunc, which resizes the status column based on how many digits the biggest line number is and can cause inconsistency between different files. It would be nice if we could manually set a minimum width for columns, wouldn't it?

'statuscolumn' follows the 'numberwidth' option in neovim currently. Does that help?

Less granular than being able to set it for each segment of course, which might also be desirable.

Are you saying that setting numberwidth, to say 3, should stop the column from shrinking if there are less than 3 characters? If so, it doesn't seem to be working for me. Regardless of whether numberwidth is set or not, the column width is shrinking as soon as the line number digits go down.

'numberwidth' applies to the entire status column, not just the line numbers that may or may not be contained within it. If you set numberwidth to 3 the statuscolumn will always be at least 3 wide.

Setting it to a number wide enough to contain your entire statuscolumn + the largest line number you don't want to change the width might be sufficient to get the behavior you want.

Aah, I see. Yep, this seems to have fixed this. Closing this issue, but being able to manually constrain the minimum width might still prove to be useful.