feat(tui): add nvim_ui_send (#35406)

This function allows the Nvim core to write arbitrary data to a TTY
connected to a UI's stdout.
This commit is contained in:
Gregory Anders
2025-08-22 15:05:43 -05:00
committed by GitHub
parent 5d8e870c11
commit 586b1b2d9b
16 changed files with 161 additions and 13 deletions

View File

@@ -2340,6 +2340,14 @@ function vim.api.nvim_tabpage_set_var(tabpage, name, value) end
--- @param win integer `window-ID`, must already belong to {tabpage}
function vim.api.nvim_tabpage_set_win(tabpage, win) end
--- Sends arbitrary data to a UI.
---
--- This sends a "ui_send" event to any UI that has the "stdout_tty" `ui-option` set. UIs are
--- expected to write the received data to a connected TTY if one exists.
---
--- @param content string Content to write to the TTY
function vim.api.nvim_ui_send(content) end
--- Calls a function with window as temporary current window.
---
---