feat(api): nvim_set_option_value(operation=...) #39849

Problem:
`nvim_set_option_value` cannot "update" options similar to `:set opt=`,
`:set opt+=`, etc. The Lua impls of "vim.opt" / "vim.o" have incomplete,
bespoke reimplementations of those operations.

ref #38420

Solution:
- Add `operation` param to `nvim_set_option_value`, which may be "set",
  "append", "prepend", or "remove".
- Use this feature to implement `vim.opt` / `vim.o`.
This commit is contained in:
Kyle
2026-06-28 12:20:56 -05:00
committed by GitHub
parent a5aa62e37b
commit f34ee3da80
12 changed files with 598 additions and 243 deletions

View File

@@ -381,7 +381,9 @@ error('Cannot require a meta file')
--- @class vim.api.keyset.option
--- @field buf? integer
--- @field dry_run? boolean
--- @field filetype? string
--- @field operation? string
--- @field scope? string
--- @field tab? integer
--- @field win? integer