Skip to content

Commit

Permalink
docs: regenerate [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
marvim committed Feb 10, 2022
1 parent dba1df6 commit 04bd5f6
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 15 deletions.
27 changes: 14 additions & 13 deletions runtime/doc/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -855,31 +855,33 @@ nvim_exec_lua({code}, {args}) *nvim_exec_lua()*
Return: ~
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
by `mode` flags. This is a blocking call, unlike
|nvim_input()|.

On execution error: does not fail, but updates v:errmsg.

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().

Example: >
: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: ~
{keys} to be typed
{mode} behavior flags, see |feedkeys()|
{escape_csi} If true, escape K_SPECIAL/CSI bytes in
`keys`
{keys} to be typed
{mode} behavior flags, see |feedkeys()|
{escape_ks} If true, escape K_SPECIAL bytes in `keys`
This should be false if you already used
|nvim_replace_termcodes()|, and true
otherwise.

See also: ~
feedkeys()
vim_strsave_escape_csi
vim_strsave_escape_ks

nvim_get_all_options_info() *nvim_get_all_options_info()*
Gets the option information for all options.
Expand Down Expand Up @@ -1538,14 +1540,13 @@ nvim_set_current_win({window}) *nvim_set_current_win()*
Parameters: ~
{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.

TODO: ns_id = 0, should modify :highlight namespace TODO val
should take update vs reset flag

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
{val} highlight definition map, like
|nvim_get_hl_by_name|. in addition the following
Expand Down
4 changes: 2 additions & 2 deletions runtime/doc/lsp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1225,8 +1225,8 @@ on_publish_diagnostics({_}, {result}, {ctx}, {config})
},
-- Use a function to dynamically turn signs off
-- and on, using buffer local variables
signs = function(bufnr, client_id)
return vim.bo[bufnr].show_signs == false
signs = function(namespace, bufnr)
return vim.b[bufnr].show_signs == true
end,
-- Disable a feature
update_in_insert = false,
Expand Down
23 changes: 23 additions & 0 deletions runtime/doc/lua.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1763,6 +1763,13 @@ Lua module: ui *lua-ui*
input({opts}, {on_confirm}) *vim.ui.input()*
Prompts the user for input

Example: >
vim.ui.input({ prompt = 'Enter value for shiftwidth: ' }, function(input)
vim.o.shiftwidth = tonumber(input)
end)
<

Parameters: ~
{opts} table Additional options. See |input()|
• prompt (string|nil) Text of the prompt.
Expand All @@ -1786,6 +1793,22 @@ select({items}, {opts}, {on_choice}) *vim.ui.select()*
Prompts the user to pick a single item from a collection of
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: ~
{items} table Arbitrary items
{opts} table Additional options
Expand Down

0 comments on commit 04bd5f6

Please sign in to comment.