diff options
Diffstat (limited to 'runtime/doc/ui.txt')
-rw-r--r-- | runtime/doc/ui.txt | 68 |
1 files changed, 67 insertions, 1 deletions
diff --git a/runtime/doc/ui.txt b/runtime/doc/ui.txt index c6a06a4531..84a24ef2a1 100644 --- a/runtime/doc/ui.txt +++ b/runtime/doc/ui.txt @@ -32,6 +32,7 @@ a dictionary with these (optional) keys: `ext_tabline` Externalize the tabline. |ui-tabline| `ext_cmdline` Externalize the cmdline. |ui-cmdline| `ext_wildmenu` Externalize the wildmenu. |ui-wildmenu| + `ext_messages` Externalize messages. |ui-messages| `ext_linegrid` Use new revision of the grid events. |ui-linegrid| `ext_multigrid` Use per-window grid based events. |ui-multigrid| `ext_hlstate` Use detailed highlight state. |ui-hlstate| @@ -572,7 +573,7 @@ Only sent if `ext_tabline` option is set in |ui-options| ============================================================================== Cmdline Events *ui-cmdline* -Only sent if `ext_cmdline` option is set in |ui-options| +Only sent if `ext_cmdline` option is set in |ui-options|. ["cmdline_show", content, pos, firstc, prompt, indent, level] content: List of [attrs, string] @@ -645,4 +646,69 @@ Only sent if `ext_wildmenu` option is set in |ui-options| Hide the wildmenu. ============================================================================== +Message Events *ui-messages* + +Only sent if `ext_messages` option is set in |ui-options|. This option implies +`ext_linegrid` and `ext_cmdline` also being set. |ui-linegrid| and |ui-cmdline| events +will thus also be sent. + +This extension allows the UI to control the display of messages that otherwise +would have been displayed in the message/cmdline area in the bottom of the +screen. + +Activating this extension means that Nvim will allocate no screen space for +the cmdline or messages, and 'cmdheight' will be set to zero. Attempting to +change 'cmdheight' will silently be ignored. |ui-cmdline| events will be used +to represent the state of the cmdline. + +["msg_show", kind, content, replace_last] + Display a message to the user. + + `kind` will be one of the following + `emsg`: Internal error message + `echo`: temporary message from plugin (|:echo|) + `echomsg`: ordinary message from plugin (|:echomsg|) + `echoerr`: error message from plugin (|:echoerr|) + `return_prompt`: |press-enter| prompt after a group of messages + `quickfix`: Quickfix navigation message + `kind` can also be the empty string. The message is then some internal + informative or warning message, that hasn't yet been assigned a kind. + New message kinds can be added in later versions; clients should + handle messages of an unknown kind just like empty kind. + + `content` will be an array of `[attr_id, text_chunk]` tuples, + building up the message text of chunks of different highlights. + No extra spacing should be added between chunks, the `text_chunk` by + itself should contain any necessary whitespace. Messages can contain + line breaks `"\n"`. + + `replace_last` controls how multiple messages should be displayed. + If `replace_last` is false, this message should be displayed together + with all previous messages that are still visible. If `replace_last` + is true, this message should replace the message in the most recent + `msg_show` call, but any other visible message should still remain. + +["msg_clear"] + Clear all messages currently displayed by "msg_show". (Messages sent + by other "msg_" events below will not be affected). + +["msg_showmode", content] + Shows 'showmode' and |recording| messages. `content` has the same + format as in "msg_show". This event is sent with empty `content` to + hide the last message. + +["msg_showcmd", content] + Shows 'showcmd' messages. `content` has the same format as in "msg_show". + This event is sent with empty `content` to hide the last message. + +["msg_ruler", content] + Used to display 'ruler' when there is no space for the ruler in a + statusline. `content` has the same format as in "msg_show". This event is + sent with empty `content` to hide the last message. + +["msg_history_show", entries] + Sent when |:messages| command is invoked. History is sent as a list of + entries, where each entry is a `[kind, content]` tuple. + +============================================================================== vim:tw=78:ts=8:noet:ft=help:norl: |