aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* 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>
* Merge #30384 test: spawn_wait()Justin M. Keyes2025-01-03
|\
| * test: include stderr in EOF failure messageJustin M. Keyes2025-01-03
| |
| * test: spawn_wait() starts a non-RPC Nvim processJustin M. Keyes2025-01-03
| | | | | | | | | | | | | | | | | | | | | | Problem: Can't use `n.clear()` to test non-RPC `nvim` invocations. So tests end up creating ad-hoc wrappers around `system()` or `jobstart()`. Solution: - Introduce `n.spawn_wait()` - TODO (followup PR): Rename `n.spawn()` and `n.spawn_wait()`. It's misleading that `n.spawn()` returns a RPC session...
| * fix(grid): grid_line_start NULL access with 'redrawdebug'Justin M. Keyes2025-01-03
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: This test causes a null pointer dereference: local proc = n.spawn_wait('-l', 'test/functional/fixtures/startup-fail.lua') RUN T1565 startup -l Lua Lua-error sets Nvim exitcode: 241.00 ms OK ==================== File …/build/log/asan.13763 ==================== = …/src/nvim/grid.c:389:12: runtime error: null pointer passed as argument 1, which is declared to never be null = /usr/include/string.h:61:62: note: nonnull attribute specified here = 0 0x55cc2d869762 in grid_line_start …/src/nvim/grid.c:389:5 = 1 0x55cc2d8717ca in grid_clear …/src/nvim/grid.c:618:5 = 2 0x55cc2dbe0f6f in msg_clr_eos_force …/src/nvim/message.c:3085:3 = 3 0x55cc2dbbbdec in msg_clr_eos …/src/nvim/message.c:3061:5 = 4 0x55cc2dbbae2c in msg_multiline …/src/nvim/message.c:281:9 = 5 0x55cc2dbba2b4 in msg_keep …/src/nvim/message.c:364:5 = 6 0x55cc2dbc4992 in emsg_multiline …/src/nvim/message.c:773:10 = 7 0x55cc2dbc5d43 in semsg_multiline …/src/nvim/message.c:824:9 = 8 0x55cc2d9c5945 in nlua_error …/src/nvim/lua/executor.c:158:5 = 9 0x55cc2d9c89fd in nlua_exec_file …/src/nvim/lua/executor.c:1862:5 = 10 0x55cc2d9f4d69 in main …/src/nvim/main.c:637:19 = 11 0x7f319b62a1c9 in __libc_start_call_main csu/../sysdeps/nptl/libc_start_call_main.h:58:16 = 12 0x7f319b62a28a in __libc_start_main csu/../csu/libc-start.c:360:3 = 13 0x55cc2ced0f64 in _start (…/build/bin/nvim+0xc48f64) (BuildId: 309c83f8d74297c89719dae9c271dd8ec23e64c3) Cause: The tests use `redrawdebug=invalid` by default, but `default_grid_alloc` skips calling `grid_alloc` when not `full_screen`. Solution: Check for `full_screen`.
* docs: misc #31822Justin M. Keyes2025-01-03
| | | | | * docs: drop "lua-" prefix from most treesitter tags * docs: move mouse section from tui.txt to gui.txt * docs: misc
* fix(messages): better formatting for ext_messages #31839luukvbaal2025-01-03
| | | | | | | | | | Problem: Message grid newline formatting based on `msg_col` is not utilized with ext_messages. Solution: Increment `msg_col` with the cell width of the chunk. Allowing message code that uses `msg_col` to determine when to place a newline to do so. E.g. when the message goes beyond `Columns`; this is not necessarily where the ext_messages implementation would want to place a newline, but it is a best guess. Message parsing and manipulation is still possible.
* vim-patch:fc61cfd: runtime(vim): Update matchit pattern, no Vim9 short names ↵zeertzjq2025-01-03
| | | | | | | | | (#31843) Abbreviated :enum and :interface commands are no longer supported. https://github.com/vim/vim/commit/fc61cfd60e6d99765d1a68d39d6613e0917c7c56 Co-authored-by: Doug Kearns <dougkearns@gmail.com>
* vim-patch:9.1.0987: filetype: cake files are not recognizedChristian Clason2025-01-03
| | | | | | | | | | | | | | | Problem: filetype: cake files are not recognized Solution: detect '*.cake' files as cs filetype (Zoe Roux) References: https://cakebuild.net/ closes: vim/vim#16367 https://github.com/vim/vim/commit/a407573f30a978b3aa61532bbd9b0ae94a87dc32 Co-authored-by: Zoe Roux <zoe.roux@zoriya.dev>
* vim-patch:9.1.0986: filetype: 'jj' filetype is a bit impreciseChristian Clason2025-01-03
| | | | | | | | | | | | Problem: filetype: 'jj' filetype is a bit imprecise Solution: rename 'jj' filetype to 'jjdescription' (Gregory Anders) closes: vim/vim#16364 https://github.com/vim/vim/commit/58c44e8833365e1a777330491c2799ae324ed893 Co-authored-by: Gregory Anders <greg@gpanders.com>
* vim-patch:bde76da: runtime(jj): Support diffs in jj syntaxChristian Clason2025-01-03
| | | | | | | | related: vim/vim#16364 https://github.com/vim/vim/commit/bde76da4d02d93d8ea9e523d1057d59a19de276a Co-authored-by: Gregory Anders <greg@gpanders.com>
* Merge pull request #31635 from bfredl/vtermpiratesbfredl2025-01-03
|\ | | | | feat(terminal): support grapheme clusters, including emoji
| * feat(terminal): support grapheme clusters, including emojibfredl2025-01-02
| |
* | feat(ui): more intuitive :substitute confirm prompt #31787luukvbaal2025-01-02
| | | | | | | | Problem: Unknown key mappings listed in substitute confirm message. Solution: Include hints as to what the key mappings do.
* | feat(ui)!: emit prompt "messages" as cmdline events #31525luukvbaal2025-01-02
|/ | | | | | | Problem: Prompts are emitted as messages events, where cmdline events are more appropriate. The user input is also emitted as message events in fast context, so cannot be displayed with vim.ui_attach(). Solution: Prompt for user input through cmdline prompts.
* fix(lsp): ensure watcher cancelJaehwang Jung2025-01-02
| | | | | | | * Cancel watcher in the "force" case. * Cancel watcher outside the async callback. It seems nvim doesn't wait async jobs on quitting, leaving detached inotifywait processes. * Clean up cancelling callbacks.
* fix(jobs): do not block UI when jobwait() doesn't block (#31803)Gregory Anders2025-01-01
|
* fix(vim.fs.abspath): correctly handle UNC pathsdundargoc2025-01-01
|
* docs: misc #31479Justin M. Keyes2025-01-01
|
* refactor(options): use `const` in more places (#31791)Famiu Haque2025-01-01
|
* build(deps): bump utf8proc to v2.10.0Christian Clason2025-01-01
|
* fix(tui): handle key events for arrow and function keys (#31804)Gregory Anders2024-12-31
| | | | | | | | | | | | | Arrow and function keys do not use CSI u with the kitty keyboard protocol. For example, the Up arrow key uses CSI A, and the function keys use a variety of different CSI sequences. Until now, termkey only parsed subparams used by key events for CSI u sequences. The result being that any key which did not use CSI u (e.g. arrow and function keys) was being emitted twice by termkey since it was not recognizing the separate press and release events. This commit makes termkey also parse subparams for other key sequences so that the release key events do not send duplicate keys.
* feat(clipboard)!: use OSC 52 as fallback clipboard provider (#31730)Gregory Anders2024-12-31
| | | | | | | | | | | | | | | We currently enable the OSC 52 clipboard provider by setting g:clipboard when a list of conditions are met, one of which is that $SSH_TTY must be set. We include this condition because often OSC 52 is not the best clipboard provider, so if there are "local" providers available Nvim should prefer those over OSC 52. However, if no other providers are available, Nvim should use OSC 52 even when $SSH_TTY is not set. When a user is in an SSH session then the checks for the other clipboard providers will still (typically) fail, so OSC 52 continues to be enabled by default in SSH sessions. This is marked as a breaking change because there are some cases where OSC 52 wasn't enabled before and is now (or vice versa).