aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim
Commit message (Collapse)AuthorAge
...
* revert: show "g<" hint when message spills 'cmdheight'Luuk van Baal2025-05-14
| | | | | | | Problem: Hint message to press "g<" for message that spills 'cmdheight' is too intrusive. Solution: Remove the hint message. Document the meaning of the spill indicator instead.
* fix(extui): handle carriage return in messagesLuuk van Baal2025-05-14
| | | | | Problem: Carriage return should place the "write cursor" at the start of a line. Solution: Construct the to be printed line by iterating over carriage returns.
* feat(diagnostic): add `enabled` filter (#33981)Maria José Solano2025-05-13
|
* fix(extui): adjust which messages are sent to "more" windowLuuk van Baal2025-05-13
| | | | | | | | | | | | | Problem: Decision whether message is sent to "more" window is based on the number of newlines present in a message, rather than the actual text height. With the "box" target, messages that come from a cmdline entered command are not always routed to the more window. Solution: Still write the message to the target buffer, and calculate the actual text height. Postpone updating several state variables until after the decision to re-route is made. With the "box" target, only consider the text height of the message if it is not a message from a cmdline entered command.
* feat(extui): show "g<" hint when message spills 'cmdheight'Luuk van Baal2025-05-13
| | | | | | | Problem: Extui shows a spill indicator to hint to the user to press "g<" to show the output of the last command. The user may be unaware of this mapping. Solution: Route a hint message to the message "box" window.
* feat(diagnostic): add `format` option to `setloclist`/`setqflist` (#33977)Maria José Solano2025-05-12
|
* fix(diagnostic): accept multiple namespaces when setting loclist/qflist (#33982)Maria José Solano2025-05-12
|
* feat(exrc): search in parent directories (#33889)Yochem van Rosmalen2025-05-11
| | | | | | | | | | feat(exrc): search exrc in parent directories Problem: `.nvim.lua` is only loaded from current directory, which is not flexible when working from a subfolder of the project. Solution: Also search parent directories for configuration file.
* fix(treesitter): proper tree `contains()` logic with combined injectionsRiley Bruins2025-05-11
| | | | | | | | | | | | **Problem:** `LanguageTree:contains()` considers any range within the start of the first tree and end of the last tree as "within" the language tree. In the case of combined injections, this is problematic because we only want to consider ranges within any of the combined trees as "contained" (as opposed to any range within the entire range spanned by all combined trees). **Solution:** Use a more discriminative check in `LanguageTree:contains()`.
* refactor(docs): remove unnecessary `@private`/`@nodoc` annotations (#33951)Maria José Solano2025-05-10
| | | | | * refactor(docs): remove `@private` annotations from local functions * refactor(docs): remove unnecessary `@nodoc` annotations
* vim-patch:0553f2f: runtime(doc): clarify single/multibyte support for ↵zeertzjq2025-05-10
| | | | | | | | | 'fillchars' (#33941) closes: vim/vim#17287 https://github.com/vim/vim/commit/0553f2ff0d170db3f4649a7aaa74b635b1101eed Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
* vim-patch:9973b39: runtime(doc): remove duplicate sentence in builtin.txtzeertzjq2025-05-10
| | | | | | https://github.com/vim/vim/commit/9973b39a17095e6d77b25aafb73a317cebcf586e Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:17ad852: runtime(doc): update return types for builtin functionszeertzjq2025-05-10
| | | | | | | | | | fixes: vim/vim#17273 credit: Github user @msoyka2024 https://github.com/vim/vim/commit/17ad852a62b6e2cf25207292ebca7a748e529d59 Co-authored-by: Christian Brabandt <cb@256bit.org>
* fix(extui): close cmdwin to enter "more" window (#33860)luukvbaal2025-05-09
| | | | | | | Problem: Cannot enter "more" window while cmdwin is open since it is a regular window and changing windows is disallowed. Solution: Close cmdwin to enter the "more" window. Minor regression w.r.t. the current message grid. Resolving that will require somehow bypassing textlock for the "more" window.
* feat(extui): assign 'filetype' to extui windows (#33924)luukvbaal2025-05-09
| | | | | | | | | Problem: Unable to discern windows used by the extui interface to configure their local options. 'winblend' may be detrimental to legibility depending on the colorscheme and 'background'. Solution: Assign the "cmdline", "msgmore", "msgprompt" and "msgbox" 'filetype' to the respective windows. Don't set 'winblend' for the message "box" window.
* fix(extui): route interactive messages to more-window (#33885)luukvbaal2025-05-09
| | | | | | | | | | | Problem: Extui does not route messages emitted as a result of a typed command to the "more" window. Command message leading shell messages is missing a kind. Messages not routed to 'cmdheight' area after it was 0. Solution: Route messages that were emitted in the same event loop as an entered command to the "more" window. Also append multiple messages in an already open more-window. Assign it the `shell_cmd` kind. Change message position when 'cmdheight' changes from 0.
* vim-patch:9.1.1374: completion: 'smartcase' not respected when filtering matcheszeertzjq2025-05-09
| | | | | | | | | | | | | | | | | | | | Problem: Currently, 'smartcase' is respected when completing keywords using <C-N>, <C-P>, <C-X><C-N>, and <C-X><C-P>. However, when a user continues typing and the completion menu is filtered using cached matches, 'smartcase' is not applied. This leads to poor-quality or irrelevant completion suggestions, as shown in the example below. Solution: When filtering cached completion items after typing additional characters, apply case-sensitive comparison if 'smartcase' is enabled and the typed pattern includes uppercase characters. This ensures consistent and expected completion behavior. (Girish Palya) closes: vim/vim#17271 https://github.com/vim/vim/commit/dc314053e121b0a995bdfbcdd2f03ce228e14eb3 Co-authored-by: Girish Palya <girishji@gmail.com>
* Merge pull request #33850 from MariaSolOs/on-jumpMaria José Solano2025-05-08
|\ | | | | feat(diagnostic): add `on_jump` callback option
| * feat(diagnostic): add `on_jump` callback optionMaria José Solano2025-05-05
| |
* | fix(lsp): nil error in ColorScheme autocmdSean Dewar2025-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: nil error possible if a loaded buffer hasn't been drawn in a window: ```vim lua vim.lsp.document_color.is_enabled() -- Load module badd foo call bufload('foo') colo default ``` Solution: Skip _buf_refresh branch also if bufstates[bufnr] is nil.
* | fix(extui): "box" window width calculated on last line (#33881)luukvbaal2025-05-07
| | | | | | | | | | | | | | | | | | Problem: The "box" window width is calculated on the last line when applying "last" virt_text. There may be longer lines part of the same message. Solution: Don't decrease box width if the calculated width is smaller. Minor unrelated changes. Co-authored-by: Eike <eike.rackwitz@mail.de>
* | fix(treesitter): invalidate conceal_lines cache earlier #33875luukvbaal2025-05-06
| | | | | | | | | | | | | | | | Problem: conceal_lines cache is invalidated in `on_buf` which is too late for code calculating text height after a buffer change but before a redraw (like `lsp/util.lua`). Solution: Replace `on_buf` with `on_bytes` handler that invalidates the cache and clears the marks.
* | docs(luv): replace bundled LuaCATS meta files with upstreamChristian Clason2025-05-06
| | | | | | | | Synced from https://github.com/luvit/luv/blob/master/meta.lua
* | fix(runtime): 'includeexpr' with non-Nvim-style Lua modules #33867Phạm Bình An2025-05-06
| | | | | | Closes #33862
* | fix(treesitter): eliminate flicker for single windows #33842Riley Bruins2025-05-05
| | | | | | | | | | | | | | | | | | | | This commit will eliminate flicker while editing one open window. It works by querying previously calculated trees for highlight marks, in the case that we are still asynchronously parsing in `on_win`. It will not fully solve the case of flicker when there are multiple open windows, since the parser will drop previously parsed injection trees whenever it receives a call to parse a different region of the buffer. This will require a refactor of `languagetree.lua`.
* | fix(extui): drop "more" window that is no longer floating #33861luukvbaal2025-05-05
| | | | | | | | | | | | Problem: Moving the "more" (or any extui)-window to a split with `wincmd L` does not invalidate it as a tracked window. Solution: Drop an extui window that is no longer floating.
* | fix(lua): vim.validate `message` param #33675Justin M. Keyes2025-05-04
| | | | | | | | | | | | | | Problem: vim.validate does not handle `message` param. Solution: Add the missing logic.
* | fix(lsp): check if client is stopping before reuse #33796Eike2025-05-04
| | | | | | | | | | | | | | Problem: Stopping a language server and then calling vim.lsp.start() with the same name/root will return the old language server that's in the middle of shutting down. vim.lsp.start() won't return a new server until the old process has terminated. Solution: Introducing a client._is_stopping field that tracks the shutdown phase, preventing the client from being reused.
* | refactor(lua): swap value params in `tbl_extend` behavior callback #33847Maria José Solano2025-05-04
| |
* | fix(extui): message may overwrite active cmdline #33846luukvbaal2025-05-04
|/ | | | | Problem: Active cmdline may be overwritten by a message. Solution: Check if cmdline is active before writing message.
* feat(lsp): support `documentColor` dynamic registration #33800Maria José Solano2025-05-04
|
* fix(lsp): improve error completion message #33812glepnir2025-05-04
| | | | | | | problem: Error notifications from LSP responses were difficult to read due to inconsistent formatting and missing critical information like client name and error codes. solution: Implemented a more structured error notification format using pipe separators to clearly display client name, error code (when available), and error message.
* fix(lsp): only auto-detach lsp.config clients #33834glepnir2025-05-04
| | | | | | | | Problem: enable() routine detaches clients even if they were manually started and not managed by vim.lsp.config. Solution: Skip clients that aren't managed by vim.lsp.config.
* fix(extui): hide inactive "more" window (#33831)luukvbaal2025-05-04
| | | | | Problem: More-window is left visible after leaving it. Cursor may be hidden behind it and it is hard to re-enter afterwards. Solution: Close the more-window when another window is entered.
* fix(treesitter): invalidate conceal_lines marks #33828luukvbaal2025-05-03
| | | | | | Problem: Spliced conceal_lines marks after changing the buffer text are left valid, concealing lines that shouldn't be. Solution: Set the `invalidate` extmark property.
* feat(lsp): detach LSP clients when 'filetype' changes #33707Jeremy Fleischman2025-05-03
| | | | | | | | | | | Problem: When the buffer 'filetype' changes, invalid or non-applicable LSP clients are not detached. https://github.com/neovim/neovim/issues/33443 https://github.com/neovim/nvim-lspconfig/issues/3326 Solution: In the enable() routine, check can_start() on _existing_ clients.
* feat(lua): function `behavior` for tbl_extend, tbl_deep_extend #33819Maria José Solano2025-05-03
|
* fix(extui): search highlighting in extui "more" pager #33792luukvbaal2025-05-03
| | | | Problem: No search highlighting in extui "more" pager window. Solution: Only use custom highlight namespace in cmdline window.
* docs(lua): typing for vim.fn.winlayout #33817PRIZ ;]2025-05-03
| | | | | | | | | | | | | | | Problem: `any[]` means nothing, and the return value is not the same as what's documented in the comment (eg, Lua returns `{ "row", { { "leaf", 1000 }, { "leaf", 1001 } } }`, not `{ "row", { "leaf", 1000, "leaf", 1001 } }`) Solution: Create two classes (vim.fn.winlayout.leaf and vim.fn.winlayout.branch) and one alias that links the two together. Also: Due to LuaLS limitations, there is an empty class, vim.fn.winlayout.empty Signed-Off-By: VoxelPrismatic <voxelprismatic@pm.me>
* feat(lsp): vim.lsp.is_enabled() #33703Jeremy Fleischman2025-05-03
| | | | | | | | | Problem: No way to check if a LSP config is enabled without causing it to resolve. E.g. `vim.lsp.config['…'] ~= nil` will resolve the config, which could be an unwanted and somewhat expensive side-effect. Solution: Introduce `vim.lsp.is_enabled()`.
* fix(runtime): conceal paths in help, man ToC loclist #33764Michele Campeotto2025-05-03
| | | | | | | | | | | | | | | | | Problem: The check for concealing paths in TOCs in the qf syntax file fails because the TOC tile has changed. Solution: Force the qf syntax file to be reloaded after the qf_toc variable has been set, so that the it can apply the correct settings. Using the explicit qf_toc key, already used in the syntax file, instead of the title is less prone to breaking. It was also already being set for man pages but it had no effect because the syntax file had already been loaded when the variable was set. Fixes #33733
* fix(lsp): improper diagnostic end_col computationRiley Bruins2025-05-03
| | | | | | | | **Problem:** For multiline diagnostics, the end column was improperly calculated by checking the byte index of the character position on the *start* line. **Solution:** Calculate the byte index for end_col using the *end* line.
* fix(treesitter): close `:InspectTree` with `q`Christian Clason2025-05-02
| | | | | | | Problem: `:InspectTree` window does not follow precedent for focused "info windows" (like `checkhealth`, `Man`, etc.). Solution: Map `q` to `<C-w>c`.
* fix(lsp): use `bufnr` when getting clients in `symbols_to_items` (#33760)Maria José Solano2025-05-02
|
* fix(extui): cmdline visibility, cmdheight cursor position (#33774)luukvbaal2025-05-02
| | | | | | | | | Problem: The cmdline popupmenu is hidden behind extui windows. 'showmode' message is drawn over the cmdline. Changing the 'cmdheight' to accommodate space for the text in the cmdline may change the current cursor position. Solution: Ensure kZIndexMessages < zindex < kZIndexCmdlinePopupMenu. Clear the 'showmode' message when the cmdline level is negative. Temporarily set 'splitkeep' = "screen" when changing the 'cmdheight'.
* fix(extui): close message window with `q`Christian Clason2025-05-02
| | | | | | | Problem: Using `<c-c>` does not follow precedent (from `checkhealth` etc.) for closing "information windows". Solution: Use `q` for close mapping.
* vim-patch:9.1.1360: filetype: GNU Radio companion files are not recognizedzeertzjq2025-05-02
| | | | | | | | | | | | | | Problem: filetype: GNU Radio companion files are not recognized Solution: detect *.grc files as xml or yaml filetype depending on the first line (zeertzjq). Ref: - https://wiki.gnuradio.org/index.php/XML_GRC - https://wiki.gnuradio.org/index.php/YAML_GRC closes: vim/vim#17241 https://github.com/vim/vim/commit/af4a5d6e2ae57a44edab48c8b012d2afa743998f
* vim-patch:9.1.1359: filetype: GNU Radio config files are not recognizedzeertzjq2025-05-02
| | | | | | | | | | | | | Problem: filetype: GNU Radio config files are not recognized. Solution: detect GNU Radio config files as confini filetype. Only allow '#' as start of comment in confini syntax (zeertzjq). Ref: - https://wiki.gnuradio.org/index.php/Configuration_Files closes: vim/vim#17242 https://github.com/vim/vim/commit/9c9200d1eafe50077222a38bfad6cba7156a6487
* fix(extui): check option values after VimEnter (#33768)luukvbaal2025-05-02
| | | | | | Problem: Not picking up configured option values when enabling _extui after startup. Solution: Check option values when enabing _extui. Fix https://github.com/neovim/neovim/issues/33767
* fix(vim.lsp.enable): don't eagerly enable LSP configs during startup #33762Phạm Bình An2025-05-02
| | | closes #33761