summaryrefslogtreecommitdiffstatshomepage
path: root/runtime/lua/vim/_meta/api.lua
AgeCommit message (Collapse)AuthorFiles
2025-07-01fix: type of nvim_echoLewis Russell1
2025-06-26docs(api): document types using LuaCATS typesLewis Russell1
- Render Lua types in api.txt. - Added `DictAs(name)` API type which acts the same as `Dict` (no parens) when generating the dispatchers, but acts the same as `Dict(name)` when generating docs. - Added `Tuple(...)` API type which is the treated the as `Array` for generating the dispatchers, but is used to document richer types. - Added `Enum(...)` API type to better document enums - Improve typing of some API functions. - Improve c_grammar to properly parse API types and replace string pattern logic in the parsers. - Removed all the hardcoded type overrides in gen_eval_files.lua
2025-06-18docs: api, miscJustin M. Keyes1
2025-06-06fix: type fixesLewis Russell1
Type fixes caught by emmylua
2025-06-01docs: news, intro, lsp, api #33687Justin M. Keyes1
2025-05-27feat(api): set nvim_echo() kind for ext_messages (#33998)luukvbaal1
Problem: Unable to emit a message with arbitrary kind. Solution: Add a "kind" opts field to nvim_echo(). Use it to set the "list_cmd" kind for vim.show_pos().
2025-04-30feat(terminal): parse current buffer contents in nvim_open_term() (#33720)Gregory Anders1
When nvim_open_term() is called with a non-empty buffer, the buffer contents are piped into the PTY.
2025-04-29feat(ui): use builtin completion popupmenu with ext_cmdline (#31269)luukvbaal1
Problem: UIs implementing ext_cmdline/message must also implement ext_popupmenu in order to get cmdline completion with wildoptions+=pum. Solution: Allow marking a window as the ext_cmdline window through nvim_open_win(), including prompt offset. Anchor the cmdline- completion popupmenu to this window.
2025-04-23fix(float): cursor visible in "hidden" floating window #30866glepnir1
Problem: Cursor is visible in "hidden" floating window. Solution: Hide cursor when curwin is a hidden floating window. Show cursor after returning to a normal (non-hidden) window.
2025-04-23feat: render tuple types for API methodsLewis Russell1
2025-04-21fix(api): wrong return value with reverse range + overlap #32956luukvbaal1
Problem: When iterating in reverse with {start} > {end} in `nvim_buf_get_extmarks()`, marks that overlap {start} and are greater than {end} are included in the return value twice. Marks that overlap {end} and do not overlap {start} are not not included in the return value at all. Marks are not actually returned in a meaningful "traversal order". Solution: Rather than actually iterating in reverse, (also possible but requires convoluted conditions and would require fetching overlapping marks for both the {start} and {end} position, while still ending up with non-traversal ordered marks), iterate normally and reverse the return value.
2025-04-21feat(api): add "max_height" argument to nvim_win_text_height (#32835)luukvbaal1
Useful to e.g. limit the height to the window height, avoiding unnecessary work. Or to find out how many buffer lines beyond "start_row" take up a certain number of logical lines (returned in "end_row" and "end_vcol").
2025-04-12docs: misc #33330Justin M. Keyes1
2025-03-30docs: lsp config/commands #33122Justin M. Keyes1
fix #33075
2025-03-30docs: faq, lua packages #33183Phạm Bình An1
Problem: - `health#check()` seems to have been removed for a while, but `:h faq` still refers to it. - `news-0.11.txt` doesn't mention #33044
2025-03-18feat(float): add winborder option (#31074)glepnir1
Problem: There is currently no global option to define the default border style for floating windows. This leads to repetitive code when developers need consistent styling across multiple floating windows. Solution: Introduce a global option winborder to specify the default border style for floating windows. When a floating window is created without explicitly specifying a border style, the value of the winborder option will be used. This simplifies configuration and ensures consistency in floating window appearance. Co-authored-by: Gregory Anders <greg@gpanders.com>
2025-03-18docs: misc #32959Justin M. Keyes1
2025-03-17docs: miscJustin M. Keyes1
2025-03-17docs(api): rename "handle" => "id"Justin M. Keyes1
2025-03-15docs: miscdundargoc1
Co-authored-by: Au. <acehinnnqru@gmail.com> Co-authored-by: Daniel Rainer <daniel.rainer@localhost> Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: Lewis Russell <lewis6991@gmail.com> Co-authored-by: Luuk van Baal <luukvbaal@gmail.com> Co-authored-by: Pierre Barbin <pierre@heitzsystem.com> Co-authored-by: Riley Bruins <ribru17@hotmail.com> Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com> Co-authored-by: phanium <91544758+phanen@users.noreply.github.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2025-03-08fix(types): do not mark unstable API as privateLewis Russell1
These functions are allowed to be used downstream, they are just not API stable.
2025-03-02docs: misc #31996Justin M. Keyes1
2025-02-27doc: clarify window-id, tab-id, nvim_set_current_x #32528David Briscoe1
Problem: Descriptions are somewhat vague. nvim_set_current_line modifies contents but nvim_set_current_buf does not, etc. Solution: - Make it clear that these functions accept or return a winid/tabid by linking to that concept in help. - Only these few files use the term "handles", so replace them with the more conventional terminology. - Add a new help section for tab-ID. This concept is unique to neovim because vim exposes tabnr, but not tab handles. This section is modelled after `:h winid`.
2025-02-25feat(marks): add conceal_lines to nvim_buf_set_extmark()Luuk van Baal1
Implement an extmark property that conceals lines vertically.
2025-02-20feat(marks): virtual lines support horizontal scrolling (#32497)zeertzjq1
Add a new field `virt_lines_overflow` that enables horizontal scrolling for virtual lines when set to "scroll".
2025-02-17docs: misc (#32258)dundargoc1
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com> Co-authored-by: Julian Visser <12615757+justmejulian@users.noreply.github.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2025-01-27fix: resolve all remaining LuaLS diagnosticsLewis Russell1
2025-01-26feat(api): nvim_get_autocmds filter by id#31549glepnir1
Problem: nvim_get_autocmds cannot filter by id. Solution: Support it.
2025-01-24feat(extmarks): virtual text can be right-aligned, truncated #31921georgev931
Problem: Right aligned virtual text can cover up buffer text if virtual text is too long Solution: An additional option for `virt_text_pos` called `eol_right_align` has been added to truncate virtual text if it would have otherwise covered up buffer text. This ensures the virtual text extends no further left than EOL.
2025-01-23feat(api): combined highlights in nvim_eval_statusline()Luuk van Baal1
Problem: Combined highlighting was not applied to nvim_eval_statusline(), and 'statuscolumn' sign segment/numhl highlights. Solution: Add an additional `groups` element to the return value of `nvim_eval_statusline()->highlights`. This is an array of stacked highlight groups (highest priority last). Also resolve combined highlights for the 'statuscolumn' sign segment/numhl highlights. Expose/synchronize some drawline.c logic that is now mimicked in three different places.
2025-01-21Merge pull request #32098 from bfredl/multihl_groupbfredl1
feat(extmark): stack multiple highlight groups in `hl_group`
2025-01-21feat(extmark): stack multiple highlight groups in `hl_group`bfredl1
This has been possible in the "backend" for a while but API was missing. Followup: we will need a `details2=true` mode for `nvim_get_hl_id_by_name` to return information in a way forward compatible with even further enhancements.
2025-01-20feat(api): deprecate nvim_buf_add_highlight()bfredl1
This was kept for a while as it was a useful short hand and initially matched what highlights what actually properly implemented. But now |vim.hl.range()| is a better high-level shorthand with full support for native multi-line ranges.
2025-01-14feat(api): nvim_open_win() relative to tabline and laststatus #32006luukvbaal1
Problem: Anchoring a floating window to the tabline and laststatus is cumbersome; requiring autocommands and looping over all windows/tabpages. Solution: Add new "tabline" and "laststatus" options to the `relative` field of nvim_open_win() to place a window relative to.
2025-01-10refactor(api): deprecate nvim_notify #31938Justin M. Keyes1
Problem: The `nvim_notify` API (note: unrelated to `vim.notify()` Lua API) was not given any real motivation in https://github.com/neovim/neovim/pull/13843 There are, and were, idiomatic and ergonomic alternatives already. Solution: Deprecate `nvim_notify`.
2025-01-09docs: misc #31867Justin M. Keyes1
2025-01-09feat(api): deprecate nvim_out/err_write(ln)Luuk van Baal1
2025-01-09feat(api): add err field to nvim_echo() optsLuuk van Baal1
Problem: We want to deprecate `nvim_err_write(ln)()` but there is no obvious replacement (from Lua). Meanwhile we already have `nvim_echo()` with an `opts` argument. Solution: Add `err` argument to `nvim_echo()` that directly maps to `:echoerr`.
2024-12-24docs(api): return type of nvim_get_keymap() #31708Shihua Zeng1
2024-12-19feat(jobs): jobstart(…,{term=true}), deprecate termopen() #31343Justin M. Keyes1
Problem: `termopen` has long been a superficial wrapper around `jobstart`, and has no real purpose. Also, `vim.system` and `nvim_open_term` presumably will replace all features of `jobstart` and `termopen`, so centralizing the logic will help with that. Solution: - Introduce `eval/deprecated.c`, where all deprecated eval funcs will live. - Introduce "term" flag of `jobstart`. - Deprecate `termopen`.
2024-12-19docs(api): specify when decor provider on_buf is called #31634luukvbaal1
2024-12-16fix(api): generic error messages, not using TRY_WRAP #31596Justin M. Keyes1
Problem: - API functions using `try_start` directly, do not surface the underlying error message, and instead show generic messages. - Error-handling code is duplicated in the API impl. - Failure modes are not tested. Solution: - Use `TRY_WRAP`. - Add tests.
2024-12-06fix(events): don't expand `args.file` for Lua callback (#31473)zeertzjq1
Problem: In an autocommand Lua callback whether `args.file` is expanded depends on whether `expand('<afile>')` has been called. Solution: Always use the unexpanded file name for `args.file`. Related to #31306 and vim/vim#16106. This doesn't provide `sfname`, but at least makes `args.file` have a consistent value.
2024-12-03docs: misc, help tags for neovim.io searches #31428Justin M. Keyes1
Problem: Various keywords are commonly searched-for on https://neovim.io, but don't have help tags. Solution: Add help tags. fix #31327
2024-11-25feat(keysets): teach Union and LuaRefOfLewis Russell1
2024-11-16fix(api): validation, documentation of hl_group #31195luukvbaal1
Problem: Documentation for "hl_group" in nvim_buf_set_extmark() is unclear. "hl_group" in nvim_echo() does not accept highlight group id. Solution: Move documentation for highlight group name/id to first mention of hl_group. Update nvim_echo() to accept highlight group id.
2024-11-16feat(ui): don't show unfocusable windows in :tabs, 'tabline' #27984luukvbaal1
Problem: Floating windows with focusable set to false can reasonably be expected to be UI elements but are listed in some outputs that should contain only regular windows. Solution: Hide unfocusable floating windows from the default tabline and :tabs.
2024-11-09docs: misc (#30914)dundargoc1
Co-authored-by: Ernie Rael <errael@raelity.com> Co-authored-by: Famiu Haque <famiuhaque@proton.me> Co-authored-by: Jade <spacey-sooty@proton.me> Co-authored-by: glepnir <glephunter@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2024-10-20feat(float): allow enabling mouse for non-focusable window (#30844)zeertzjq1
Problem: Cannot allow mouse interaction for non-focusable float window. Solution: Add a "mouse" field to float window config.
2024-10-06feat(docs): improve `@see` meta docstrings #30693Justin M. Keyes1