feat(options): default statusline expression #33036

Problem:
Default 'statusline' is implemented in C and not representable as
a statusline expression. This makes it hard for user configs/plugins to
extend it.

Solution:
- Change the default 'statusline' slightly to a statusline expression.
- Remove the C implementation.
This commit is contained in:
Shadman
2025-04-22 04:05:34 +06:00
committed by GitHub
parent ab72799841
commit 28e31f5d3d
23 changed files with 167 additions and 151 deletions

View File

@@ -8541,7 +8541,14 @@ local options = {
{
abbreviation = 'stl',
cb = 'did_set_statusline',
defaults = '',
defaults = table.concat({
'%<',
'%f %h%w%m%r ',
'%=',
"%{% &showcmdloc == 'statusline' ? '%-10.S ' : '' %}",
"%{% exists('b:keymap_name') ? '<'..b:keymap_name..'> ' : '' %}",
"%{% &ruler ? ( &rulerformat == '' ? '%-14.(%l,%c%V%) %P' : &rulerformat ) : '' %}",
}),
desc = [=[
When non-empty, this option determines the content of the status line.
Also see |status-line|.