aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
* docs(Open): add reference in documentation (#32678)Luca Saccarola2025-02-28
|
* fix(marks): ineffective conceal_line callback optimization (#32662)luukvbaal2025-02-28
| | | | | | | Problem: _on_conceal_line callbacks are not invoked if callback has not let Nvim know it wants to receive them. But this may change on factors other than what is currently checked (changed buffer). Solution: Forego this optimization, callback is still guarded behind 'conceallevel'.
* fix(treesitter): correctly parse queries with combined injectionsRiley Bruins2025-02-28
|
* vim-patch:85a50fe: runtime(doc): fix confusing docs for 'completeitemalign' ↵zeertzjq2025-02-28
| | | | | | | (#32671) closes: vim/vim#16743 https://github.com/vim/vim/commit/85a50fe825ba11a35ce654f7313b4350e3ba4b52
* doc: clarify window-id, tab-id, nvim_set_current_x #32528David Briscoe2025-02-27
| | | | | | | | | | | | | | 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`.
* feat(lua): vim.text.indent()Justin M. Keyes2025-02-26
| | | | | | | | | | | | | Problem: Indenting text is a common task in plugins/scripts for presentation/formatting, yet vim has no way of doing it (especially "dedent", and especially non-buffer text). Solution: Introduce `vim.text.indent()`. It sets the *exact* indentation because that's a more difficult (and thus more useful) task than merely "increasing the current indent" (which is somewhat easy with a `gsub()` one-liner).
* fix(treesitter): nil check query for has_conceal_lineLuuk van Baal2025-02-25
|
* fix(lsp): resize hover window for concealed linesLuuk van Baal2025-02-25
| | | | | | | | Problem: Height of a (markdown) `vim.lsp.util.open_floating_preview()` window can be reduced to account for concealed lines (after #31324). Solution: Set the window height to the text height of the preview window. Set 'concealcursor' to avoid unconcealing the cursorline when entering the hover window.
* feat(treesitter): vertical conceal support for highlighterLuuk van Baal2025-02-25
| | | | | | | | TSHighlighter now places marks for conceal_lines metadata. A new internal decor provider callback _on_conceal_line was added that instructs the highlighter to place conceal_lines marks whenever the editor needs to know whether a line is concealed. The bundled markdown queries use conceal_lines metadata to conceal code block fence lines.
* feat(marks): add conceal_lines to nvim_buf_set_extmark()Luuk van Baal2025-02-25
| | | | Implement an extmark property that conceals lines vertically.
* vim-patch:9.1.1140: filetype: m17ndb files are not detected (#32618)zeertzjq2025-02-25
| | | | | | | | | | | | | | | | | | | | Problem: filetype: m17ndb files are not detected Solution: detect m17ndb files as m17ndb filetype, include filetype, syntax and indent files for the new filetype (David Mandelberg). References: https://www.nongnu.org/m17n/manual-en/m17nDBFormat.html describes the format. https://git.savannah.nongnu.org/cgit/m17n/m17n-db.git/tree/ has examples of the files. closes: vim/vim#16696 https://github.com/vim/vim/commit/ed7d8e55ac232758fc14fd132994b4a09b19350b Also adjust the xkb parent pattern according to dev_vimpatch.txt. Co-authored-by: David Mandelberg <david@mandelberg.org>
* fix(lsp): reset the applied hints on `refresh` request #32446Yi Ming2025-02-23
|
* Merge #32503 feat(lsp): use the meta model to generate server capability mapJustin M. Keyes2025-02-23
|\
| * feat(lsp): use the meta model to generate server capability mapMaria José Solano2025-02-21
| |
| * feat(lsp): update LSP typesMaria José Solano2025-02-17
| |
* | refactor(treesitter): simplify parsing coroutine logicRiley Bruins2025-02-23
| | | | | | | | | | | | | | | | | | Lua coroutines can yield across non-coroutine function boundaries, meaning that we don't need to wrap each helper function in a coroutine and resume it within `_parse()`. If we just have them yield when appropriate, this will be caught by the top level `_parse()` coroutine, and resuming the `_parse()` will resume from the position in the helper function where we yielded last.
* | fix(lua): `@private` => `@nodoc` #32587Dan Sully2025-02-23
| | | | | | | | | | | | | | Problem: vim.log.levels.* and vim.opt_local are marked `@private` but they should be `@nodoc`. Solution: Fix the annotation.
* | fix(float): ensure floating window width can fit titleMaria José Solano2025-02-23
| |
* | vim-patch:9.1.1134: filetype: Guile init file not recognizedChristian Clason2025-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: Guile init file not recognized Solution: detect '.guile' file as scheme filetype (David Mandelberg) References: https://www.gnu.org/software/guile/manual/html_node/Init-File.html > When run interactively, Guile will load a local initialization file > from ~/.guile. This file should contain Scheme expressions for > evaluation. closes: vim/vim#16683 https://github.com/vim/vim/commit/41a6026f007facb1ada3ff2a63a054913432860c Co-authored-by: David Mandelberg <david@mandelberg.org>
* | vim-patch:9.1.1133: filetype: xkb files not recognized everywhereChristian Clason2025-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: xkb files not recognized everywhere Solution: detect xkb files in more places (David Mandelberg) References: https://xkbcommon.org/doc/current/user-configuration.html#user-config-locations closes: vim/vim#16684 https://github.com/vim/vim/commit/b62bf814886185cb8607ce15051aa7017b8c88ba Co-authored-by: David Mandelberg <david@mandelberg.org>
* | feat(treesitter): table of contents for checkhealth, markdown (#32282)Christian Clason2025-02-22
| | | | | | | | | | | | | | | | | | | | | | Problem: It's difficult to navigate large structured text files (vim help, checkhealth, Markdown). Solution: Support `gO` for table of contents and `]]`/`[[` for moving between headings for all these filetypes using treesitter queries. Refactor: colorization of highlight groups is moved to the `help` ftplugin while headings-related functionality is implemented in a private `vim.treesitter` module for possible future use for other filetypes.
* | fix(lsp): unify get_completion_word for textEdits/insertTextMathias Fussenegger2025-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: After https://github.com/neovim/neovim/pull/32377 selecting snippets provided by luals inserted the multi-line text before accepting the candidates. That's inconsistent with servers who provide `textEdit` instead of `insertText` and having lines shift up/down while cycling through the completion candidates is a bit irritating. Solution: Use the logic used for `textEdit` snippets also for `insertText`
* | perf(treesitter): don't block when finding injection rangesRiley Bruins2025-02-21
| | | | | | | | | | | | | | | | | | | | | | **Problem:** Currently, parsing is asynchronous, but it involves a (sometimes lengthy) step which finds all injection ranges for a tree by iterating over that language's injection queries. This causes edits in large files to be extremely slow, and also causes a long stutter during the initial parse of a large file. **Solution:** Break up the injection query iteration over multiple event loop iterations.
* | fix(treesitter): `TSNode:field()` returns all children with the given fieldRiley Bruins2025-02-21
| |
* | perf(treesitter): only search for injections within the parse rangeRiley Bruins2025-02-21
| | | | | | | | Co-authored-by: Jaehwang Jung <tomtomjhj@gmail.com>
* | feat(marks): virtual lines support horizontal scrolling (#32497)zeertzjq2025-02-20
| | | | | | | | Add a new field `virt_lines_overflow` that enables horizontal scrolling for virtual lines when set to "scroll".
* | vim-patch:c729d6d: runtime: decouple Open and Launch commands and gx mapping ↵Luca Saccarola2025-02-20
| | | | | | | | | | | | | | | | from netrw (#32506) closes: vim/vim#16494 fixes: #vim/vim#16486 https://github.com/vim/vim/commit/c729d6d154e097b439ff264b9736604824f4a5f4
* | fix(treesitter): don't spam query errors in the highlighterRiley Bruins2025-02-19
| | | | | | | | | | | | | | | | **Problem:** An erroneous query in the treesitter highlighter gives a deluge of errors that makes the editor almost unusable. **Solution:** Detach the highlighter after an error is detected, so that it only gets displayed once (per highlighter instance).
* | fix(treesitter): avoid computing fold levels for empty bufferLuuk van Baal2025-02-19
| | | | | | | | | | | | | | | | Problem: Computing fold levels for an empty buffer (somehow) breaks the parser state, resulting in a broken highlighter and foldexpr. Cached foldexpr parser is invalid after filetype has changed. Solution: Avoid computing fold levels for empty buffer. Clear cached foldinfos upon `FileType`.
* | fix(treesitter)!: enforce buffer is loaded when creating parserLuuk van Baal2025-02-19
| | | | | | | | | | | | | | Problem: `vim.treesitter._create_parser()` silently loads the buffer, bypassing the swapfile prompt. Solution: Error for an unloaded buffer, ensure buffer is loaded in `vim.treesitter.start()` instead.
* | vim-patch:5647c91: runtime(doc): add reference to extendnew() at extend() ↵zeertzjq2025-02-17
| | | | | | | | | | | | | | | | | | (#32500) related: vim/vim#16607 https://github.com/vim/vim/commit/5647c91355f1ff3a1030c737bf5133bb7da5bb76 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | fix(treesitter): separately track the number of valid regionsRiley Bruins2025-02-17
| | | | | | | | | | | | We need to add a separate variable to keep track of this information, since we cannot read the length of the valid regions table itself, since it has holes.
* | docs: misc (#32258)dundargoc2025-02-17
|/ | | | | 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>
* docs: stdpath() type #32480phanium2025-02-16
|
* fix(diagnostic): don't include diagnostic code when using custom formatter ↵Maria José Solano2025-02-16
| | | | #32464
* fix(docs): update context type in `vim.lsp.LocationOpts.OnList`Maria José Solano2025-02-16
|
* feat(lsp): add support for completionItem.command resolvingMathias Fussenegger2025-02-14
| | | | | | | | `command` was already resolved via a `completionItem/resolve` request but only if `additionalTextEdits` were also present, and the `resolveSupport` capability wasn't listed. Closes https://github.com/neovim/neovim/issues/32406
* feat(term): trigger TermRequest for APC (#32407)Till Bungert2025-02-13
| | | | Co-authored-by: Gregory Anders <greg@gpanders.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* feat(lsp): add select kind in showMessageRequest #32387Maria José Solano2025-02-13
|
* Merge #32426 fix(lsp): reset active request when reporting an errorJustin M. Keyes2025-02-13
|\
| * refactor(lsp): handling errors and nil responses togetherYi Ming2025-02-13
| |
| * fix(lsp): reset active request when reporting an errorYi Ming2025-02-13
| |
| * fix(lsp): missing method parameter when canceling requestsYi Ming2025-02-13
| |
* | fix(lsp): clear word when expand multi-lines word (#32393)glepnir2025-02-13
| | | | | | | | | | Problem: When expanding a completion item that contains a multi-line word, the word is not deleted correctly. Solution: If the word contains a line break, delete the text from Context.cursor to the current cursor position.
* | fix(lsp): autotrigger should only trigger on client's triggerCharacters (#32266)Robert Muir2025-02-13
|/ | | | | | | | | | | | Problem: autotrigger option of vim.lsp.completion.enable() would trigger all clients, as long as it matched at least one client's triggerCharacters. Solution: trigger only the clients with triggerCharacters matching the character. overtriggering still happens if any client returns isIncomplete=true (this case is more involved). Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
* fix(lsp): on detach, cancel pending foldingRange requests #31509Yi Ming2025-02-12
| | | | | | | | | | | | | | | | | | | Problem: 1. Open a relatively large file (so the server needs some time to process the request). 2. Then immediately execute `:bdelete`. 3. Once the request is completed, the handler will obtain the bufstate of a buffer already unloaded. Error executing vim.schedule lua callback: ...7841_1/share/nvim/runtime/lua/vim/lsp/_folding_range.lua:119: assertion failed! stack traceback: [C]: in function 'assert' ...7841_1/share/nvim/runtime/lua/vim/lsp/_folding_range.lua:119: in function 'multi_handler' ...7841_1/share/nvim/runtime/lua/vim/lsp/_folding_range.lua:140: in function 'handler' ...HEAD-c137841_1/share/nvim/runtime/lua/vim/lsp/client.lua:669: in function '' vim/_editor.lua: in function <vim/_editor.lua:0> Solution: On detach, cancel all pending textDocument_foldingRange requests.
* feat(options): add 'eventignorewin' (#32152)luukvbaal2025-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | vim-patch:partial:9.1.1084: Unable to persistently ignore events in a window and its buffers Problem: Unable to persistently ignore events in a window and its buffers. Solution: Add 'eventignorewin' option to ignore events in a window and buffer (Luuk van Baal) Add the window-local 'eventignorewin' option that is analogous to 'eventignore', but applies to a certain window and its buffers. Identify events that should be allowed in 'eventignorewin', adapt "auto_event" and "event_tab" to encode this information. Window context is not passed onto apply_autocmds_group(), and when to ignore an event is a bit ambiguous when "buf" is not "curbuf", rather than a large refactor, only ignore an event when all windows into "buf" are ignoring the event. https://github.com/vim/vim/commit/b7147f8236c962cd74d1ce028d9106f1c449ea6c vim-patch:9.1.1102: tests: Test_WinScrolled_Resized_eiw() uses wrong filename Problem: tests: Test_WinScrolled_Resized_eiw() uses wrong filename (Luuk van Baal, after v9.1.1084) Solution: Rename the filename to something more unique https://github.com/vim/vim/commit/bfc7719e48ffc365ee0a1bd1888120d26b6365f0
* Merge #30860 LSP: symbols_to_items()Justin M. Keyes2025-02-11
|\
| * feat(lsp)!: `symbol_to_item` requires `offset_encoding`Yi Ming2025-02-11
| |
| * feat(lsp): include `end_col` and `end_lnum` in `vim.lsp.buf.symbols_to_items`Yi Ming2025-02-11
| |