diff options
author | Famiu Haque <famiuhaque@protonmail.com> | 2022-04-20 17:02:18 +0600 |
---|---|---|
committer | Famiu Haque <famiuhaque@protonmail.com> | 2022-05-31 20:55:05 +0600 |
commit | 46536f53e82967dcac8d030ee3394cdb156f9603 (patch) | |
tree | 4444067831639a6a1eb1916ca9cd5002261932ec /src/nvim/api/vim.c | |
parent | e9803e1de6497ee21f77f45cf2670c2fe4e8ab22 (diff) | |
download | rneovim-46536f53e82967dcac8d030ee3394cdb156f9603.tar.gz rneovim-46536f53e82967dcac8d030ee3394cdb156f9603.tar.bz2 rneovim-46536f53e82967dcac8d030ee3394cdb156f9603.zip |
feat: add preview functionality to user commands
Adds a Lua-only `preview` flag to user commands which allows the command to be incrementally previewed like `:substitute` when 'inccommand' is set.
Diffstat (limited to 'src/nvim/api/vim.c')
-rw-r--r-- | src/nvim/api/vim.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nvim/api/vim.c b/src/nvim/api/vim.c index 5c3c16d6b0..8555d1bb71 100644 --- a/src/nvim/api/vim.c +++ b/src/nvim/api/vim.c @@ -2511,6 +2511,7 @@ Dictionary nvim_eval_statusline(String str, Dict(eval_statusline) *opts, Error * /// - desc: (string) Used for listing the command when a Lua function is used for /// {command}. /// - force: (boolean, default true) Override any previous definition. +/// - preview: (function) Preview callback for 'inccommand' |:command-preview| /// @param[out] err Error details, if any. void nvim_create_user_command(String name, Object command, Dict(user_command) *opts, Error *err) FUNC_API_SINCE(9) |