diff options
Diffstat (limited to 'runtime/doc/ui.txt')
-rw-r--r-- | runtime/doc/ui.txt | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/runtime/doc/ui.txt b/runtime/doc/ui.txt index 5685979c82..3110d0817c 100644 --- a/runtime/doc/ui.txt +++ b/runtime/doc/ui.txt @@ -28,12 +28,14 @@ with these (optional) keys: - `rgb` Decides the color format. - true: (default) 24-bit RGB colors - false: Terminal colors (8-bit, max 256) + *ui-override* - `override` Decides how UI capabilities are resolved. - true: Enable requested UI capabilities, even if not supported by all connected UIs (including |TUI|). - false: (default) Disable UI capabilities not supported by all connected UIs (including TUI). + *ui-ext-options* - `ext_cmdline` Externalize the cmdline. |ui-cmdline| - `ext_hlstate` Detailed highlight state. |ui-hlstate| @@ -54,6 +56,8 @@ with these (optional) keys: - `stdin_fd` Read buffer from `fd` as if it was a stdin pipe This option can only used by |--embed| ui, see |ui-startup-stdin|. + `stdin_tty` Tells if `stdin` is a `tty` or not. + `stdout_tty` Tells if `stdout` is a `tty` or not. Specifying an unknown option is an error; UIs can check the |api-metadata| `ui_options` key for supported options. @@ -117,7 +121,7 @@ for forward-compatibility. |api-contract| UI startup *ui-startup* UI embedders (clients that start Nvim with |--embed| and later call -|nvim_ui_attach()|) must start Nvim without |--headless|: > +|nvim_ui_attach()|) must start Nvim without |--headless|: >bash nvim --embed Nvim will pause before loading startup files and reading buffers, so the UI has a chance to invoke requests and do early initialization. Startup will @@ -130,14 +134,18 @@ procedure: 1. Invoke |nvim_get_api_info()|, if needed to setup the client library and/or to get the list of supported UI extensions. + 2. Do any configuration that should be happen before user config is loaded. Buffers and windows are not available at this point, but this could be used to set |g:| variables visible to init.vim + 3. If the UI wants to do additional setup after user config is loaded, - register a VimEnter autocmd: > + register a VimEnter autocmd: >vim nvim_command("autocmd VimEnter * call rpcrequest(1, 'vimenter')") -<4. Now invoke |nvim_ui_attach()|. The UI must handle user input by now: + +4. Now invoke |nvim_ui_attach()|. The UI must handle user input by now: sourcing init.vim and loading buffers might lead to blocking prompts. + 5. If step 3 was used, Nvim will send a blocking "vimenter" request to the UI. Inside this request handler, the UI can safely do any initialization before entering normal mode, for example reading variables set by init.vim. @@ -316,6 +324,7 @@ numerical highlight ids to the actual attributes. `underdouble`: double underlined text. The lines have `special` color. `underdotted`: underdotted text. The dots have `special` color. `underdashed`: underdashed text. The dashes have `special` color. + `altfont`: alternative font. `blend`: Blend level (0-100). Could be used by UIs to support blending floating windows to the background or to signal a transparent cursor. @@ -716,7 +725,7 @@ For command-line 'wildmenu' UI events, activate |ui-popupmenu|. ["cmdline_block_show", lines] ~ Show a block of context to the current command line. For example if - the user defines a |:function| interactively: > + the user defines a |:function| interactively: >vim :function Foo() : echo "foo" : |