mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
ui: document new mode index and add note about forward-compatibility
This commit is contained in:
parent
7ea5c78687
commit
9cc9789681
@ -270,10 +270,14 @@ a dictionary with these (optional) keys:
|
|||||||
Defaults to false.
|
Defaults to false.
|
||||||
|
|
||||||
Nvim will then send msgpack-rpc notifications, with the method name "redraw"
|
Nvim will then send msgpack-rpc notifications, with the method name "redraw"
|
||||||
and a single argument, an array of screen updates (described below).
|
and a single argument, an array of screen updates (described below). These
|
||||||
These should be processed in order. Preferably the user should only be able to
|
should be processed in order. Preferably the user should only be able to see
|
||||||
see the screen state after all updates are processed (not any intermediate
|
the screen state after all updates in the same "redraw" event are processed
|
||||||
state after processing only a part of the array).
|
(not any intermediate state after processing only a part of the array).
|
||||||
|
|
||||||
|
Future versions of Nvim may add new update kinds and may append new parameters
|
||||||
|
to existing update kinds. Clients must be prepared to ignore such extensions
|
||||||
|
to be forward-compatible. |api-contract|
|
||||||
|
|
||||||
Screen updates are arrays. The first element a string describing the kind
|
Screen updates are arrays. The first element a string describing the kind
|
||||||
of update.
|
of update.
|
||||||
@ -387,10 +391,31 @@ of update.
|
|||||||
["update_menu"]
|
["update_menu"]
|
||||||
The menu mappings changed.
|
The menu mappings changed.
|
||||||
|
|
||||||
["mode_change", mode]
|
["mode_info_set", cursor_style_enabled, mode_info]
|
||||||
The mode changed. Currently sent when "insert", "replace", "cmdline" and
|
`mode_info` is an array containing information about various modes, as later
|
||||||
"normal" modes are entered. A client could for instance change the cursor
|
will be indicated with the `mode_change` update. Currently this primarily
|
||||||
shape.
|
concerns cursor styles to be set in the different modes. The keys are
|
||||||
|
|
||||||
|
`cursor_shape`: One of "block", "horizontal" or "vertical"
|
||||||
|
`cell_percentage`:Percentage of the cell taken by the cursor.
|
||||||
|
`blinkwait`, `blinkon`, `blinkoff`: see |cursor-blinking|.
|
||||||
|
`hl_id`: Highlight group for the cursor.
|
||||||
|
`hl_lm`: Highlight group for the cursor when langmap is active.
|
||||||
|
`short_name`: Short name for the mode, as used in 'guicursor'
|
||||||
|
option.
|
||||||
|
`name`: Full name for the mode.
|
||||||
|
`mouse_shape`: (To be implemented.)
|
||||||
|
|
||||||
|
Not all keys need to be present for all modes. `cursor_style_enabled` is a
|
||||||
|
boolean indicating if the ui should change the cursor style.
|
||||||
|
|
||||||
|
["mode_change", mode, mode_idx]
|
||||||
|
The mode changed. The first parameter `mode` is a string representing the
|
||||||
|
current mode. `mode_idx` is an index into the array received in the
|
||||||
|
`mode_info_set` event. UIs should change the cursor style according to the
|
||||||
|
properties specified in the corresponding item. The set of modes reported will
|
||||||
|
change in new versions of Nvim, for instance more submodes and temporary
|
||||||
|
states might be represented as separate modes.
|
||||||
|
|
||||||
["popupmenu_show", items, selected, row, col]
|
["popupmenu_show", items, selected, row, col]
|
||||||
When `popupmenu_external` is set to true, nvim will not draw the
|
When `popupmenu_external` is set to true, nvim will not draw the
|
||||||
|
Loading…
Reference in New Issue
Block a user