aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* vim-patch:1718e7d: runtime(vim): Update base-syntax, improve ex-bang ↵zeertzjq2025-01-09
| | | | | | | | | | | | matching (#31922) Always match ex-bang explicitly rather than incidentally as the ! operator. fixes: vim/vim#16221 closes: vim/vim#16410 https://github.com/vim/vim/commit/1718e7d07e391571ac81c507a746b3bc7a7e2024 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* Merge pull request #31112 from famiu/refactor/options/set_option_forLewis Russell2025-01-08
|\ | | | | refactor(options): set option value for non-current context directly
| * refactor(options): set option value for non-current context directlyFamiu Haque2024-12-26
| | | | | | | | | | | | Problem: Currently, we use `switch_option_context` to temporarily switch the current option context before setting an option for a different buffer / window. This is not ideal because we already support getting and setting option values for non-current contexts in the underlying implementation. Solution: Set option value for non-current context by passing the context directly to the lower level functions. Also introduce a new `OptCtx` struct to store option context information, this will scale much better if we add more option scopes and other context information in the future.
| * refactor(autocmd): allow specifying window for autocmd contextFamiu Haque2024-12-26
| | | | | | | | | | | | Problem: Currently we can only specify a buffer to use for an autocmd context through `aucmd_prepbuf()`, which finds a window that uses that buffer in the current tabpage, or creates an autocmd window. This means it's not possible to actually specify a window to use for an autocmd. Solution: Add an `aucmd_prepbuf_win()` function which also takes a window as a parameter and uses it for the autocmd. If the window is not provided, then it behaves similarly to `aucmd_prepbuf()`
* | test(treesitter): inspect_tree #31182Guilherme Soares2025-01-08
| | | | | | To prevent #30986 and #31198 regression update inspect_tree tests
* | fix(api): nvim_set_decoration_provider callback return type #31912notomo2025-01-08
| | | | | | | | | | Problem: incorrect return type doc causes luals `Annotations specify that at most 0 return value(s) are required, found 1 returned here instead.` diagnosis Solution: correct return type doc
* | vim-patch:9.1.0995: filetype: shaderslang files are not detectedChristian Clason2025-01-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: filetype: shaderslang files are not detected Solution: detect '*.slang' files as shaderslang filetype, include a filetype and syntax script (mtvare6) Reference: https://shader-slang.com/ closes: vim/vim#16387 https://github.com/vim/vim/commit/616219f684744bcfad61a53c13166cda9b141dea Co-authored-by: mtvare6 <mtvare6@proton.me>
* | fix(api): crash on invalid buffer to nvim_buf_del_user_command (#31908)zeertzjq2025-01-08
| |
* | fix(highlight): make TablineSel more noticeable with 'notermguicolors' #31905Evgeni Chasnovski2025-01-07
| | | | | | | | | | | | | | | | Problem: Linking `TablineSel` to `Normal` makes it more noticeable with `notermguicolors` but less so with `termguicolors` (compared to using bold text in both cases). Solution: use bold text with `termguicolors` and regular with `notermguicolors`.
* | feat(health): show :checkhealth in floating window #31086glepnir2025-01-07
| | | | | | | | Problem: health can not shown in a floating window Solution: add g:health variable
* | perf(treesitter): don't fetch parser for each fold lineRiley Bruins2025-01-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | **Problem:** The treesitter `foldexpr` calls `get_parser()` for each line in the buffer when calculating folds. This can be incredibly slow for buffers where a parser cannot be found (because the result is not cached), and exponentially more so when the user has many `runtimepath`s. **Solution:** Only fetch the parser when it is needed; that is, only when initializing fold data for a buffer. Co-authored-by: Jongwook Choi <wookayin@gmail.com> Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* | fix(highlight): make `TablineSel` more noticeable #31896Jared Baur2025-01-07
| | | | | | | | The default `TablineSel` highlighting makes it subjectively difficult to differentiate the selected tab from unselected ones.
* | refactor: adopt vtermdundargoc2025-01-07
| | | | | | | | | | | | We have changed too much to consider it a mere bundled dependency (such as unicode handling in e3bfcf2fd4a4ebf00b104b082cfe83c8144a842d), and can consider it our own at this point.
* | vim-patch:3159b64: runtime(sh): fix typo in Last Change headerChristian Clason2025-01-07
| | | | | | | | | | | | | | | | related: vim/vim#16394 https://github.com/vim/vim/commit/3159b6494ec08fbe780d14e54ad4e89e7b55bb16 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | vim-patch:cf1f555: runtime(sh): add PS0 to bashSpecialVariables in syntax scriptChristian Clason2025-01-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | PS0 is also a special prompt variable. (It is expanded and displayed after it reads a command but before executing it.) References: https://www.gnu.org/software/bash/manual/html_node/Interactive-Shell-Behavior.html closes: vim/vim#16394 https://github.com/vim/vim/commit/cf1f55548d1c8782c5bd11f82354d98fb30cde42 Co-authored-by: Jon Parise <jon@indelible.org>
* | vim-patch:7ceaa8f: runtime(vim): Remove trailing comma from match_wordsChristian Clason2025-01-07
| | | | | | | | | | | | | | | | | | fixes: vim/vim#16377 (`filetype plugin indent on` breaks matchit). closes: vim/vim#16389 https://github.com/vim/vim/commit/7ceaa8f3ddbaad75fa02f91c0b354661b38253cb Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* | Merge pull request #31893 from zeertzjq/vim-9.1.0984zeertzjq2025-01-07
|\ \ | | | | | | vim-patch:9.1.{0984,0991}: getstacktrace(), v:stacktrace
| * | vim-patch:9.1.0991: v:stacktrace has wrong type in Vim9 scriptzeertzjq2025-01-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: v:stacktrace has wrong type in Vim9 script. Solution: Change the type to t_list_dict_any. Fix grammar in docs. (zeertzjq) closes: vim/vim#16390 https://github.com/vim/vim/commit/6655bef33047b826e0ccb8c686f3f57e47161b1c
| * | vim-patch:9.1.0984: exception handling can be improvedzeertzjq2025-01-07
|/ / | | | | | | | | | | | | | | | | | | | | | | Problem: exception handling can be improved Solution: add v:stacktrace and getstacktrace() closes: vim/vim#16360 https://github.com/vim/vim/commit/663d18d6102f40d14e36096ec590445e61026ed6 Co-authored-by: ichizok <gclient.gaap@gmail.com> Co-authored-by: Naruhiko Nishino <naru123456789@gmail.com>
* | vim-patch:9.1.0993: New 'cmdheight' behavior may be surprising #31892luukvbaal2025-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Although patch 9.1.0990 fixed a real problem/inconsistency, it also introduced new behavior that may break BWC and/or be unexpected. Before 9.1.0990, window commands could make the topframe smaller (without changing 'cmdheight'; quirk that is now fixed), but did not allow extending the topframe beyond the 'cmdheight' set by the user. After 9.1.0990, the user can reduce the 'cmdheight' below the value they set explicitly, through window commands, which may lead to confusion. (aftere v9.1.0990) Solution: Store the value explicitly set by the user and clamp the 'cmdheight' when resizing the topframe. This also applies to dragging laststatus, which in contrast to window commands _did_ allow reducing the 'cmdheight' to values below the one set by the user. So with this patch there is still new behavior, but I think in a way that is less surprising. While at it, also fix a Coverity warning, introduced in v9.1.0990 (Luuk van Baal) https://github.com/vim/vim/commit/c97e8695353565d6b20adffa48aad47f6e09967f
* | refactor(treesitter): simplify condition #31889Riley Bruins2025-01-06
| |
* | fix: fix incorrect search codedundargoc2025-01-06
| |
* | Merge #31625 perf(decor): improve iter_captures() cacheJustin M. Keyes2025-01-06
|\ \
| * | refactor: split predicates and directivesvanaigr2025-01-06
| | |
| * | perf(decor): join predicates and matches cachevanaigr2025-01-06
| | |
| * | test: benchmark treesitter highlighingvanaigr2025-01-06
| | |
* | | fix(lsp): open_floating_preview() zindex relative to current window #31886luukvbaal2025-01-06
|/ / | | | | | | | | Problem: open_floating_preview() may be hidden behind current window if that is floating and has a higher zindex. Solution: Open floating preview with zindex higher than current window.
* | Merge pull request #31882 from zeertzjq/vim-0c3e57bzeertzjq2025-01-06
|\ \ | | | | | | vim-patch: doc updates
| * | vim-patch:fd77161: runtime(doc): update doc for :horizontalzeertzjq2025-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert the documentation for :horizontal from commit 0c3e57b403e0e3a1fefc because :horizontal cannot be shortened to :ho closes: vim/vim#16362 https://github.com/vim/vim/commit/fd771613b3e59923b1a82a5ed9036c82899d133b Co-authored-by: h-east <h.east.727@gmail.com>
| * | vim-patch:0c3e57b: runtime(doc): update index.txt, windows.txt and version9.txtzeertzjq2025-01-06
|/ / | | | | | | | | | | | | | | | | closes: vim/vim#16357 https://github.com/vim/vim/commit/0c3e57b403e0e3a1fefca7bbd5ad4cb950eea616 Co-authored-by: h-east <h.east.727@gmail.com> Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
* | Merge pull request #31881 from zeertzjq/vim-21c37d7zeertzjq2025-01-06
|\ \ | | | | | | vim-patch: update Vim syntax
| * | vim-patch:6139766: runtime(vim): fix failing vim syntax testzeertzjq2025-01-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after v9.1.0985 related: vim/vim#16356 https://github.com/vim/vim/commit/6139766e825ca34948223cb4c88d3900b1940a17 Co-authored-by: h-east <h.east.727@gmail.com> N/A patch: vim-patch:8a27d97: runtime(doc): Capitalise the mnemonic "Zero" for the 'z' flag of search()
| * | vim-patch:21c37d7: runtime(vim): update base-syntax after v9.1.0936zeertzjq2025-01-06
|/ / | | | | | | | | | | https://github.com/vim/vim/commit/21c37d7f695077efe6df57806ff35da79adce1d5 Co-authored-by: Christian Brabandt <cb@256bit.org>
* | "nvim -es": disable shada #21723Justin M. Keyes2025-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: `nvim -es` (and `nvim -Es`) is the recommended way to non-interactively run commands/vimscript. But it enables shada by default, which is usually not wanted. Solution: - Disable shada by default for `nvim -es/-Es`. This can be overridden by `-i foo` if needed. - Do NOT change the 'loadplugins' default. - User config + packages _should_ be enabled by default, for both `nvim -es` and `nvim -l`. Else any Lua packages you have can't be accessed without `-u path/to/config`, which is clumsy. - Use-cases: ``` nvim --headless "+Lazy! sync" +qa would become: nvim -es "+Lazy! sync" nvim --headless +PlugInstall +qall would become: nvim -es +PlugInstall ``` - Opt-out (`--clean` or `-u NONE`) is much easier than opt-in (`-u path/to/config`). - User config/packages are analogous to pip packages, which are expected when doing `python -c ...`. related: 7c94bcd2d77e2e54b8836ab8325460a367b79eae related: ddd0eb6f5120a09b97867d2561ea61309038ccd2
* | fix(health): "q" should not close last window #31876Justin M. Keyes2025-01-05
| |
* | build: fix RelWithDebInfo optimization flags #31802Daiki Noda2025-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: RelWithDebInfo generates redundant flags: Compilation: /usr/bin/cc -O2 -g -Og -g The `CMAKE_C_FLAGS_RELWITHDEBINFO` variable is being modified in a way that caused duplicate `-Og` and `-g` flags to be added. The resulting flags were `-O2 -g -Og -g`. - `-Og` (Optimize for debugging) and `-O2` (Optimize for performance) are different optimization levels. We can't use both at once. - The duplicate `-g` flag is redundant and no effect. multiple -O flags has no effect for code, just redundant. > If you use multiple -O options, with or without level numbers, the last such option is the one that is effective. https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html Solution: Adjust the flags to use the more appropriate `-O2 -g`. Compilation: /usr/bin/cc -O2 -g BEFORE: ``` :verbose version NVIM v0.11.0-dev-1443+ge00cd1ab40 Build type: RelWithDebInfo LuaJIT 2.1.1734355927 Compilation: /usr/bin/cc -O2 -g -Og -g -flto -fno-fat-lto-ob jects -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict ... ``` AFTER: ``` :verbose version NVIM v0.11.0-dev-e00cd1ab4-dirty Build type: RelWithDebInfo LuaJIT 2.1.1734355927 Compilation: /usr/bin/cc -O2 -g -flto -fno-fat-lto-objects - Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-protot ... ```
* | feat(health): close checkhealth buffers with q #31870Maria José Solano2025-01-05
| |
* | vim-patch:202ebc6: runtime(zsh): sync syntax script with upstream repoChristian Clason2025-01-05
| | | | | | | | | | | | | | | | fixes: vim/vim#16371 https://github.com/vim/vim/commit/202ebc6ced6c5d7c0cdd9a79867af14aab39f75d Co-authored-by: Christian Brabandt <cb@256bit.org>
* | fix(cmdline): always show cmdline when it is a prompt #31866luukvbaal2025-01-05
| | | | | | Cmdline prompts should ignore `cmd_silent`.
* | fix(api): nvim__complete_set requires completeopt=popup #31177glepnir2025-01-05
| | | | | | | | | | | | | | | | Problem: If completeopt does not include "popup" flag, nvim__complete_set still auto-creates a floating preview window. Solution: Fail if completeopt does not include the "popup" flag.
* | fix(popup): wrong extmark data sync when lines changed in popup preview #30246glepnir2025-01-05
| | | | | | | | | | | | | | | | Problem: when popup preview buffer has filetype like markdown and ts is enabled, the extmark clean and update not correct, if add the extmark sync there has lots of duplicate codes like nvim_buf_set_lines. Solution: use nvim_buf_set_lines api internally to set info to popup preview buffer.
* | feat(func): allow manual cache invalidation for _memoizeRiley Bruins2025-01-05
| | | | | | | | | | This commit also adds some tests for the existing memoization functionality.
* | vim-patch:9.1.0990: Inconsistent behavior when changing cmdheight (#31830)luukvbaal2025-01-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Inconsistent behavior when changing cmdheight by resizing the topframe through wincmds and dragging laststatus. Changing cmdheight by resizing the topframe does not trigger OptionSet. Solution: Consolidate logic for changing the cmdheight, set the option value to handle side-effects (Luuk van Baal) https://github.com/vim/vim/commit/e15cbc1af47e9dea90448c714eb4908e5d4302fc vim-patch:9.0.0187: command line height changes when maximizing window height Problem: Command line height changes when maximizing window height. Solution: Do not change the command line height. (closes vim/vim#10885) https://github.com/vim/vim/commit/96bde99bf890acd9952863a02c1d15edca2000e1
* | fix(health): set nomodifiable in checkhealth buffersMaria José Solano2025-01-05
| |
* | refactor(tests): merge n.spawn/n.spawn_argv into n.new_session #31859Justin M. Keyes2025-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: - `n.spawn()` is misleading because it also connects RPC, it's not just "spawning" a process. - It's confusing that `n.spawn()` and `n.spawn_argv()` are separate. Solution: - Replace `n.spawn()`/`n.spawn_argv()` with a single function `n.new_session()`. This name aligns with the existing functions `n.set_session`/`n.get_session`. - Note: removes direct handling of `prepend_argv`, but I doubt that was important or intentional. If callers want to control use of `prepend_argv` then we should add a new flag to `test.session.Opts`. - Move `keep` to first parameter of `n.new_session()`. - Add a `merge` flag to `test.session.Opts` - Mark `_new_argv()` as private. Test should use clear/new_session/spawn_wait instead.
* | fix(vim.fs.normalize): normalize case for windows drive letterdundargoc2025-01-04
| | | | | | | | | | Also add tests for the current path casing behavior so it doesn't get accidentally changed.
* | fix(runtime): let matchit and matchparen skips fallback on treesitter capturesEmilia Simmons2025-01-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When treesitter is enabled, by default syntax groups are not defined, but these groups are used to identify where to skip matches in matchit and matchparen. This patch does three things: 1. If syntax is enabled regardless of treesitter (`vim.bo.syntax='on'`): Use original implementation. 2. If treesitter is enabled and syntax is not: Match the syntax groups (i.e. `comment\|string`) against treesitter captures to check for skipped groups. 3. Add an explicit treesitter syntax for marking captures to skip: matchit uses `b:match_skip` to determine what counts as skippable Where 's:comment\|string' uses a match of the named syntax groups against a regex match of comment\|string, 't:comment\|string' now uses vim regex to match against the names of the treesitter capture groups.
* | docs: cleanup news.txt (#31854)Gregory Anders2025-01-04
| | | | | | Move non-breaking changes out of the breaking changes section
* | test: use spawn_wait() instead of system() #31852Justin M. Keyes2025-01-04
| | | | | | | | | | | | | | | | | | | | | | Problem: Tests that need to check `nvim` CLI behavior (no RPC session) create their own ad-hoc `system()` wrappers. Solution: - Use `n.spawn_wait` instead of `system()`. - Bonus: this also improves the tests by explicitly checking for `stdout` or `stderr`. And if a signal is raised, `ProcStream.status` will reflect it.
* | vim-patch:cd96075: runtime(java): Quietly opt out for unsupported ↵Christian Clason2025-01-04
| | | | | | | | | | | | | | | | | | | | | | markdown.vim versions fixes vim/vim#16349 closes: vim/vim#16369 https://github.com/vim/vim/commit/cd96075cdee6b606c6e39aa1aed19b7cdc867df8 Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>