mirror of
https://github.com/neovim/neovim.git
synced 2025-10-08 10:56:31 +00:00
feat(nvim_create_user_command): pass structured modifiers to commands
Adds an `smods` key to `nvim_create_user_command` Lua command callbacks, which has command modifiers but in a structured format. This removes the need to manually parse command modifiers. It also reduces friction in using `nvim_cmd` inside a Lua command callback.
This commit is contained in:
@@ -2501,6 +2501,8 @@ Dictionary nvim_eval_statusline(String str, Dict(eval_statusline) *opts, Error *
|
||||
/// - count: (number) Any count supplied |<count>|
|
||||
/// - reg: (string) The optional register, if specified |<reg>|
|
||||
/// - mods: (string) Command modifiers, if any |<mods>|
|
||||
/// - smods: (table) Command modifiers in a structured format. Has the same
|
||||
/// structure as the "mods" key of |nvim_parse_cmd()|.
|
||||
/// @param opts Optional command attributes. See |command-attributes| for more details. To use
|
||||
/// boolean attributes (such as |:command-bang| or |:command-bar|) set the value to
|
||||
/// "true". In addition to the string options listed in |:command-complete|, the
|
||||
|
Reference in New Issue
Block a user