diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2026-07-21 18:43:55 +0200 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2026-07-24 13:05:20 +0200 |
| commit | f8cfd7f06ae87d47aac04ddce860b302f7820858 (patch) | |
| tree | 81f4a5ad3b3be3cf59d38207488993fb0ae38f89 /scripts/linterrcodes.lua | |
| parent | 5d76b9836a7c7d49d15bf5530826b7783d098cf4 (diff) | |
| download | rneovim-f8cfd7f06ae87d47aac04ddce860b302f7820858.tar.gz rneovim-f8cfd7f06ae87d47aac04ddce860b302f7820858.tar.bz2 rneovim-f8cfd7f06ae87d47aac04ddce860b302f7820858.zip | |
feat(options): schema, "dict" options, messages
Problem:
Options parsing is still painful for dict-style options.
Solution:
schema-maxxing => better `opt:get()` (will be the basis for `vim.o()`),
unified (and more-detailed) err msgs.
- Drop bespoke structure-builder in `_core/options.lua`.
- Define `schema` for all non-primitive options (except 'guicursor' and
statusline-style options); generate reified keysets `OptKeyDict`).
- Generate 'fillchars' => `fcs_tab`, 'listchars' => `lcs_tab`.
- `nvim_set_option_value`:
- Return the improved structures. Also from `vim.opt.x:get()`.
- Eliminate api <=> lua roundtrip, centralize option structure
handling.
- Improve/unify errors.
- Bump ERR_BUFLEN 80 → 256 so the "one of" list isn't truncated.
- Eliminate old 'diffopt' order-dependence (`iwhiteall` before `iwhite`)
Error samples:
Typed-key path (opt_strings_check → diffopt/mousescroll/breakindentopt):
E474: Unknown item 'foo'
E474: 'context' requires a number
E474: 'ver' number is out of range
E474: 'algorithm' must be one of: myers, minimal, patience, histogram
E474: 'filler' does not take a value
Related:
- #31084
- #34661
- #31820
- #14739
- #20107
- fix #18875
- :get() returns `{ sbr = true, shift = '3' }` (reified-keyset) instead of `{'sbr', 'shift:3'}`
- Setting via table now works too. `object_as_optval_for` `is_map` now recognizes struct options.
- fix #30296
- instead of `E474: Invalid argument`, errors now look like:
```
E474: Invalid value 'x', expected one of: single, double: ambiwidth=x
E474: Unknown item 'foo': diffopt=foo
E474: 'context' requires a number: diffopt=context:x
```
simplify `win_float_parse_option` from #26799.
Diffstat (limited to 'scripts/linterrcodes.lua')
| -rw-r--r-- | scripts/linterrcodes.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/linterrcodes.lua b/scripts/linterrcodes.lua index 3242d3ea23..06286db28d 100644 --- a/scripts/linterrcodes.lua +++ b/scripts/linterrcodes.lua @@ -33,7 +33,7 @@ local dup_allowed = { E317 = 4, E319 = 2, E423 = 3, - E474 = 52, + E474 = 59, E475 = 6, E482 = 3, E484 = 2, |