aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
...
* fix(lsp): consistent use of `vim.notify`/logging with unsupported methodsMaria José Solano2025-07-04
|
* fix(lsp): remove extra notify on empty hoverMaria José Solano2025-07-04
|
* fix(diagnostic): fix flaky errorLewis Russell2025-07-04
|
* feat(pack): add built-in plugin manager `vim.pack`Evgeni Chasnovski2025-07-04
| | | | | | | | Problem: No built-in plugin manager Solution: Add built-in plugin manager Co-authored-by: Lewis Russell <lewis6991@gmail.com>
* feat(async): add `vim._async`Lewis Russell2025-07-04
| | | | | | Problem: no easy built-in way to do async Solution: add `vim._async`
* vim-patch:9.1.1507: symlinks are resolved on :cd commands (#34758)glepnir2025-07-04
| | | | | | | | | | | | | Problem: File paths change from symlink to target path after :cd command when editing files through symbolic links Solution: Add "~" flag to 'cpoptions' to control symlink resolution. When not included (default), symlinks are resolved maintaining backward compatibility. When included, symlinks are preserved providing the improved behavior. (glepnir) related: neovim/neovim#15695 closes: vim/vim#17628 https://github.com/vim/vim/commit/4ade668fb62ebf3f8be537fe451caed6bd1eba9a
* feat(runtime): accept predicates in take and skip (#34657)Mart-Mihkel Aun2025-07-03
| | | | | | Make `vim.iter():take()` and `vim.iter():skip()` optionally accept predicates to enable takewhile and skipwhile patterns used in functional programming.
* vim-patch:9.1.1504: filetype: numbat files are not recognizedChristian Clason2025-07-03
| | | | | | | | | | | | | | | Problem: filetype: numbat files are not recognized Solution: detect *.nbt files as numbat filetype (0xadk) References: - https://github.com/sharkdp/numbat - https://github.com/sharkdp/numbat/tree/master/numbat/modules closes: vim/vim#17643 https://github.com/vim/vim/commit/20eb68a8f29008fe9041e60b920246f64ee29335 Co-authored-by: 0xadk <0xadk@users.noreply.github.com>
* vim-patch:9.1.1503: filetype: haxe files are not recognizedChristian Clason2025-07-03
| | | | | | | | | | | | | | | Problem: filetype: haxe files are not recognized Solution: detect *.hx files as haxe filetype (0xadk) References: - https://haxe.org/ - https://code.haxe.org/category/beginner/hello-world.html closes: vim/vim#17644 https://github.com/vim/vim/commit/b46e3aa0fa08a9007c3f7115cb7a46d7389616b2 Co-authored-by: 0xadk <0xadk@users.noreply.github.com>
* vim-patch:9.1.1502: filetype: quickbms files are not recognizedChristian Clason2025-07-03
| | | | | | | | | | | | | | | Problem: filetype: quickbms files are not recognized Solution: detect *.bms files as quickbms filetype (0xadk) Reference: - https://aluigi.altervista.org/quickbms.htm closes: vim/vim#17645 https://github.com/vim/vim/commit/fdcdded4d58523a5e9565a562466f062fb072109 Co-authored-by: 0xadk <0xadk@users.noreply.github.com>
* vim-patch:9.1.1501: filetype: flix files are not recognizedChristian Clason2025-07-03
| | | | | | | | | | | | | | | | Problem: filetype: flix files are not recognized Solution: detect *.flix files as flix filetype (0xadk) References: - https://flix.dev/ - https://doc.flix.dev/introduction.html closes: vim/vim#17646 https://github.com/vim/vim/commit/b211916e0ae818e0653ae23ae71565b24ccba307 Co-authored-by: 0xadk <0xadk@users.noreply.github.com>
* fix(treesitter): ensure TSLuaTree is always immutableRodrigodd2025-07-02
| | | | | | | | | | | | | | | | Problem: The previous fix in #34314 relies on copying the tree in `tree_root` to ensure the `TSNode`'s tree cannot be mutated. But that causes the problem where two calls to `tree_root` return nodes from different copies of a tree, which do not compare as equal. This has broken at least one plugin. Solution: Make all `TSTree`s on the Lua side always immutable, avoiding the need to copy the tree in `tree_root`, and make the only mutation point, `tree_edit`, copy the tree instead.
* fix(vim.system): env=nil passes env=nil to uv.spawnLewis Russell2025-07-02
| | | | | | | | | | | | 731e616a79 made it so passing `{env = nil, clear_env = true }` would pass `{env = {}}` to `vim.uv.spawn`. However this is not what `clear_env` is (arguably) supposed to do. If `env=nil` then that implies the uses wants `vim.uv.spawn()` to use the default environment. Adding `clear_env = true` simply prevents `NVIM` (the base environment) from being added. Fixes #34730
* fix(lsp): use `vim.notify` with action-less `showMessage` requests (#34720)Maria José Solano2025-07-01
|
* fix: type of nvim_echoLewis Russell2025-07-01
|
* Merge #34715 vim.version improvementsJustin M. Keyes2025-07-01
|\
| * feat(vim.version): add `vim.version.intersect()`Evgeni Chasnovski2025-06-30
| | | | | | | | | | | | | | | | Problem: No way to compute intersection of two version ranges, which is useful when computing version range that fits inside several reference ranges. Solution: Add `vim.version.intersect()`.
| * fix(vim.version): improve construction of '<=a.b.c' and '>a.b.c' rangesEvgeni Chasnovski2025-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `vim.version.range('<=a.b.c')` is not precise when it comes to its right hand side. This is due to version ranges using exclusive right hand side. While `vim.version.range('>a.b.c')` is not precise when it comes to its left hand side because left hand sides are inclusive. Solution: For '>=a.b.c' increase `to` from 'a.b.c' to the smallest reasonable version that is bigger than 'a.b.c'. For '<a.b.c' do the same for `from`. More proper solution is an explicit control over inclusivity of version range sides, but it has more side effects and requires design decisions.
| * feat(vim.version): make `tostring()` return human-readable version rangeEvgeni Chasnovski2025-06-30
| | | | | | | | | | | | | | Problem: `tostring()` applied to version range doesn't return human-readable text with information about the range. Solution: Add `__tostring()` method.
| * docs(vim.version): document `vim.VersionRange` as a dedicated classEvgeni Chasnovski2025-06-30
| |
* | doc(vim.version): options formatting #34716James Trew2025-06-30
| |
* | fix(exrc): exrc knows its own location (#34638)Yochem van Rosmalen2025-06-29
| | | | | | | | | | | | | | | | | | | | | | fix(exrc): lua exrc files know their location Problem: 'exrc' files are inherently bound to their location / workspace and therefore require to "know" their location on the filesystem. However, currently using `debug.getinfo(1, 'S')` returns `"<nvim>"`. Solution: Include the filepath as chunkname in `loadstring()` and `nlua_exec()`.
* | refactor(health): use vim.system():wait() #34702Tom Ampuero2025-06-29
|/ | | | | | | Problem: - The ripgrep probe still used the legacy `vim.fn.system()` Solution: - Replace `vim.fn.system()` with `vim.system({rg_path, '-V'}):wait()`
* fix(lsp): fix workspace diagnostic request to follow spec (#34674)Zie Mcdowell2025-06-27
| | | | | * fix(lsp): fix workspace diagnostic request to follow spec * refactor(lsp): add type annotation
* feat(extui): don't enter pager for routed message #34679luukvbaal2025-06-27
| | | | | | | | Problem: Messages routed to the pager to be shown in full, enter the pager automatically, yielding another "press-q-prompt". Solution: Only enter the pager when requested explicitly. Otherwise, close the pager on the next typed mapping, unless that mapping entered the pager.
* perf(extui): delay creating windows, buffers and parser (#34665)luukvbaal2025-06-27
| | | | | | | | | | Problem: vim._extui unconditionally creates windows, buffers and the Vimscript cmdline highlighter when it is first loaded. Solution: Schedule first creation of the window so that first redraw happens sooner (still need to create at least the cmdline window asap as it can have a different highlight through hl-MsgArea; thus further delaying until the first event that needs a particular target seems redundant). Load the cmdline highlighter on the first cmdline_show event.
* feat(ui): emit "msg_clear" event after clearing the screen (#34035)luukvbaal2025-06-26
| | | | | | | | Problem: ext_messages cannot tell when the screen was cleared, which is needed to clear visible messages. An empty message is also never emitted, but clears messages from the message grid. Solution: Repurpose the "msg_clear" event to be emitted when the screen was cleared. Emit an empty message with the `empty` kind to hint to a UI to clear the cmdline area.
* fix(lsp): include context for each client in multi-handler results (#34669)Maria José Solano2025-06-26
|
* fix(lsp/health): always use vim.inspect to show root_markers (#34667)Gregory Anders2025-06-26
| | | | | | | | | | | In https://github.com/neovim/neovim/pull/34092 we changed the healthcheck to display root markers as a concatenated list if the first item in root_markers is a string (not a table). However, this does not solve the general case, because root_markers can contain a string as the first element, but a table as the 2nd element. Because root_markers has a more complex structure we should always just display it using vim.inspect, rather than adding a special case for when all items are a string.
* feat(defaults): map "grt" to LSP type_definition #34642Caleb White2025-06-26
|
* docs(api): document types using LuaCATS typesLewis Russell2025-06-26
| | | | | | | | | | | | | | | | | | | | - 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
* fix(lsp): add `RequestFailed` error code constant #34645Maria José Solano2025-06-26
| | | | Also remove `serverErrorStart/End` as [the spec](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#errorCodes) says that they're deprecated and don't even represent a real error code.
* fix(vim.system): clear_env=true gives an invalid env to uv.spawn #33955Birdee2025-06-25
| | | | | | | | | Problem: In setup_env, some needed logic is bypassed when clear_env=true. Solution: Drop the early return in setup_env(). Co-authored-by: BirdeeHub <birdee@localhost>
* fix: map wincmd instead of remap #34635phanium2025-06-25
| | | Same issue: a59b052857ca43997b9e8be0a1d5c870ce172807
* feat(prompt): prompt_getinput() gets current input #34491Shadman2025-06-24
| | | | | | | | | | Problem: Not easy to get user-input in prompt-buffer before the user submits the input. Under the current system user/plugin needs to read the buffer contents, figure out where the prompt is, then extract the text. Solution: - Add prompt_getinput(). - Extract prompt text extraction logic to a separate function
* refactor(lsp): use `vim.lsp.buf_request_all` internally (#34604)Maria José Solano2025-06-23
|
* feat(lsp): support annotated text edits (#34508)Maria José Solano2025-06-23
|
* docs(treesitter): fix parameter list for `Query:iter_matches` (#34553)Luis Calle2025-06-22
|
* fix(extui): set 'modifiable', 'noswapfile' for buffers (#34582)phanium2025-06-20
| | | | | | Problem: UI buffers may be 'unmodifiable' and use a 'swapfile'. Solution: Set the 'modifiable' and 'noswapfile' options. Co-authored-by:phanium <91544758+phanen@users.noreply.github.com>
* refactor(lsp): redesign LSP folding state #34469Yi Ming2025-06-19
|
* fix(lsp): clear document_color autocmds #34573Riley Bruins2025-06-19
| | | | | | | | **Problem:** When enabling document_color multiple times for the same buffer (or when toggling it on and off), duplicate autocmds are created since the previous ones are not cleared. **Solution:** Clear the appropriate buffer-local autocmds when enabling/disabling document color functionality.
* fix(lsp) type annotation for `vim.lsp.Config.cmd` #34574Oskar Haarklou Veileborg2025-06-19
| | | | The type annotation for `vim.lsp.ClientConfig.cmd` was changed, but the update was not propagated to `vim.lsp.Config`.
* vim-patch:9.1.1468: filetype: bright(er)script files are not recognizedChristian Clason2025-06-19
| | | | | | | | | | | | Problem: filetype: bright(er)script files are not recognized Solution: detect *.bs files as brighterscript filetype and *.brs as brightscript filetype, include filetype plugins (Riley Bruins) closes: vim/vim#17566 https://github.com/vim/vim/commit/03e5ee25fdd4f8ee16b00688e24c4ad3b8f8f935 Co-authored-by: Riley Bruins <ribru17@hotmail.com>
* fix(diagnostics): validate opts.signs #34565Bruce Wen2025-06-18
|
* vim-patch:9.1.1466: filetype: not all lex files are recognizedEisuke Kawashima2025-06-18
| | | | | | | | | | | | Problem: filetype: not all lex files are recognized Solution: detect *.ll as lex, llvm or lifelines filetype, depending on the content (Eisuke Kawashima) closes: vim/vim#17560 https://github.com/vim/vim/commit/48295111e578e2158c6234510f12081de4757c52 Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
* feat(lsp): pass resolved config to cmd() #34550Julian Visser2025-06-18
| | | | | | | | | | | | | | Problem: In LSP configs, the function form of `cmd()` cannot easily get the resolved root dir (workspace). One of the main use-cases of a dynamic `cmd()` is to be able to start a new server whose binary may be located *in the workspace* ([example](https://github.com/neovim/nvim-lspconfig/pull/3912)). Compare `reuse_client()`, which also receives the resolved config. Solution: Pass the resolved config to `cmd()`. Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* Merge #34541 docsJustin M. Keyes2025-06-18
|\
| * docs: api, miscJustin M. Keyes2025-06-18
| |
| * docs: deprecate <sfile>Justin M. Keyes2025-06-18
| |
* | docs(ui): type annotations for options #33983Yi Ming2025-06-18
|/