aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/ui
Commit message (Collapse)AuthorAge
* fix(lua): enable param-type-mismatch diagnosticLewis Russell2026-09-28
| | | | | | | | | Problem: Argument type mismatches are excluded from EmmyLua checks. Solution: Correct runtime annotations and calls, document local checker workarounds, and enable the diagnostic. AI-assisted
* fix(lua): enable unnecessary-assert diagnosticLewis Russell2026-09-28
| | | | AI-assisted
* fix(lua): add missing param annotations (#41911)Lewis Russell2026-09-15
|
* feat(health): rearrange vim.ui.img checks #40782Olivia Kinnear2026-07-17
|
* refactor(api): omit optional paramJustin M. Keyes2026-07-13
|
* fix(tty): filter terminal probes by channel #40356Barrett Ruth2026-06-24
| | | | | | | | | | | | | | | | | | | | Problem: Terminal probes sent with `nvim_ui_send()` can reach more than one stdout TTY UI. Probes with a known TTY UI owner should not accept `TermResponse`s from unrelated UI channels. Solution: Thread the existing `chan` filter through owned terminal probes. This covers startup/attach background detection, fallback truecolor detection, and `vim.tty.query()` forwarding opts to `vim.tty.request()`. Note: Not every terminal escape path is updated here. I only passed `chan` when the caller already knows which TTY UI owns the probe. For example, this does not include: - (Followup) OSC 52 (system clipboard) detection. It needs to capture the `UIEnter` channel. Adding `{ chan = ... }` only to the nested query would be half a fix. - OSC 52 _paste_ is left global because the provider callback does not have a UI channel (paste is invoked without a ui channel/tty ui object).
* refactor: introduce nvim_on internally #39883Justin M. Keyes2026-05-20
| | | | | | | | | Problem: `nvim_create_autocmd` is too verbose and its `callback` requires extra "nesting". Solution: Introduce `nvim_on`. Start using it internally. Then we can get a feel for how it should look before making it public.
* refactor(tty): tty.request() #39489Justin M. Keyes2026-04-30
| | | | | | | | Problem: - Various `TermRequest` handlers which all do similar things. - `tty.query` is specific to `XTGETTCAP DCS`, can't be reused for other kinds of terminal queries. Solution: Provide `tty.request()`.
* feat(img): vim.ui.img.del(math.huge) clears all images #39484Chip Senkbeil2026-04-29
| | | | | | | | | | | | Problem: Similar to clearmatches(), it's always necessary to provide a fallback that allows the user to do a "global reset" when something goes wrong. Solution: vim.img.del(math.huge) clears all images. Use kitty's d=A command to clear all placements in a single escape sequence rather than N individual deletes, also freeing stored image data not referenced by the scrollback buffer.
* feat(health): vim.ui.img healthcheck #39449Chip Senkbeil2026-04-28
|
* feat(ui): vim.ui.img api #37914Chip Senkbeil2026-04-26
| | | | | | | Problem: No builtin api to load and display images. Solution: Introduce vim.ui.img. Only supports kitty graphics protocol, currently.
* docs: use "ev" convention in event-handlersJustin M. Keyes2026-03-12
| | | | | | | | | Problem: In autocmd examples, using "args" as the event-object name is vague and may be confused with a user-command. Solution: Use "ev" as the conventional event-object name.
* feat(tui): add nvim_ui_send (#35406)Gregory Anders2025-08-22
| | | | This function allows the Nvim core to write arbitrary data to a TTY connected to a UI's stdout.
* fix: type fixesLewis Russell2025-06-06
| | | | Type fixes caught by emmylua
* feat(terminal)!: include cursor position in TermRequest event data (#31609)Gregory Anders2025-03-05
| | | | | | | | | | | | | | | | | | When a plugin registers a TermRequest handler there is currently no way for the handler to know where the terminal's cursor position was when the sequence was received. This is often useful information, e.g. for OSC 133 sequences which are used to annotate shell prompts. Modify the event data for the TermRequest autocommand to be a table instead of just a string. The "sequence" field of the table contains the sequence string and the "cursor" field contains the cursor position when the sequence was received. To maintain consistency between TermRequest and TermResponse (and to future proof the latter), TermResponse's event data is also updated to be a table with a "sequence" field. BREAKING CHANGE: event data for TermRequest and TermResponse is now a table
* fix(osc52): use nvim_chan_send() to stderr for copying (#26690)zeertzjq2023-12-21
| | | | | | | The data to be written can be very long, so use nvim_chan_send() instead of io.stdout:write() as the latter doesn't handle EAGAIN. A difference of these two approaches is that nvim_chan_send() writes to stderr, not stdout, so it won't work if client stderr is redirected.
* fix(osc52): use `p` for primary selection instead of `s` (#26076)Tomasz N2023-11-16
| | | Co-authored-by: Gregory Anders <greg@gpanders.com>
* feat(clipboard): enable OSC 52 clipboard provider by default (#26064)Gregory Anders2023-11-16
| | | | | | | | | | | | | Use the XTGETTCAP sequence to determine if the host terminal supports the OSC 52 sequence and, if it does, enable the OSC 52 clipboard provider by default. This is only done automatically when all of the following are true: 1. Nvim is running in the TUI 2. 'clipboard' is not set to unnamed or unnamedplus 3. g:clipboard is unset 4. Nvim is running in an SSH connection ($SSH_TTY is set) 5. Nvim is not running inside tmux ($TMUX is unset)
* refactor: vim.ui.clipboard #26040Justin M. Keyes2023-11-14
Problem: Platform-specific UI providers should live in `vim.ui.*`. #24164 Solution: - Move `vim.clipboard.osc52` module to `vim.ui.clipboard.osc52`. - TODO: move all of `clipboard.vim` to `vim.ui.clipboard`. ref #25872