aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* vim-patch:9.1.1226: "shellcmdline" completion doesn't work with input() (#32998)zeertzjq2025-03-20
| | | | | | | | | | | | | | Problem: "shellcmdline" completion doesn't work with input(). Solution: Use set_context_for_wildcard_arg(). Fix indent in nextwild() (zeertzjq). There are some other inconsistencies for input() completion (ref vim/vim#948), but since "shellcmdline" currently doesn't work at all, it makse sense to at least make it work. fixes: vim/vim#16932 closes: vim/vim#16934 https://github.com/vim/vim/commit/7a5115ce50c622caf91503f9d7fe09c3749b928b
* fix(messages): incorrect error message splitting and kind #32990luukvbaal2025-03-19
| | | | | | | | | Problem: Message kind logic for emitting an error message is convoluted and still results in emitting an unfinished message earlier than wanted. Solution: Ensure emsg_multiline() always sets the kind wanted by the caller and doesn't isn't unset to logic for emitting the source message. Caller is responsible for making sure multiple message chunks are not emitted as multiple events by setting `msg_ext_skip_flush`...
* fix(checkhealth): module not found when `&rtp` has nested paths #32988phanium2025-03-19
| | | | | | | | | | | Problem: `:checkhealth` fail to find the module when `&rtp` have nested paths. Solution: find in order all existed `&rtp/lua` path rather than `&rtp` to ensure prefix exist before trim `&rtp`. In this case one module can be searched out from two different `&rtp/lua`, we use the first `&rtp/lua` contain the module (like how require() works).
* fix(snippet): wrong indentation when snippet contains "^" #32970Avinash Thakur2025-03-19
| | | | | | | | | | | | | | | | | | | | | | | ## Problem The pattern used to match indentation is wrong as can be seen in ```lua -- current pattern doesn't match starting space print(vim.inspect((" xyz"):match("(^%s+)%S"))) -- nil -- instead, it matches characters `^ ` in text print(vim.inspect(("x^ yz"):match("(^%s+)%S"))) -- "^ " -- indentation could've been matched by, however not required print(vim.inspect((" xyz"):match("^(%s+)%S"))) -- " " ``` ## Solution We don't even need to modify `base_indent` at every line. If every line's indentation is calculated by the previous line's indentation (which already has starting indentation) added to the starting indentation, we see that indentation is multiplied on every line. Hence, we only add the starting line indentation to every line.
* fix(path): crash with nvim_get_runtime_file during wildcard expansion (#32992)zeertzjq2025-03-19
| | | | | Problem: Crash with nvim_get_runtime_file during wildcard expansion. Solution: Ensure recursive gen_expand_wildcards() is allowed when calling os_breakcheck()
* fix(filetype): normalize full path before matching #32227markstegeman2025-03-19
| | | | | | | | | | | | | Problem: On Windows, treesitter query files are not recognized as such when opened from inside their directory, because the full path returned from fnamemodify(_, ':p') contains backslashes, while the filetype patterns expect forward slashes. Solution: Normalize the result of fnamemodify(_, ':p') before trying to match it to filetype patterns. Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* fix(diagnostic): clear virtual_lines autocmd only for valid buf #32979Mars Peng2025-03-19
|
* fix(api): don't use 'winborder' when reconfiguring float (#32984)glepnir2025-03-19
| | | | | | Problem: Reconfiguring a float window applies the global 'winborder'. Solution: - Ignore 'winborder' when reconfiguring a float window. - Still apply 'winborder' when converting a split to a float window.
* fix(runtime): gO always says "Help TOC" #32971Justin M. Keyes2025-03-19
| | | | | | | Problem: gO always says "Help TOC". Solution: Use a generic title instead.
* fix(marks): ensure decor is removed with proper range (#32973)luukvbaal2025-03-19
| | | | | | | Problem: Paired mark whose end is in front of its start should not have its decor removed (as fixed by 72f630f9), but may still need to have its range redrawn. Solution: Still call `buf_decor_remove()` but ensure it is not called with an inverse range when `extmark_del()` is called on an end mark.
* vim-patch:40ab82b: runtime(sh): remove invalid commented out line in syntax ↵Christian Clason2025-03-19
| | | | | | | | script https://github.com/vim/vim/commit/40ab82b974a31ab483abee6357d97d9018d775a7 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:711f4a0: runtime(sh): update sh indent scriptChristian Clason2025-03-19
| | | | | | | | fixes: vim/vim#16930 https://github.com/vim/vim/commit/711f4a07f356cbe6f1d6d67994519f0b36a100f2 Co-authored-by: Christian Brabandt <cb@256bit.org>
* vim-patch:11ab02c: runtime(go): use :term for keywordprg for nvim/gvimChristian Clason2025-03-19
| | | | | | | | | | | | | | | | | | | | Problem: - The document from `go doc` can be very long, and you can scroll if using `!` to run shell command in Gvim. - I realize that I didn't fully mimic behavior of default keywordprg in Nvim in the last commit. Solution: - Use builtin terminal for keywordprg in Gvim - In Nvim (both TUI and GUI), it should mimic the behavior of Vim `:term`, `:Man`, and `:help` closes: vim/vim#16911 https://github.com/vim/vim/commit/11ab02c819449eaeddc3d8d291f06bc73f428e91 Co-authored-by: Phạm Bình An <phambinhanctb2004@gmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* vim-patch:ad2f6b6: runtime(keymap) Add forward slash (/) to ↵Christian Clason2025-03-19
| | | | | | | | | | russian-jcukenwin keymap closes: vim/vim#16912 https://github.com/vim/vim/commit/ad2f6b66623f0a218ae1b2b18430e728070c8aca Co-authored-by: Marat Amerov <maratamerov@gmail.com>
* fix(api): fix 'winborder' preventing splits with nvim_open_win (#32981)zeertzjq2025-03-19
| | | | | | While at it, rename the p_winbd variable to p_winborder, as 'winbd' is not the option's short name. Co-authored-by: glepnir <glephunter@gmail.com>
* fix(options): fix 'winborder' accepting multiple string values (#32978)zeertzjq2025-03-19
| | | | | | Problem: 'winborder' accepting multiple string values. Solution: Use the fallback did_set_str_generic() callback instead of did_set_winborder() which calls opt_strings_flags() with incorrect last argument.
* vim-patch:9.1.1220: filetype: uv.lock file not recognized (#32955)Acaibrid2025-03-18
| | | | | | | | | Problem: filetype: uv.lock file not recognized Solution: detect uv.lock file as toml filetype (Acaibird) closes: vim/vim#16924 https://github.com/vim/vim/commit/18a6853a7627de231f0128237665112a0c8aaaf0
* vim-patch:9.1.1221: Wrong cursor pos when leaving Insert mode just after ↵zeertzjq2025-03-18
| | | | | | | | | | | | | | 'autoindent' (#32976) Problem: Wrong cursor position and '^' mark when leaving Insert mode just after 'autoindent' and cursor on last char of line. Solution: Don't move cursor to NUL when it wasn't moved to the left (zeertzjq). fixes: vim/vim#15581 related: neovim/neovim#30165 neovim/neovim#32943 closes: vim/vim#16922 https://github.com/vim/vim/commit/a3a7d10bfb9547991e04bcf12d1391deb8060754
* vim-patch:9.1.1222: using wrong length for last inserted string (#32975)zeertzjq2025-03-19
| | | | | | | | | | | | | | | | Problem: using wrong length for last inserted string (Christ van Willegen, after v9.1.1212) Solution: use the correct length in get_last_insert_save(), make get_last_insert() return a string_T (John Marriott) closes: vim/vim#16921 https://github.com/vim/vim/commit/8ac0f73eb1e0e6128dd21eb294d12b83b615f05a N/A patches: vim-patch:9.1.1129: missing out-of-memory test in buf_write() vim-patch:9.1.1218: missing out-of-memory check in filepath.c Co-authored-by: John Marriott <basilisk@internode.on.net>
* feat(float): add winborder option (#31074)glepnir2025-03-18
| | | | | | | | | Problem: There is currently no global option to define the default border style for floating windows. This leads to repetitive code when developers need consistent styling across multiple floating windows. Solution: Introduce a global option winborder to specify the default border style for floating windows. When a floating window is created without explicitly specifying a border style, the value of the winborder option will be used. This simplifies configuration and ensures consistency in floating window appearance. Co-authored-by: Gregory Anders <greg@gpanders.com>
* build(deps): bump tree-sitter-query to v0.5.1Christian Clason2025-03-18
|
* build(deps): bump tree-sitter-vimdoc to v3.0.1Christian Clason2025-03-18
|
* fix(help): remove runnable code virtual textChristian Clason2025-03-18
| | | | | | | | Problem: Virtual text indicating runnable code examples in help files is intrusive and non-configurable (and often denotes actually non-working examples). Solution: Remove virtual text.
* docs: misc #32959Justin M. Keyes2025-03-18
|
* docs: misc #32959Justin M. Keyes2025-03-18
|
* fix(runtime): E15: Invalid expression in lua file when `gf`phanium2025-03-18
| | | | | | | | | | | | | | Problem: after https://github.com/neovim/neovim/pull/32719, `gf` error in lua: ``` E15: Invalid expression: "v:lua.require"vim._ftplugin.lua".includeexpr()" E447: Can't find file "vim._ftplugin.lua" in path ``` Solution: * use single quote (no idea why there's two pair double quote in expression). * add missing `v:fname`.
* fix(lua): ensure inspect_pos() only shows visible highlight extmarksLuuk van Baal2025-03-18
| | | | | | | | | | | | | | | Problem: Unpaired marks are shown with `filter.extmarks == true`, which should only return visible highlights. Misleading `end_col` included in `inspect_pos()` for unpaired mark; it is set to `start_col + 1` which would be a visible highlight, which it is not. Custom "is_here" filter used to get extmarks overlapping a position. Solution: Exclude unpaired highlight extmarks with `filter.extmarks == true`. Set `end_col` to `start_col` for an unpaired mark. Supply appropriate arguments to nvim_buf_get_extmarks() to return overlapping extmarks; exclude marks whose end is at `{row, col}` with `filter.extmarks == true`.
* test: cleanup ftplugin_spec.lua #32948Justin M. Keyes2025-03-17
| | | | | | | | Problem: - cannot run ftplugin_spec.lua by itself - test leaves foo/ dir Solution: - fix setup and teardown
* fix(diagnostic): remove deprecated `severity_limit` optionChristian Clason2025-03-17
| | | | Deprecated to be removed in 0.11
* Merge pull request #32935 from zeertzjq/vim-3495497zeertzjq2025-03-18
|\ | | | | vim-patch: too many strlen() calls in edit.c
| * vim-patch:9.1.1216: Pasting the '.' register multiple times may not workzeertzjq2025-03-18
| | | | | | | | | | | | | | | | | | | | | | Problem: Pasting the '.' register multiple times may work incorrectly when the last insert starts with Ctrl-D and ends with '0'. (after 9.1.1212) Solution: Restore the missing assignment (zeertzjq). closes: vim/vim#16908 https://github.com/vim/vim/commit/61b354442418539056cc7073a9aec353d297836c
| * vim-patch:3495497: patch 9.1.1212: too many strlen() calls in edit.czeertzjq2025-03-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: too many strlen() calls in edit.c Solution: refactor edit.c and remove strlen() calls (John Marriott) This commit attempts to make edit.c more efficient by: - in truncate_spaces() pass in the length of the string. - return a string_T from get_last_insert(), so that the length of the string is available to the caller. - refactor stuff_insert(): - replace calls to stuffReadbuff() (which calls STRLEN() on it's string argument) with stuffReadbuffLen() (which gets the length of it's string argument passed in). - replace call to vim_strrchr() which searches from the start of the string with a loop which searches from end of the string to find the last ESC character. - change get_last_insert_save() to call get_last_insert() to get the last_insert string (the logic is in one place). closes: vim/vim#16863 https://github.com/vim/vim/commit/34954972c27244a4a1fb4eeeae2aa4e021efd100 Co-authored-by: John Marriott <basilisk@internode.on.net>
* | feat(runtime): Lua ftplugin 'includeexpr' #32719Phạm Bình An2025-03-17
|/ | | | | | | | | Problem: Current `'includeexpr'` in runtime/ftplugin/lua.vim doesn't work with Nvim Lua. Solution: Provide an improved 'includeexpr' for Lua in "ftplugin/lua.lua". Closes: https://github.com/neovim/neovim/issues/32490
* fix(column): unnecessary redraws with resized 'statuscolumn' (#32944)luukvbaal2025-03-17
| | | | | | | | | | | Problem: Since 3cb1e825, all windows with 'statuscolumn' set, and a resized 'signcolumn' for a particular buffer are marked to be fully redrawn when the first window is encountered. The "resized" variable is only unset after all windows have been drawn, so this results in windows that have just been draw to be marked for redraw again, even though the signcolumn did not change size again. Solution: Replace the `resized` variable with a `last_max` variable that is changed when the first window into buf is encountered.
* Merge #32810 docsJustin M. Keyes2025-03-17
|\
| * docs: miscJustin M. Keyes2025-03-17
| |
| * docs(api): rename "handle" => "id"Justin M. Keyes2025-03-17
| |
| * docs: OSC 133Justin M. Keyes2025-03-17
|/ | | | | | The "end" termcode is not actually needed for our purposes. And the suggested $PS1 has trouble with bash's "reverse find" (CTRL-r) feature, probably because I did it wrong...
* Merge pull request #32871 from ofseed/test-lspLewis Russell2025-03-17
|\ | | | | test(lsp): add some tests for LSP bugs
| * test(lsp): add a test for refreshing hints after being requestedYi Ming2025-03-17
| |
| * test(lsp): add a test for resetting the active request after receiving errorYi Ming2025-03-17
| |
* | vim-patch:3c7d9b1: runtime(prql): include prql syntax scriptChristian Clason2025-03-16
| | | | | | | | | | | | | | | | | | | | | | | | References: https://prql-lang.org/ https://github.com/PRQL/prql closes: vim/vim#16885 https://github.com/vim/vim/commit/3c7d9b11c8041f483a6caad9e9653e375f387d05 Co-authored-by: Jonathan <vanillajonathan@users.noreply.github.com>
* | perf(lsp): don't construct potentially expensive stringsRiley Bruins2025-03-16
| |
* | build(contrib): add zsh completion (#32617)Matthieu Coudron2025-03-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * build(contrib): add zsh completion this is not part of the build system yet, so packager managers are supposed to install the file by themselves. bash doesn't seem to provide shell completion, zsh embeds its own completion that is bundled with vim's. Instead of copying zsh's completion, this generated one via https://github.com/RobSis/zsh-completion-generator --------- Co-authored-by: Eisuke Kawashima <e.kawaschima+github@gmail.com>
* | refactor(lsp)!: rename lsp.completion.trigger() to get() (#32911)Mathias Fußenegger2025-03-16
| | | | | | | | | | | | | | | | | | | | | | | | Problem: `trigger` is a custom word not yet used in APIs. Solution: Use `get` instead because the main effect is that the completion candidates will be collected (and shown by default, but follow-up commits are planned to add an `on_result` callback that allows more general handling). --------- Co-authored-by: Christian Clason <c.clason@uni-graz.at>
* | fix(checkhealth): handle nested lua/ directory #32918phanium2025-03-16
| | | | | | | | | | | | Problem: :checkhealth fails if plugin has nested "lua/" directory Solution: trim `{runtimepath}/lua` from fullpath to get subpath (`./**/{health, health/init.lua}`)
* | refactor(test): move runtime_spec.lua to editor/ #32919Justin M. Keyes2025-03-16
| | | | | | | | | | | | | | | | Problem: The `lua/` tests dir is for Lua stdlib tests. It is not for anything that randomly happens to be implemented with Lua. Solution: Move `lua/runtime_spec.lua` to `editor/runtime_spec.lua`.
* | fix(diagnostic): virtual lines should scroll horizontallyxzb2025-03-16
| |
* | fix(marks): issues with invalid marks and marks beyond eob (#32862)luukvbaal2025-03-16
| | | | | | | | | | | | | | Problem: Marks that go beyond the end of the buffer, and paired marks whose end is in front of its start mark are added to and removed from the decor. This results in incorrect tracking of the signcolumn. Solution: Ensure such marks are not added to and removed from the decor.
* | refactor(tui): disable kitty key event reportingGregory Anders2025-03-16
| | | | | | | | | | Temporary measure for the stable release. Re-enable for nightly after 0.11 release.