aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* feat(comment): allow commentstring to be determined from node metadataRiley Bruins2025-03-02
| | | | | | | | | | | **Problem:** Some weird languages have different comment syntax depending on the location in the code, and we do not have a way to determine the correct `commentstring` for these special cases. **Solution:** Allow queries to specify `commentstring` values in metadata, allowing users/`nvim-treesitter` to provide a better commenting experience without hugely increasing the scope of the code in core.
* test: simplify ASAN detectiondundargoc2025-03-02
|
* test: enable more multigrid popup tests (#32470)fredizzimo2025-03-02
|
* build!: turn off translations by defaultdundargoc2025-03-02
| | | | | The translation step prolongs the build time too much to be enabled by default. Enable it by passing cmake flag `ENABLE_TRANSLATIONS=ON`.
* vim-patch:9.1.1161: preinsert requires bot "menu" and "menuone" to be setzeertzjq2025-03-02
| | | | | | | | | | | | Problem: preinsert requires bot "menu" and "menuone" to be set, but "menu" is redundant (after v9.1.1160) Solution: preinsert only requires menuone (glepnir) closes: vim/vim#16763 https://github.com/vim/vim/commit/94a045ed56d7616c0cd0080d3f308d6cf9fbe64c Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:9.1.1160: Ctrl-Y does not work well with "preinsert" when ↵zeertzjq2025-03-02
| | | | | | | | | | | | | | | | | | | | | completing items Problem: The 'preinsert' feature requires Ctrl-Y to confirm insertion, but Ctrl-Y only works when the popup menu (pum) is displayed. Without enforcing this dependency, it could lead to confusing behavior or non-functional features. Solution: Modify ins_compl_has_preinsert() to check for both 'menu' and 'menuone' flags when 'preinsert' is set. Update documentation to clarify this requirement. This avoids adding complex conditional behaviors. (glepnir) fixes: vim/vim#16728 closes: vim/vim#16753 https://github.com/vim/vim/commit/a2c5559f297a18dc1ce3c4f1f9fd6204aed321c9 Co-authored-by: glepnir <glephunter@gmail.com>
* vim-patch:0b82054: runtime(lua): Improve 'include' and make '*expr' ↵brianhuster2025-03-02
| | | | | | | | | | | | | | | functions script-local - Prevent 'include' from matching variable assignments as calls to require() and others. - Use script-local functions for 'includeexpr' and 'foldexpr'. - Formatting fixes. closes: vim/vim#16746 https://github.com/vim/vim/commit/0b8205484b703b4a5a569cd1b0ed876bbb13901f Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* vim-patch:00a00f5: runtime(lua): Update lua ftplugin and documentationbrianhuster2025-03-02
| | | | | | | | | | | | | | | | | | | Problem: - The doc says the default `g:lua_subversion` is 2, but in fact it is 3 (see `runtime/syntax/lua.vim`) - `includeexpr` doesn't work with module in `init.lua` Solution: - Update documentation - Assign value to option `&include` - Add function `LuaInclude` and assign it to `l:&includeexpr` closes: vim/vim#16655 https://github.com/vim/vim/commit/00a00f5d3fc8dcf08e959c207a90f5902abc6a08 Co-authored-by: brianhuster <phambinhanctb2004@gmail.com> Co-authored-by: dkearns <dougkearns@gmail.com>
* vim-patch:8ac975d: runtime(tar): fix syntax error in tar.vimChristian Clason2025-03-01
| | | | | | https://github.com/vim/vim/commit/8ac975d97e153205a82ef0177013260f59cc6a2e Co-authored-by: Christian Brabandt <cb@256bit.org>
* feat(treesitter): add more metadata to `language.inspect()` (#32657)Lewis Russell2025-03-01
| | | | | | | | | Problem: No way to check the version of a treesitter parser. Solution: Add version metadata (ABI 15 parsers only) as well as parser state count and supertype information (ABI 15) in `vim.treesitter.language.inspect()`. Also graduate the `abi_version` field, as this is now the official upstream name. --------- Co-authored-by: Christian Clason <c.clason@uni-graz.at>
* vim-patch:56957ed: runtime(misc): add support for bzip3 to tar, vimball and ↵Christian Clason2025-03-01
| | | | | | | | | | | gzip plugins fixes: vim/vim#16751 closes: vim/vim#16755 https://github.com/vim/vim/commit/56957ed4109fb0c37922c6c37d5926cfe0a3313b Co-authored-by: Jim Zhou <jimzhouzzy@gmail.com>
* vim-patch:9.1.1158: :verbose set has wrong file name with :compiler! (#32682)zeertzjq2025-02-28
| | | | | | | | Problem: :verbose set has wrong file name with :compiler! Solution: Add -keepscript (zeertzjq) closes: vim/vim#16752 https://github.com/vim/vim/commit/5e8b2268e180cbf5079ea6dbe9c8fd29c3e3133c
* 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'.
* Merge pull request #28486 from zeertzjq/vim-8.2.4603zeertzjq2025-02-28
|\ | | | | vim-patch:8.2.{4594,4603,4607,4647,4974}
| * vim-patch:8.2.4974: ":so" command may read after end of bufferzeertzjq2025-02-28
| | | | | | | | | | | | | | | | | | Problem: ":so" command may read after end of buffer. Solution: Compute length of text properly. https://github.com/vim/vim/commit/4748c4bd64610cf943a431d215bb1aad51f8d0b4 Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.2.4647: "source" can read past end of copied linezeertzjq2025-02-28
| | | | | | | | | | | | | | | | | | Problem: "source" can read past end of copied line. Solution: Add a terminating NUL. https://github.com/vim/vim/commit/2bdad6126778f907c0b98002bfebf0e611a3f5db Co-authored-by: Bram Moolenaar <Bram@vim.org>
| * vim-patch:8.2.4607: sourcing buffer lines may lead to errors for conflictszeertzjq2025-02-28
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Sourcing buffer lines may lead to errors for conflicts. Solution: Add the ++clear argument. (Yegappan Lakshmanan, closes vim/vim#9991) https://github.com/vim/vim/commit/35dc17634dd6da5b90bd1b0160c4ed9e394f4b87 Documentation changes only. Vim9script is N/A. Cherry-pick another documentation change for :source from latest Vim. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * vim-patch:8.2.4603: sourcing buffer lines is too complicatedzeertzjq2025-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Sourcing buffer lines is too complicated. Solution: Simplify the code. Make it possible to source Vim9 script lines. (Yegappan Lakshmanan, closes vim/vim#9974) https://github.com/vim/vim/commit/85b43c6cb7d56919e245622f4e42db6d8bee4194 This commit changes the behavior of sourcing buffer lines to always have a script ID, although sourcing the same buffer always produces the same script ID. vim-patch:9.1.0372: Calling CLEAR_FIELD() on the same struct twice Problem: Calling CLEAR_FIELD() on the same struct twice. Solution: Remove the second CLEAR_FIELD(). Move the assignment of cookie.sourceing_lnum (zeertzjq). closes: vim/vim#14627 https://github.com/vim/vim/commit/f68517c1671dfedcc1555da50bc0b3de6d2842f6 Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
| * vim-patch:8.2.4594: need to write script to a file to be able to source themzeertzjq2025-02-28
|/ | | | | | | | | | | | | Problem: Need to write script to a file to be able to source them. Solution: Make ":source" use lines from the current buffer. (Yegappan Lakshmanan et al., closes vim/vim#9967) https://github.com/vim/vim/commit/36a5b6867bb6c0bd69c8da7d788000ab8a0b0ab0 Most code and test changes are reverted or modified again in patch 8.2.4603, so only port parts that are untouched in patch 8.2.4603. Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* fix(treesitter): correctly parse queries with combined injectionsRiley Bruins2025-02-28
|
* vim-patch:3d75ec7: runtime(compiler): improve svelte-checkChristian Clason2025-02-28
| | | | | | | | closes: vim/vim#16749 https://github.com/vim/vim/commit/3d75ec7401850e8a80ae7ab5ad1b84f47bc32095 Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
* 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
* vim-patch:60bd140: runtime(vim): Update base-syntax, match Vim9 function ↵zeertzjq2025-02-28
| | | | | | | | | | | | | calls after "|" (#32670) Match Vim9 function calls after ex-bar. These are also currently matched but invalid syntax for legacy script. fixes: vim/vim#16721 closes: vim/vim#16747 https://github.com/vim/vim/commit/60bd140256be4f567c28c60eb84be72c19a164bd Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* vim-patch:9.1.1157: command completion wrong for input() (#32669)zeertzjq2025-02-28
| | | | | | | | | | | | | Problem: command completion wrong for input() (Cdrman Fu) Solution: Set commandline completion context explicitly (Jim Zhou) fixes vim/vim#16723 closes: vim/vim#16733 https://github.com/vim/vim/commit/3255af850e8bab35c30fce4177bb5ba4a941e6ce Co-authored-by: Jim Zhou <csd_189@163.com>
* vim-patch:9.1.1156: tests: No test for what patch 9.1.1152 fixes (#32668)zeertzjq2025-02-27
| | | | | | | | Problem: No test for what patch 9.1.1152 fixes. Solution: Add a test (zeertzjq). closes: vim/vim#16742 https://github.com/vim/vim/commit/4be1ab80befd78a80a05c2e66aeff58113832f46
* vim-patch:9.1.1155: Mode message not cleared after :silent message (#32667)zeertzjq2025-02-27
| | | | | | | | | | | Problem: Mode message not cleared after :silent message (after 9.0.1634). Solution: Don't reset mode_displayed when the message is empty. (zeertzjq) fixes: neovim/neovim#32641 closes: vim/vim#16744 https://github.com/vim/vim/commit/fce1fa5b618458f6f10028faadc9a9ddc227fe76
* fix(lua): wrong script context for option set by func from nvim_exec2 (#32659)zeertzjq2025-02-27
| | | | | | | | | Problem: Wrong script context for option set by function defined by nvim_exec2 in a Lua script. Solution: Call nlua_set_sctx() after adding SOURCING_LNUM and always set sc_lnum for a Lua script. This is a bug discovered when testing #28486. Not sure if this actually happens in practice, but it's easy to fix and required for #28486.
* fix(display): correctly store winline info for concealed lines (#32656)luukvbaal2025-02-27
| | | Off-by-one error in storing last line number for a logical line.
* fix(popup): reuse pum preview float win, set 'winfixbuf' #32636glepnir2025-02-27
| | | | | | | | | | | Problem: popup floating window is closed and recreated for each item selection, this is a bit wasteful. Solution: - Hide the preview win (instead of closing it) when the menu is still displayed: 1. When selected_item is -1. 2. When switching from an item with an "info" field to one without. - When pum is undisplayed it is still closed.
* 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`.
* refactor(do_source): remove duplicate assignments (#32654)zeertzjq2025-02-27
| | | The code above have already set sc_lnum to 0.
* fix(move): 'scrolloff' cursor correction no longer handles folds properly ↵luukvbaal2025-02-27
| | | | | | | (#32642) Problem: f58e7d5f passed `&botline` to `plines_win_full()`, (probably) assuming it would be set to the first line of the fold. Solution: Reinstate call to `hasFolding()` to do so.
* test: option set by Lua autocommand has correct script context (#32652)zeertzjq2025-02-27
|
* refactor(shada): fix coverity warning about leaking memory (#32650)zeertzjq2025-02-27
|
* Merge pull request #32649 from zeertzjq/vim-9.1.1151zeertzjq2025-02-27
|\ | | | | vim-patch:9.1.{1151,1152}
| * vim-patch:9.1.1152: Patch v9.1.1151 causes problemszeertzjq2025-02-27
| | | | | | | | | | | | | | | | | | | | | | Problem: Patch v9.1.1151 causes problems Solution: partially revert it (John Marriott) closes: vim/vim#16736 https://github.com/vim/vim/commit/18bacc811c30ba26405cadbeb79d9013d9885bb5 Co-authored-by: John Marriott <basilisk@internode.on.net>
| * vim-patch:9.1.1151: too many strlen() calls in getchar.czeertzjq2025-02-27
|/ | | | | | | | | | | | | Problem: too many strlen() calls in getchar.c Solution: store last inserted and recorded lengths, add functions to retrieve those and use those functions (John Marriott) closes: vim/vim#16720 https://github.com/vim/vim/commit/d3c4b7e9461f90bad7a671c1221d65def9cccc89 Co-authored-by: John Marriott <basilisk@internode.on.net>
* refactor: old references to scripts/ dir #32647Justin M. Keyes2025-02-26
|
* Merge #32601 vim.text.indent()Justin M. Keyes2025-02-26
|\
| * test: unreliable swapfile_preserve_recover_specJustin M. Keyes2025-02-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Test sometimes fails on bsd (cirrus ci): test/functional/ex_cmds/swapfile_preserve_recover_spec.lua:589: retry() attempts: 464 test/functional/ex_cmds/swapfile_preserve_recover_spec.lua:590: Expected objects to be the same. Passed in: (table: 0x0d5f1aa44070) { [1] = '' *[2] = '' [3] = '[Process exited 1]' } Expected: (table: 0x0d5ea3eb8718) { [1] = '' *[2] = '[Process exited 1]' [3] = '' } stack traceback: test/testutil.lua:104: in function 'retry' test/functional/ex_cmds/swapfile_preserve_recover_spec.lua:589: in function <test/functional/ex_cmds/swapfile_preserve_recover_spec.lua:556> Solution: Filter out empty items to avoid irrelevant redraw-timing assumptions.
| * 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(shada): ":wshada/:rshada [filename]" with shadafile=NONE #32538IpsumCapra2025-02-26
| | | | | | | | | | | Problem: read/write shada function logic was skipped entirely if it was detected the shadafile option was set to 'NONE'. Solution: The filename is now always resolved. When the shadafile option is set to 'NONE' AND no filename was passed, the filename resolves to an empty string, which causes the read/write functions to return. Regardless of whether the option is set to 'NONE', when a filename is explicitly passed, it gets resolved and the read/write logic is accessed.
* build: move all generator scripts to `src/gen/`Lewis Russell2025-02-26
| | | | | | | | | | | - Move all generator Lua scripts to the `src/gen/` - Add a `.luarc.json` to `src/gen/` - Add a `preload.lua` to `src/gen/` - Add `src` to `package.path` so it aligns with `.luarc.json' - Fix all `require` statements in `src/gen/` so they are consistent: - `require('scripts.foo')` -> `require('gen.foo')` - `require('src.nvim.options')` -> `require('nvim.options')` - `require('api.dispatch_deprecated')` -> `require('nvim.api.dispatch_deprecated')`
* refactor(gen_api_dispatch): avoid trailing spaces (#32632)zeertzjq2025-02-26
| | | | | | | | | | Problem: Generated Lua API bindings may have trailing spaces (e.g. nvim_set_hl). Solution: Add leading spaces only if arg_free_code is non-empty. Also: - Remove an unnecessary string.format() in write_shifted_output() args. - Fix incorrect indent for the nlua_push_keydict() below.
* Merge pull request #32631 from jamessan/snprintf-binaryJames McCoy2025-02-26
|\ | | | | fix(vim_snprintf): special-case handling of binary format
| * fix(vim_snprintf): special-case handling of binary formatJames McCoy2025-02-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A binary format spec always expects a corresponding unsigned long long value. However, that explicit handling didn't get included when porting the code from Vim, so binary format spec was falling through to the "unsigned" and "length_modifier = NUL" portion of the code: } else { // unsigned switch (length_modifier) { case NUL: uarg = (tvs ? (unsigned)tv_nr(tvs, &arg_idx) : (skip_to_arg(ap_types, ap_start, &ap, &arg_idx, &arg_cur, fmt), va_arg(ap, unsigned))); break; This incorrectly read an "unsigned" value from an "unsigned long long" variable, which would produce incorrect results on certain platforms.
* | build(cjson): sync with upstream (#32114)Tristan Knight2025-02-26
| | | | | | | | Sync with commit https://github.com/openresty/lua-cjson/commit/91ca29db9a4a4fd0eedaebcd5d5f3ba2ace5ae63
* | fix(eval): don't shorten $HOME in v:stacktrace (#32634)zeertzjq2025-02-26
| |
* | refactor: remove unnecessary allocation for "run Nvim with -V1" (#32633)zeertzjq2025-02-26
|/