Home Explore Blog CI



neovim

53th chunk of `runtime/doc/api.txt`
f247b79e6092c78288554163d4382b5b350c549e0d348f9e00000001000008a0
 autocommand description.
        • event: (string) the autocommand event.
        • id: (integer) the autocommand id (only when defined with the API).
        • group: (integer) the autocommand group id.
        • group_name: (string) the autocommand group name.
        • once: (boolean) whether the autocommand is only run once.
        • pattern: (string) the autocommand pattern. If the autocommand is
          buffer local |autocmd-buffer-local|:


==============================================================================
UI Functions                                                          *api-ui*

nvim_ui_attach({width}, {height}, {options})                *nvim_ui_attach()*
    Activates UI events on the channel.

    Entry point of all UI clients. Allows |--embed| to continue startup.
    Implies that the client is ready to show the UI. Adds the client to the
    list of UIs. |nvim_list_uis()|

    Note: ~
      • If multiple UI clients are attached, the global screen dimensions
        degrade to the smallest client. E.g. if client A requests 80x40 but
        client B requests 200x100, the global screen has size 80x40.

    Attributes: ~
        |RPC| only
        Since: 0.1.0

    Parameters: ~
      • {width}    Requested screen columns
      • {height}   Requested screen rows
      • {options}  |ui-option| map

nvim_ui_detach()                                            *nvim_ui_detach()*
    Deactivates UI events on the channel.

    Removes the client from the list of UIs. |nvim_list_uis()|

    Attributes: ~
        |RPC| only
        Since: 0.1.0

                                                    *nvim_ui_pum_set_bounds()*
nvim_ui_pum_set_bounds({width}, {height}, {row}, {col})
    Tells Nvim the geometry of the popupmenu, to align floating windows with
    an external popup menu.

    Note that this method is not to be confused with
    |nvim_ui_pum_set_height()|, which sets the number of visible items in the
    popup menu, while this function sets the bounding box of the popup menu,
    including visual elements such as borders and sliders. Floats need not use
    the same font size, nor be anchored to exact grid corners, so

Title: Neovim UI Functions: Attach, Detach, and Popup Menu Bounds
Summary
This section describes three Neovim UI functions. `nvim_ui_attach` activates UI events for a channel, specifying screen dimensions and UI options. `nvim_ui_detach` deactivates UI events, removing the client from the list of active UIs. Finally, `nvim_ui_pum_set_bounds` informs Neovim about the geometry of the popup menu, enabling proper alignment of floating windows.