refactor(options): generic expand and did_set callbacks (#32011)

* refactor(options): generic expand and did_set callbacks

Problem:

Many options have similar callbacks to check the values are valid.

Solution:

Generalize these callbacks into a single function that reads the option
table.

* refactor: gen_options.lua

refactor: gen_options.lua - inline get_cond

* refactor(options): use a simpler format for the common default
This commit is contained in:
Lewis Russell
2025-01-16 20:53:17 +00:00
committed by GitHub
parent 92d3bf101d
commit fb564ddff0
7 changed files with 847 additions and 1375 deletions

View File

@@ -4947,7 +4947,7 @@ vim.wo.rl = vim.wo.rightleft
--- This is useful for languages such as Hebrew, Arabic and Farsi.
--- The 'rightleft' option must be set for 'rightleftcmd' to take effect.
---
--- @type 'search'
--- @type string
vim.o.rightleftcmd = "search"
vim.o.rlc = vim.o.rightleftcmd
vim.wo.rightleftcmd = vim.o.rightleftcmd