aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* revert "feat(ftplugin): set 'omnifunc' of Lua to 'v:lua.vim.lua_omnifunc'" ↵Justin M. Keyes2025-02-23
| | | | | #32597 This reverts commit f398e3a61abbf802b49867d2f533be1b0725c0d7.
* 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.
* | feat(ftplugin): set Lua 'omnifunc' to vim.lua_omnifunc #32491Phạm Bình An2025-02-23
| | | | | | | | | | | | | | | | | | | | Problem: - Many other ftplugin have defined 'omnifunc', but the Lua one doesn't define one, even though there is `vim.lua_omnifunc()` - Users may want "stupid" completion to fix Lua config with `nvim --clean` in case they breaks it Solution: Set 'omnifunc' to 'v:lua.vim.lua_omnifunc' in ftplugin/lua.lua
* | 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.
* | build: make makefile work on msysdundargoc2025-02-23
| | | | | | | | | | | | | | Relying on $(OS) doesn't work as it's too naive, so we check if $PATH contains a colon instead. Closes https://github.com/neovim/neovim/issues/31027
* | fix(float): ensure floating window width can fit titleMaria José Solano2025-02-23
| |
* | Merge pull request #32593 from zeertzjq/vim-9.1.1139zeertzjq2025-02-23
|\ \ | | | | | | vim-patch:9.1.{1139,1141}
| * | vim-patch:9.1.1141: Misplaced comment in readfile()zeertzjq2025-02-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Misplaced comment in readfile(). (after v9.1.1139) Solution: Move the comment above S_ISDIR(). (zeertzjq) closes: vim/vim#16714 https://github.com/vim/vim/commit/b8989fb860808bbcb0e90b2ba597f66a092277d8
| * | vim-patch:9.1.1139: [fifo] is not displayed when editing a fifozeertzjq2025-02-23
|/ / | | | | | | | | | | | | | | | | | | | | | | | | Problem: [fifo] is not displayed when editing a fifo (after v7.4.2189) Solution: stat the filename and detect the type correctly fixes: vim/vim#16702 closes: vim/vim#16705 https://github.com/vim/vim/commit/f1c3134ee1f263e537212a3072e8aa4cb7e8d953 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:9.1.1137: ins_str() is inefficient by calling STRLEN() (#32591)zeertzjq2025-02-23
| | | | | | | | | | | | | | | | | | | | | | | | Problem: ins_str() is inefficient by calling STRLLEN() Solution: refactor ins_str() to take a length argument and let all callers provide the correct length when calling ins_str() (John Marriott) closes: vim/vim#16711 https://github.com/vim/vim/commit/f4b36417e893ff40296f1a5a264a4ecc6965f1d5 Co-authored-by: John Marriott <basilisk@internode.on.net>
* | vim-patch:9.1.1136: Match highlighting marks a buffer region as changed (#32561)luukvbaal2025-02-23
| | | | | | | | | | | | | | | | Problem: Match highlighting marks a buffer region to be redrawn as if its buffer text was changed, unnecessarily invoking syntax code. Solution: Set the `w_redraw_top/bot` variables instead of the b_mod_* ones (Luuk van Baal) https://github.com/vim/vim/commit/7bbb0f357e9f9d3a737dac75e4b5ba7dfbf3ecc1
* | test(unit/strings_spec): show ctx when vim_snprintf content check fails #32570James McCoy2025-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Same idea as a7be4b7bf857, but that only showed the context if the length of the string differed. Since these tests check both string length and string content, the ctx should be provided for both. ERROR test/unit/testutil.lua @ 797: vim_snprintf() positional arguments test/unit/testutil.lua:769: test/unit/testutil.lua:753: (string) ' test/unit/strings_spec.lua:159: snprintf(buf, 4, "%1$0.*2$b", 12ULL, cdata<int>: 0xf78c8ed8) = 001100 Expected objects to be the same. Passed in: (string) '000' Expected: (string) '001''
* | 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>
* | vim-patch:61af587: runtime(dockerfile): set comments in filetype pluginChristian Clason2025-02-22
| | | | | | | | | | | | | | | | closes: vim/vim#16698 https://github.com/vim/vim/commit/61af587f26f56be7d6b55f77e42cc89504942cc0 Co-authored-by: David Mandelberg <david@mandelberg.org>
* | vim-patch:d15114c: runtime(compiler): include svelte-check compilerChristian Clason2025-02-22
| | | | | | | | | | | | | | | | closes: vim/vim#16704 https://github.com/vim/vim/commit/d15114c148e615b0c244e94bf91548299f6af047 Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
* | fix(runtime): avoid E31 in ftplugin (#32578)phanium2025-02-22
| | | | | | fix: twice nunmap in ftplugin
* | 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.
* | vim-patch:9.1.1135: 'suffixesadd' doesn't work with multiple items (#32573)zeertzjq2025-02-22
| | | | | | | | | | | | | | | | | | | | | | Problem: 'suffixesadd' doesn't work with multiple items (after 9.1.1122). Solution: Don't concat multiple suffixes together. (zeertzjq) fixes: vim/vim#16694 closes: vim/vim#16699 https://github.com/vim/vim/commit/bf595ae4ac9ecc1e0620664177072926ed3679ff
* | 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`
* | fix(tests): filter out lines with __typeof__ keyword (#32524)Sören Tempel2025-02-22
| | | | | | | | | | | | | | | | Problem: On 32-bit architectures, musl libc makes heavy use of __typeof__ as part of its __REDIR macro for optional backwards compatibility with 32-bit time_t values. Unfortunately, the __typeof__ keyword is not supported by the LuaJIT C parser. Solution: Filter out the keyword in filter_complex_blocks.
* | vim-patch:9.1.1132: Mark positions wrong after triggering multiline ↵zeertzjq2025-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | completion (#32564) Problem: Mark positions wrong after triggering multiline completion. Solution: Call deleted_lines_mark() after deleting lines. (zeertzjq) closes: vim/vim#16687 https://github.com/vim/vim/commit/060e6556e2cd97512cee1f46bc7915768c0f9e21 Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
* | vim-patch:partial:9.1.1131: potential out-of-memory issue in search.c (#32565)zeertzjq2025-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: potential out-of-memory issue in search.c Solution: improve situation and refactor search.c slightly (John Marriott) - In function update_search_stat(): add a check for a theoretical null pointer reference, set and remember the length of lastpat, remove the three calls to STRLEN() and use the various string's associated lengths instead, add a check for an out-of-memory condition. - In function search_for_fuzz_match(): remove a call to strnsave() and thus avoid having to add a check for an out-of-memory condition, also replace the call to STRLEN() by ml_get_buf_len(). closes: vim/vim#16689 https://github.com/vim/vim/commit/b79fa3d9c8a08f15267797511d779e33bd33e68e Co-authored-by: John Marriott <basilisk@internode.on.net>
* | fix(marks): truncate double-width inline virt_text consistently (#32560)zeertzjq2025-02-21
| | | | | | | | - Fix wrong cursor position with 'listchars' "precedes". - Always show the '<' truncation character.
* | vim-patch:9.1.1130: 'listchars' "precedes" is not drawn on Tabs. (#32563)zeertzjq2025-02-21
| | | | | | | | | | | | | | | | | | | | Problem: 'listchars' "precedes" is not drawn on Tabs. Solution: Only draw 'listchars' "precedes" when not skipping over cells. (zeertzjq) fixes: vim/vim#5927 closes: vim/vim#16691 https://github.com/vim/vim/commit/13f100e9328b1344fec79806791eb3f5234d4ccc
* | 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.
* | test: adjust multibyte virtual text test (#32557)zeertzjq2025-02-21
| | | | | | | | Having more chars after a double-width char makes it easier to spot the bug where truncating it causes the pending chars to be lost.
* | fix(treesitter): `TSNode:field()` returns all children with the given fieldRiley Bruins2025-02-21
| |
* | vim-patch:3cb4148: runtime(sieve): set fileformat=dos in filetype pluginChristian Clason2025-02-21
| | | | | | | | | | | | | | | | | | | | | | References: https://datatracker.ietf.org/doc/html/rfc5228#section-2.2 closes: vim/vim#16685 https://github.com/vim/vim/commit/3cb41489dc8856959c1d586217f141ce057dc373 Co-authored-by: David Mandelberg <david@mandelberg.org>
* | vim-patch:27f5136: runtime(mail): add commentstring '> %s' to ftpluginChristian Clason2025-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new native commenting functionality is currently not used when editing mail. One could reasonably expect it to change the "quote" state of any given line in the mail (i.e. the preceding ">"), which would be very handy and feel natural when editing mail. Especially since the current file already uses "setlocal comments+=n:>". Solution: Add commentstring to `> %s` to be used in files of type mail. closes: vim/vim#16669 https://github.com/vim/vim/commit/27f51367613a150877e88d2379409bebdf32052b Co-authored-by: Lucas Eekhof <105216949+eekhof@users.noreply.github.com>
* | vim-patch:106899e: runtime(dnsmasq): include simple filetype pluginChristian Clason2025-02-21
| | | | | | | | | | | | | | | | closes: vim/vim#16671 https://github.com/vim/vim/commit/106899eb21ac0adfa0e31229d921a5f81e6a7e22 Co-authored-by: dringsim <dringsim@qq.com>
* | vim-patch:911742a: runtime(dosini): Add support for # comments to ftpluginChristian Clason2025-02-21
| | | | | | | | | | | | | | | | | | | | | | | | runtime/syntax/dosini.vim supports both ; and # as comments, and I think a bunch of the files detected as dosini do too, so add support for # to the ftplugin. closes: vim/vim#16681 https://github.com/vim/vim/commit/911742a975caf69c1e35a866288f58450eb476cd Co-authored-by: David Mandelberg <david@mandelberg.org>
* | perf(treesitter): only search for injections within the parse rangeRiley Bruins2025-02-21
| | | | | | | | Co-authored-by: Jaehwang Jung <tomtomjhj@gmail.com>
* | ci: add "_" to luacheck's list of global variablesRiley Bruins2025-02-21
| |
* | fix(messages): list_cmd kind for :registers, :au[g] #32531luukvbaal2025-02-20
| | | | | | | | | | | | | | | | Problem: No kind for `:registers/autocmd/augroup` messages. `:registers` chunks are emitted as separate `msg_show` events. Solution: Add the `list_cmd` kind to the message. Introduce a new `msg_ext_skip_flush` variable to set to true around a group of to be paired message chunks.
* | vim-patch:9.1.1127: preinsert text is not cleaned up correctly (#32544)zeertzjq2025-02-21
| | | | | | | | | | | | | | | | | | | | | | | | Problem: when 'completeopt' is set to preinsert the preinserted text is not cleared when adding new leader (Yee Cheng Chin) Solution: add a condition to delete preinsert text in edit function (glepnir) closes: vim/vim#16672 https://github.com/vim/vim/commit/52fd867f5e8a371653ee4fb6664593c82030f855 Co-authored-by: glepnir <glephunter@gmail.com>
* | vim-patch:9.1.1125: cannot loop through pum menu with multiline items (#32543)zeertzjq2025-02-21
| | | | | | | | | | | | | | | | | | | | | | | | Problem: cannot loop through pum menu with multiline items with fuzzy and noselect in 'completeopt' (Tomasz N) Solution: remove unnecessary compl_no_select condition (glepnir) fixes: vim/vim#16641 closes: vim/vim#16674 https://github.com/vim/vim/commit/3af0a8d8f5b090a6a4b085e7b6ee0f5f87eda399 Co-authored-by: glepnir <glephunter@gmail.com>
* | vim-patch:9.1.1126: patch 9.1.1121 used a wrong way to handle enterzeertzjq2025-02-21
| | | | | | | | | | | | | | | | | | | | | | | | Problem: patch 9.1.1121 used a wrong way to handle enter Solution: compl_enter_selects also needs to consider the selected item in ins_compl_new_leader() (glepnir) closes: vim/vim#16673 https://github.com/vim/vim/commit/44180416981000ad0bc5db4686889892e7a05cdd Co-authored-by: glepnir <glephunter@gmail.com>
* | test(completion_spec): make Enter test descriptions more accuratezeertzjq2025-02-21
| |
* | vim-patch:9.1.1121: Enter does not insert newline with "noselect"glepnir2025-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Enter does not insert newline with "noselect" when the pum is visible (lifepillar) Solution: When Enter is pressed and no complete-item is selected, ins_compl_prep returns false, and the edit function continues processing Enter to insert a new line. (glepnir) fixes: vim/vim#1653 closes: vim/vim#16653 https://github.com/vim/vim/commit/07f0dbe3aa326fdf4d0f1b1cf7d79df89e91fc6e Co-authored-by: glepnir <glephunter@gmail.com>
* | vim-patch:9.1.1124: No test for 'listchars' "precedes" with double-width ↵zeertzjq2025-02-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | char (#32541) Problem: No test for 'listchars' "precedes" with double-width char. Solution: Add a test and fix a typo in code (zeertzjq). closes: vim/vim#16675 https://github.com/vim/vim/commit/08a83a033a32c0f5bc42eaa63162c21c369cb4ae Cherry-pick test_listchars.vim changes from patch 9.0.0625. Fix a regression from #30014 by moving the mb_schar assignment after the double-width check.
* | feat(messages): confirm kind for z=, :tselect, inputlist() #32521luukvbaal2025-02-20
| | | | | | | | | | | | | | | | | | | | | | Problem: Messages preceding a `cmdline_show->prompt` event can not be distinguished as such when receiving the event. (But since `msg_show` handlers should be scheduled, one can already check whether a prompt is active when displaying the message.) Solution: Rather than add a new kind again, use the `confirm` kind. Could be seen as slightly misleading where it is more of a choice rather than a confirmation, but that already applies to `confirm()` as well...
* | 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".
* | fix(keycodes): recognize <Find>, <Select> #28431Mantas Mikulėnas2025-02-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PuTTY sets TERM=xterm, but sends ESC[1~ and ESC[4~ for Home/End keys, which does not match what the 'xterm' terminfo has for khome/kend, so libtermkeys instead reports them as the original DEC VT220 names. The VT220 came with a DEC LK201 keyboard which had the following keys in the area above arrow keys (where PCs now have Ins/Del/Home/End/etc): ┌────────┬────────┬────────┐ │ Find │ Insert │ Re- │ │ │ Here │ move │ ├────────┼────────┼────────┤ │ Select │ Prev │ Next │ │ │ Screen │ Screen │ └────────┴────────┴────────┘ These would send ESC[x~ sequences in the expected order: ┌────────┬────────┬────────┐ │ ESC[1~ │ ESC[2~ │ ESC[3~ │ ├────────┼────────┼────────┤ │ ESC[4~ │ ESC[5~ │ ESC[6~ │ └────────┴────────┴────────┘ Modern terminals continue to use the same sequences for Ins/Del as well as PageUp/PageDn. But the VT220 keyboard apparently had no Home/End, and PuTTY apparently chose to re-purpose the Find/Select key sequences for Home/End (even though it claims to emulate Xterm and this doesn't match what actual Xterm does). So when Home/End are used in Neovim through PuTTY with TERM=xterm (the default setting), libtermkey finds no match for the received sequences in the terminfo database and defaults to reporting them as <Find> and <Select> respectively. PuTTY is not unique here -- tmux *also* sends ESC[1~ and ESC[4~ after its internal translation -- but the difference is that 'tmux' terminfo correctly maps them to Home/End so Neovim recognizes them as such, while PuTTY defaults to using 'xterm' which uses a different mapping. This initial patch only allows Neovim to recognize <Find> and <Select> key codes as themselves, so that the user could manually map them e.g. using ":imap <Find> <Home>". Alternatives: - Using TERM=putty(-256color) would of course be the most correct solution, but in practice it leads to other minor issues, e.g. the need to have different PuTTY config profiles for older or non-Linux systems that lack that terminfo, or tmux's insistence on rendering italics as reverse. - Using Neovim through tmux avoids the problem (as tmux recognizes ESC[1~ on input), but is something that needs to be manually run every time. The keycodes.h constants are slightly misnamed because K_SELECT was already taken for a different purpose.
* | 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(api): remove invalid assertionsLuuk van Baal2025-02-19
| | | | | | | | | | Problem: `try_leave()` assertions moved in #31600 no longer hold. Solution: Remove the assertions.