aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/_meta/options.lua
diff options
context:
space:
mode:
authorLuuk van Baal <luukvbaal@gmail.com>2024-06-15 05:46:43 +0200
committerLuuk van Baal <luukvbaal@gmail.com>2024-06-16 19:04:34 +0200
commitad70c9892d5b5ebcc106742386c99524f074bcea (patch)
tree13ef468ac927d78a1f35fbdf01ffc6a2e2ba914f /runtime/lua/vim/_meta/options.lua
parent114197517f89de557333dbc6022912b2f8b4eaf5 (diff)
downloadrneovim-ad70c9892d5b5ebcc106742386c99524f074bcea.tar.gz
rneovim-ad70c9892d5b5ebcc106742386c99524f074bcea.tar.bz2
rneovim-ad70c9892d5b5ebcc106742386c99524f074bcea.zip
feat(column)!: rework 'statuscolumn' %r/l items
Problem: A custom 'statuscolumn' needs to check a bunch of options and placed signs to replicate the default number column. Solution: Rework %l item to include the necessary logic to mimic the default number column. Remove now redundant %r item.
Diffstat (limited to 'runtime/lua/vim/_meta/options.lua')
-rw-r--r--runtime/lua/vim/_meta/options.lua10
1 files changed, 3 insertions, 7 deletions
diff --git a/runtime/lua/vim/_meta/options.lua b/runtime/lua/vim/_meta/options.lua
index 155c93726b..befb56d3d5 100644
--- a/runtime/lua/vim/_meta/options.lua
+++ b/runtime/lua/vim/_meta/options.lua
@@ -6373,8 +6373,7 @@ vim.go.sol = vim.go.startofline
--- Some of the items from the 'statusline' format are different for
--- 'statuscolumn':
---
---- %l line number of currently drawn line
---- %r relative line number of currently drawn line
+--- %l line number column for currently drawn line
--- %s sign column for currently drawn line
--- %C fold column for currently drawn line
---
@@ -6403,11 +6402,8 @@ vim.go.sol = vim.go.startofline
--- Examples:
---
--- ```vim
---- " Relative number with bar separator and click handlers:
---- set statuscolumn=%@SignCb@%s%=%T%@NumCb@%r│%T
----
---- " Right aligned relative cursor line number:
---- let &stc='%=%{v:relnum?v:relnum:v:lnum} '
+--- " Line number with bar separator and click handlers:
+--- set statuscolumn=%@SignCb@%s%=%T%@NumCb@%l│%T
---
--- " Line numbers in hexadecimal for non wrapped part of lines:
--- let &stc='%=%{v:virtnum>0?"":printf("%x",v:lnum)} '