summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/_meta/api.lua
AgeCommit message (Collapse)AuthorFiles
2026-04-14fix(lua): not obvious which _meta/ files are generated #39035Justin M. Keyes1
Problem: - Not obvious which _meta/ are generated and which should be edited manually. - The require guard (`error('Cannot require a meta file')`) is not consistently present in all meta files. Solution: - Update headers. - Add require() guard to all meta files. - Rename generated meta files with `.gen.lua`.
2026-04-13feat(api): rename buffer to buf in retval #38900Justin M. Keyes1
In 3a4a66017b74192caaf9af9af172bdc08e0c1608, 4d3a67cd620152d11ab9b5f5bdd973f84cc2d44b we renamed "buffer" to "buf" in dict parameters. This commit also renames such keys in dict return-values.
2026-04-12feat(api): nvim_set_hl can set "font" #37668glepnir1
Problem: Cannot set highlight group fonts via API, only via :highlight command. Solution: Add font parameter in nvim_set_hl().
2026-04-12fix(api): nvim_get_hl drops groups defined with link_global #38492glepnir1
Problem: hlgroup2dict passes &ns_id to ns_get_hl twice. The first call (link=true) sets *ns_hl = 0 when link_global is set, so the second call and the sg_cleared guard both see ns_id == 0 and bail out. The group is silently dropped from the result. Solution: use a temporary copy of ns_id for each ns_get_hl call so the original value is preserved.
2026-04-08feat(api): rename buffer to buf #35330Jordan1
Problem: `:help dev-name-common` states that "buf" should be used instead of "buffer" but there are cases where buffer is mentioned in the lua API. Solution: - Rename occurrences of "buffer" to "buf" for consistency with the documentation. - Support (but deprecate) "buffer" for backwards compatibility. Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2026-04-08docs(api): nvim_exec_autocmds() default "pattern"Sean Dewar1
Problem: nvim_exec_autocmds() documentation incorrectly describes the default for "pattern" as *, when it's actually the current file name (like :doautocmd). Solution: correct it. Add a test.
2026-03-28docs: news #38464Justin M. Keyes1
2026-03-27feat(progress): set Progress-event pattern to "source" #38495Shadman1
Problem: Currently, there's no way to distinguish progress messages coming from different sources. Nor can Progress event be easily filtered based on source. Solution: - Add "source" field to nvim_echo-opts. - The Progress event pattern is now defined by the "source" field. - Include the "title" as ev.data. - Unrelated change: set force=false to disable nesting.
2026-03-25feat(api): nvim_set_hl{update:boolean} #37546glepnir1
Problem: nvim_set_hl always replaces all attributes. Solution: Add update field. When true, merge with existing attributes instead of replacing. Unspecified attributes are preserved. If highlight group doesn't exist, falls back to reset mode.
2026-03-24docs: api, plugins, ui2Justin M. Keyes1
2026-03-23fix(lua): drop support for boolean `buf` in `vim.keymap` #38432skewb1k1
Problem: `vim.keymap.*.Opts.buf` allows `boolean` aliases for more widely used `integer?` values, `true` -> `0` and `false` -> `nil`. This conversion is unnecessary and can be handled at call sites. Solution: As a follow-up to deprecating the `buffer` option, drop support for boolean values for the new `buf` option. The deprecated `buffer` continues to support booleans for backward compatibility.
2026-03-21feat(lua): replace `buffer` with `buf` in vim.keymap.set/del #38360skewb1k1
The `buffer` option remains functional but is now undocumented. Providing both will raise an error. Since providing `buf` was disallowed before, there is no code that will break due to using `buffer` alongside `buf`.
2026-03-17docs: api, lsp, messages, intro #38327Justin M. Keyes1
2026-03-16fix(api): use standard error messagesJustin M. Keyes1
2026-03-16docs: miscJustin M. Keyes1
2026-03-16fix(api): nvim_open_tabpage positional "enter"Sean Dewar1
Problem: nvim_open_tabpage's "enter" argument is optional, which is inconsistent with nvim_open_win. Solution: make it a (non-optional) positional argument, like nvim_open_win. Also change "enter"'s description to be more like nvim_open_win's doc.
2026-03-16fix(api): nvim_open_tabpage "after" like :[count]tabSean Dewar1
Problem: "after" in nvim_open_tabpage is inconsistent with how a count works with :tab, :tabnew, etc. Plus, the name "after" implies it's inserted after that number. Solution: internally offset by 1. Allow negative numbers to mean after current. Hmm, should we even reserve sentinels for after current? Callers can probably just use nil...
2026-03-16fix: nvim_open_tabpage cleanup, fixes, more testsSean Dewar1
- Cleanup, remove redundant comments, add more tests. - Enhance win_new_tabpage rather than create a new function for !enter, and use a different approach that minimizes side-effects. Return the tabpage_T * and first win_T * it allocated. - Disallow during textlock, like other APIs that open windows. - Remove existing win_alloc_firstwin error handling from win_new_tabpage; it's not needed, and looks incorrect. (enter_tabpage is called for curtab, which is not the old tabpage! Plus newtp is not freed) - Fix checks after creating the tabpage: - Don't fail if buf wasn't set successfully; the tab page may still be valid regardless. Set buffer like nvim_open_win, possibly blocking Enter/Leave events. (except BufWinEnter) - tp_curwin may not be the initial window opened by win_new_tabpage. Use the win_T * it returns instead, which is the real first window it allocated, regardless of autocmd shenanigans. - Properly check whether tab page was freed; it may have also been freed before win_set_buf. Plus, it may not be safe to read its handle!
2026-03-16feat(api): add nvim_open_tabpageWill Hopkins1
Problem: no API function for opening a new tab page and returning its handle, or to open without entering. Solution: add nvim_open_tabpage.
2026-03-14fix(api): relax config validation for "win"Sean Dewar1
Problem: only possible to move floats between tabpages if relative=win, which has the restrictive effect of also anchoring it to the target window. Solution: allow "win" without "relative" or "split"/"vertical". Only assume missing "win" is 0 if relative=win is given to maintain that behaviour. (or when configuring a new window) Also add an error when attempting to change a split into a float that's in another tabpage, as this isn't actually supported yet. (until the next commit) Maybe this could do with some bikeshedding. Unclear if "win" should require "relative" to be given, like with "row"/"col"; this can be annoying though as specifying "relative" requires other fields to be given too.
2026-03-13docs: miscJustin M. Keyes1
2026-03-11docs: miscJustin M. Keyes1
Close #37458 Close #37838 Close #37840 Close #37872 Close #37890 Close #38016 Close #38051 Close #38189 Close #38225 Close #38243 Close #38250 Co-authored-by: Colin Kennedy <colinvfx@gmail.com> Co-authored-by: "Mike J. McGuirk" <mike.j.mcguirk@gmail.com> Co-authored-by: Austin Rambo <ramboaustin13@gmail.com> Co-authored-by: Jonathan Birk <1965620+cafce25@users.noreply.github.com> Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com> Co-authored-by: Mike Smith <10135646+mikesmithgh@users.noreply.github.com> Co-authored-by: Saad Nadeem <saadndm.sn@gmail.com> Co-authored-by: brianhuster <phambinhanctb2004@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Yi Ming <ofseed@foxmail.com>
2026-03-11docs: api, messages, lsp, trustJustin M. Keyes1
gen_vimdoc.lua: In prepare for the upcoming release, comment-out the "Experimental" warning for prerelease features.
2026-03-10feat(terminal): surface exit code via virttext + nvim_get_chan_info #37987Ayaan1
Problem: When a terminal process exits, "[Process Exited]" text is added to the buffer contents. Solution: - Return `exitcode` field from `nvim_get_chan_info`. - Show it in the default 'statusline'. - Show exitcode as virtual text in the terminal buffer.
2026-03-09feat(extmark): support end_col=-1 if strict=false #28169Stefan Novaković1
Problem: There is an inconsistency between extmarks/highlights regarding the `end_col` param. Solution: Allow end_col=-1 to mean "end of line" (if strict=false). Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2026-03-06docs(api): clarify nvim_win_set_buf documentation #37201Marc Jakobi1
2026-03-03fix(api): return "style" in nvim_win_get_config() #38122Sean Dewar1
Problem: nvim_win_get_config() does not return a window's "style". Solution: always include it, and document `style=""`. Always included so it can be used reciprocally with nvim_open_win() or nvim_win_set_config(). (otherwise the config of a window with kWinStyleUnused will not unset the kWinStyleMinimal style of another window if passed to nvim_win_set_config, for example)
2026-02-23docs(api): nvim_open_win "split" with negative "win" #38032Sean Dewar1
Acts like :topleft/botright.
2026-02-21docs: highlight, terminal SGR #37998Justin M. Keyes1
2026-02-20feat(highlight): support more SGR attributes #37901Riccardo Mazzarini1
Problem: TUI does not support several standard SGR text attributes: - dim/faint (SGR 2) - blink (SGR 5) - conceal (SGR 8) - overline (SGR 53) This means that when a program running in the embedded terminal emits one of these escape codes, we drop it and don't surface it to the outer terminal. Solution: - Add support for those attributes. - Also add corresponding flags to `nvim_set_hl` opts, so users can set these attributes in highlight groups. - refactor(highlight): widen `HlAttrFlags` from `int16_t` to `int32_t` Widen the `rgb_ae_attr` and `cterm_ae_attr` fields in HlAttrs from int16_t to int32_t to make room for new highlight attribute flags, since there was only one spare bit left. - The C flag is named HL_CONCEALED to avoid colliding with the existing HL_CONCEAL in syntax.h (which is a syntax group flag, not an SGR attribute). - Also note that libvterm doesn't currently support the dim and overline attributes, so e.g. `printf '\e[2mThis should be dim\n'` and `printf '\e[53mThis should have an overline\n'` are still not rendered correctly when run from the embedded terminal.
2026-01-26docs: nvim_set_hl fg_index, bg_indexed #37534glepnir1
2026-01-07docs: misc (#37280)zeertzjq1
Close #36806 Close #36812 Close #37003 Close #37016 Close #37038 Close #37039 Close #37157 Close #37185 Close #37213 Co-authored-by: saroj_r <sarojregmi.official@gmail.com> Co-authored-by: Olivia Kinnear <git@superatomic.dev> Co-authored-by: Igor <igorlfs@ufmg.br> Co-authored-by: Justin Roberts <JustinEdwardLeo@gmail.com> Co-authored-by: "Mike J. McGuirk" <mike.j.mcguirk@gmail.com> Co-authored-by: Aymen Hafeez <49293546+aymenhafeez@users.noreply.github.com> Co-authored-by: Peter Cardenas <16930781+PeterCardenas@users.noreply.github.com> Co-authored-by: DrNayak2306 <dhruvgnk.work@gmail.com>
2025-12-06docs: miscJustin M. Keyes1
fix https://github.com/neovim/neovim.github.io/issues/419 Co-authored-by: Rob Pilling <robpilling@gmail.com>
2025-11-26feat(float): 'statusline' in floating windows #36521glepnir1
Problem: Can't show 'statusline' in floating windows. Solution: Use window-local 'statusline' to control floating window statusline visibility.
2025-11-22docs: misc, build, lspJustin M. Keyes1
2025-11-18feat(api): nvim_win_set_config accepts unchanged "noautocmd" #36463glepnir1
Problem: Cannot reuse same config with noautocmd for both window creation and updates, even when value is unchanged. Solution: Only reject noautocmd changes for existing windows.
2025-11-16docs: misc #36580Justin M. Keyes1
Co-authored-by: nguyenkd27 <nguyenkd27@gmail.com> Co-authored-by: dundargoc <gocdundar@gmail.com> Co-authored-by: Yochem van Rosmalen <git@yochem.nl> Co-authored-by: Tuure Piitulainen <tuure.piitulainen@gmail.com> Co-authored-by: Maria Solano <majosolano99@gmail.com> Co-authored-by: tao <2471314@gmail.com>
2025-09-28docs: json, tests, lsp #35754Justin M. Keyes1
Close #35926 Close #35818 Co-authored-by: skewb1k <skewb1kunix@gmail.com> Co-authored-by: glepnir <glephunter@gmail.com>
2025-09-15docs: optionlinks don't need the bars #35777Yochem van Rosmalen1
Problem: Options links work even without vertical bars around them due to their single quotes: the bars are unnecessary. Solution: Remove them.
2025-09-13feat(ui): support grid=0 in nvim_input_mouse #32535fredizzimo1
Problem: Multigrid UIs have to find out which window to send the input by using the Nvim focus rules, which are not fully documented. Furthermore,`getmousepos()` has several problems when multigrid is enabled, with the main one being that screenrow and screencol are window relative instead of screen relative, due to the fact that the UI don't send any absolute coordinates. Solution: Allow passing 0 as grid to `nvim_input_mouse`, with absolute coordinates, which lets nvim determine the actual window to send the mouse input to. This works as long as nvim is in charge of the window positioning. If the UI repositions or resizes the windows, it can still pass the grid it determines like before.
2025-09-09perf(highlight): allow decoration providers to skip ranges without databfredl1
Continuing the work of #31400 That PR allowed the provider to be invoked multiple times per line. We want only to do that when there actually is more data later on the line. Additionally, we want to skip over lines which contain no new highlight items. The TS query cursor already tells us what the next position with more data is, so there is no need to reinvoke the range callback before that. NB: this removes the double buffering introduced in #32619 which is funtamentally incompatible with this (nvim core is supposed to keep track of long ranges by itself, without requiring a callback reinvoke blitz). Need to adjust the priorities some other way to fix the same issue.
2025-09-06fix(types): nvim_get_win_config return type #35639Lewis Russell1
2025-09-06docs: `details` dict in nvim_buf_get_extmark() #35289Phạm Bình An1
Problem: The document of nvim_buf_get_extmark currently lacks the following: - "details" directory: nvim_buf_get_extmarks() allows an option details to get a "details" directory in result, but it doesn't mention where that "details" directory is, what fields does it have. Solution: Add docs for "details" directory in nvim_buf_get_extmarks()
2025-09-03docs: lsp, miscJustin M. Keyes1
- Problem: It's not clear for new plugin developers that `:help` uses a help-tags file for searching the docs, generated by `:helptags`. - Solution: Hint to the |:helptags| docs for regenerating the tags file for their freshly written documentation. Co-authored-by: Yochem van Rosmalen <git@yochem.nl>
2025-08-28perf: add on_range in treesitter highlightingvanaigr1
2025-08-26feat(api): nvim_echo can emit Progress messages/events #34846Shadman1
Problem: Nvim does not have a core concept for indicating "progress" of long-running tasks. The LspProgress event is specific to LSP. Solution: - `nvim_echo` can emit `kind="progress"` messages. - Emits a `Progress` event. - Includes new fields (id, status, percent) in the `msg_show` ui-event. - The UI is expected to overwrite any message having the same id. - Messages have a globally unique ID. - `nvim_echo` returns the message ID. - `nvim_echo(… {id=…})` updates existing messages. Example: local grp = vim.api.nvim_create_augroup("Msg", {clear = true}) vim.api.nvim_create_autocmd('Progress', { pattern={"term"}, group = grp, callback = function(ev) print(string.format('event fired: %s', vim.inspect(ev))..'\n') end }) -- require('vim._extui').enable({enable=true, msg={target='msg', timeout=1000}}) vim.api.nvim_echo({{'searching'}}, true, {kind='progress', percent=80, status='running', title="terminal(ripgrep)"}) local id = vim.api.nvim_echo({{'searching'}}, true, {kind='progress', status='running', percent=10, title="terminal(ripgrep)"}) vim.api.nvim_echo({}, true, {id = id, kind='progress', percent=20, status = 'running', title='find tests'}) vim.api.nvim_echo({}, true, {id = id, kind='progress', status='running', percent=70}) vim.api.nvim_echo({{'complete'}}, true, {id = id, kind='progress', status='success', percent=100, title="find tests"}) Followups: - Integrate with 'statusline' by listening to the Progress autocmd event. - Integrate progress ui-event with `vim._extui`.
2025-08-24docs: misc #35459Justin M. Keyes1
2025-08-22feat(tui): add nvim_ui_send (#35406)Gregory Anders1
This function allows the Nvim core to write arbitrary data to a TTY connected to a UI's stdout.
2025-07-28docs: lsp, ui events, dev guidance, osc7Justin M. Keyes1
fix #34981
2025-07-12docs(autocmd): generate events enum type #34883luukvbaal1