mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
docs: regenerate [skip ci]
This commit is contained in:
parent
e481901748
commit
45e666fb92
@ -855,7 +855,7 @@ nvim_exec_lua({code}, {args}) *nvim_exec_lua()*
|
|||||||
Return: ~
|
Return: ~
|
||||||
Return value of Lua code if present or NIL.
|
Return value of Lua code if present or NIL.
|
||||||
|
|
||||||
nvim_feedkeys({keys}, {mode}, {escape_csi}) *nvim_feedkeys()*
|
nvim_feedkeys({keys}, {mode}, {escape_ks}) *nvim_feedkeys()*
|
||||||
Sends input-keys to Nvim, subject to various quirks controlled
|
Sends input-keys to Nvim, subject to various quirks controlled
|
||||||
by `mode` flags. This is a blocking call, unlike
|
by `mode` flags. This is a blocking call, unlike
|
||||||
|nvim_input()|.
|
|nvim_input()|.
|
||||||
@ -863,23 +863,25 @@ nvim_feedkeys({keys}, {mode}, {escape_csi}) *nvim_feedkeys()*
|
|||||||
On execution error: does not fail, but updates v:errmsg.
|
On execution error: does not fail, but updates v:errmsg.
|
||||||
|
|
||||||
To input sequences like <C-o> use |nvim_replace_termcodes()|
|
To input sequences like <C-o> use |nvim_replace_termcodes()|
|
||||||
(typically with escape_csi=true) to replace |keycodes|, then
|
(typically with escape_ks=false) to replace |keycodes|, then
|
||||||
pass the result to nvim_feedkeys().
|
pass the result to nvim_feedkeys().
|
||||||
|
|
||||||
Example: >
|
Example: >
|
||||||
:let key = nvim_replace_termcodes("<C-o>", v:true, v:false, v:true)
|
:let key = nvim_replace_termcodes("<C-o>", v:true, v:false, v:true)
|
||||||
:call nvim_feedkeys(key, 'n', v:true)
|
:call nvim_feedkeys(key, 'n', v:false)
|
||||||
<
|
<
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
{keys} to be typed
|
{keys} to be typed
|
||||||
{mode} behavior flags, see |feedkeys()|
|
{mode} behavior flags, see |feedkeys()|
|
||||||
{escape_csi} If true, escape K_SPECIAL/CSI bytes in
|
{escape_ks} If true, escape K_SPECIAL bytes in `keys`
|
||||||
`keys`
|
This should be false if you already used
|
||||||
|
|nvim_replace_termcodes()|, and true
|
||||||
|
otherwise.
|
||||||
|
|
||||||
See also: ~
|
See also: ~
|
||||||
feedkeys()
|
feedkeys()
|
||||||
vim_strsave_escape_csi
|
vim_strsave_escape_ks
|
||||||
|
|
||||||
nvim_get_all_options_info() *nvim_get_all_options_info()*
|
nvim_get_all_options_info() *nvim_get_all_options_info()*
|
||||||
Gets the option information for all options.
|
Gets the option information for all options.
|
||||||
@ -1538,14 +1540,13 @@ nvim_set_current_win({window}) *nvim_set_current_win()*
|
|||||||
Parameters: ~
|
Parameters: ~
|
||||||
{window} Window handle
|
{window} Window handle
|
||||||
|
|
||||||
nvim_set_hl({ns_id}, {name}, {val}) *nvim_set_hl()*
|
nvim_set_hl({ns_id}, {name}, {*val}) *nvim_set_hl()*
|
||||||
Set a highlight group.
|
Set a highlight group.
|
||||||
|
|
||||||
TODO: ns_id = 0, should modify :highlight namespace TODO val
|
|
||||||
should take update vs reset flag
|
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
{ns_id} number of namespace for this highlight
|
{ns_id} number of namespace for this highlight. Use value
|
||||||
|
0 to set a highlight group in the global (
|
||||||
|
`:highlight` ) namespace.
|
||||||
{name} highlight group name, like ErrorMsg
|
{name} highlight group name, like ErrorMsg
|
||||||
{val} highlight definition map, like
|
{val} highlight definition map, like
|
||||||
|nvim_get_hl_by_name|. in addition the following
|
|nvim_get_hl_by_name|. in addition the following
|
||||||
|
@ -1225,8 +1225,8 @@ on_publish_diagnostics({_}, {result}, {ctx}, {config})
|
|||||||
},
|
},
|
||||||
-- Use a function to dynamically turn signs off
|
-- Use a function to dynamically turn signs off
|
||||||
-- and on, using buffer local variables
|
-- and on, using buffer local variables
|
||||||
signs = function(bufnr, client_id)
|
signs = function(namespace, bufnr)
|
||||||
return vim.bo[bufnr].show_signs == false
|
return vim.b[bufnr].show_signs == true
|
||||||
end,
|
end,
|
||||||
-- Disable a feature
|
-- Disable a feature
|
||||||
update_in_insert = false,
|
update_in_insert = false,
|
||||||
|
@ -1763,6 +1763,13 @@ Lua module: ui *lua-ui*
|
|||||||
input({opts}, {on_confirm}) *vim.ui.input()*
|
input({opts}, {on_confirm}) *vim.ui.input()*
|
||||||
Prompts the user for input
|
Prompts the user for input
|
||||||
|
|
||||||
|
Example: >
|
||||||
|
|
||||||
|
vim.ui.input({ prompt = 'Enter value for shiftwidth: ' }, function(input)
|
||||||
|
vim.o.shiftwidth = tonumber(input)
|
||||||
|
end)
|
||||||
|
<
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
{opts} table Additional options. See |input()|
|
{opts} table Additional options. See |input()|
|
||||||
• prompt (string|nil) Text of the prompt.
|
• prompt (string|nil) Text of the prompt.
|
||||||
@ -1786,6 +1793,22 @@ select({items}, {opts}, {on_choice}) *vim.ui.select()*
|
|||||||
Prompts the user to pick a single item from a collection of
|
Prompts the user to pick a single item from a collection of
|
||||||
entries
|
entries
|
||||||
|
|
||||||
|
Example: >
|
||||||
|
|
||||||
|
vim.ui.select({ 'tabs', 'spaces' }, {
|
||||||
|
prompt = 'Select tabs or spaces:',
|
||||||
|
format_item = function(item)
|
||||||
|
return "I'd like to choose " .. item
|
||||||
|
end,
|
||||||
|
}, function(choice)
|
||||||
|
if choice == 'spaces' then
|
||||||
|
vim.o.expandtab = true
|
||||||
|
else
|
||||||
|
vim.o.expandtab = false
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
<
|
||||||
|
|
||||||
Parameters: ~
|
Parameters: ~
|
||||||
{items} table Arbitrary items
|
{items} table Arbitrary items
|
||||||
{opts} table Additional options
|
{opts} table Additional options
|
||||||
|
Loading…
Reference in New Issue
Block a user