aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* | fix(terminal): emit Termrequest for all OSC sequences #33181phanium2025-03-30
| | | | | | | | | | Problem: osc 0/1/2/52 didn't emit TermRequest. Solution: emit `TermRequest` for all recognized osc.
* | build: ignore out-of-source build folder #33191Yegor Yefremov2025-03-30
| | | | | | | | | | | | | | | | Create a .gitignore file inside a build folder. This way this folder will be ignored by git and hence, no entry in the root .gitignore is required. For more information see this post: https://www.scivision.dev/cmake-auto-gitignore-build-dir/
* | docs: lsp config/commands #33122Justin M. Keyes2025-03-30
| | | | | | fix #33075
* | fix(defaults): visual-mode [[,]] for :terminal shell prompts #33201msaher2025-03-30
| | | | | | | | | | | | | | Problem: :terminal shell prompt jump mappings ]]/[[ don't work in visual mode. Solution: Also define them for in visual mode.
* | feat(lsp): workspace_required #31824Michael Strobel2025-03-30
| | | | | | | | | | | | | | | | | | | | Problem: Some language servers do not work properly without a workspace folder. Solution: Add `workspace_required`, which skips starting the lsp client if no workspace folder is found. Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
* | docs(lsp): `vim.api.buf_request_sync` can also take function as `params` #33170Tighearnán Carroll2025-03-30
| |
* | fix(vim.lsp.inlay_hint): requesting inlay_hints even when disabled #32999Bartłomiej Maryńczak2025-03-30
| | | | | | | | | | | | | | | | Problem: Nvim needlessly requests inlay_hints even if they are disabled for a given buffer. Solution: Add the missing `enabled` check in `on_refresh`. Rest of the code has this check already so that's the only needed one to fix this.
* | docs: faq, lua packages #33183Phạm Bình An2025-03-30
| | | | | | | | | | | | Problem: - `health#check()` seems to have been removed for a while, but `:h faq` still refers to it. - `news-0.11.txt` doesn't mention #33044
* | vim-patch:9.1.1263: string length wrong in get_last_inserted_save() (#33194)zeertzjq2025-03-30
| | | | | | | | | | | | | | | | | | | | | | | | Problem: string length wrong in get_last_inserted_save() (after v9.1.1222) Solution: when removing trailing ESC, also decrease the string length (Christ van Willegen) closes: vim/vim#16961 https://github.com/vim/vim/commit/583f5aee96940c29ba17ffb87f1ddf56741b72ba Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
* | fix(checkhealth): check outdated pynvim version properly #33175zeertzjq2025-03-30
| | | | | | Fixes #33174, a regression from #22962.
* | vim-patch:9.1.1261: No test for 'pummaxwidth' non-truncated items (#33193)zeertzjq2025-03-30
| | | | | | | | | | | | | | | | Problem: No test for 'pummaxwidth' non-truncated items (after v9.1.1250) Solution: Add shorter items to Test_pum_maxwidth_multibyte() (zeertzjq). closes: vim/vim#17007 https://github.com/vim/vim/commit/c6336acfe3e80904458d7ea735929b4c91346702
* | vim-patch:9.1.1260: Hang when filtering buffer with NUL bytes (#33192)zeertzjq2025-03-30
| | | | | | | | | | | | | | | | | | Problem: Hang when filtering buffer with NUL bytes (after 9.1.1050). Solution: Don't subtract "written" from "lplen" repeatedly (zeertzjq). related: neovim/neovim#33173 closes: vim/vim#17011 https://github.com/vim/vim/commit/53fed23cb7bd59d9400961b44c6c8dca0029c929
* | feat(checkhealth): emoji for OK/WARN/ERROR #33172Justin M. Keyes2025-03-30
| | | | | | | | | | | | | | Problem: Health status can be much more visually distinct. Solution: Use emoji next to each status.
* | fix(api): use E226 instead of E227 for duplicate abbreviation (#33159)zeertzjq2025-03-30
| |
* | fix(checkhealth): check g:loaded_xx_provider for all providers #33168Justin M. Keyes2025-03-29
| |
* | fix(provider): misleading :checkhealth if user sets ↵Sathya Pramodh2025-03-29
| | | | | | | | | | | | | | | | | | | | | | | | g:loaded_python3_provider=1 #32696 Problem: :checkhealth shows a confusing message if user sets g:loaded_python3_provider=1. Solution: - Show a warning if that var is set to 1. - Update provider modules to default to 0. Any user code that is checking for 1, is like already broken because these may be set to 2.
* | refactor(treesitter): migrate to ts parser callback API #33141Riley Bruins2025-03-29
| | | | | | | | | | Remove the `set_timeout` functions for `TSParser` and instead add a timeout parameter to the regular parse function. Remove these deprecated tree-sitter API functions and replace them with the preferred `TSParseOptions` style.
* | fix(desktop): cannot open filename with spaces using OS file manager #33161Daniel Kusai2025-03-29
| | | | | | | | | | | | | | | | Problem: When activated from OS "filetype handling", Nvim cannot handle filenames containing spaces. Solution: Quote the filename in the .desktop config.
* | Merge pull request #33114 from zeertzjq/vim-9.1.1250zeertzjq2025-03-29
|\ \ | | | | | | vim-patch:9.1.{1250,1255,1257}: 'pummaxwidth'
| * | vim-patch:9.1.1257: Mixing vim_strsize() with mb_ptr2cells() in pum_redraw()zeertzjq2025-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Mixing vim_strsize() with mb_ptr2cells() in pum_redraw(). Solution: Change vim_strsize() to mb_string2cells() (zeertzjq). Since vim_strsize() uses ptr2cells() for the cell width of each char, it is strange to mix it with mb_ptr2cells(), which is used both just below and in pum_screen_puts_with_attr(), and screen_puts_len() also uses something similar. Meanwhile mb_string2cells() uses mb_ptr2cells() for the cell width of each char. Note that the vim_strsize() and mb_string2cells() actually return the same value here, as the transstr() above makes sure the string only contains printable chars, and ptr2cells() and mb_ptr2cells() only return different values for unprintable chars. closes: vim/vim#17003 https://github.com/vim/vim/commit/90e52490b39f0052fb5313d67728eff77191aaae
| * | fix(pum): simplify 'pummaxwidth' truncation and avoid crashzeertzjq2025-03-29
| | |
| * | vim-patch:9.1.1255: missing test condition for 'pummaxwidth' settingzeertzjq2025-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: missing test condition for 'pummaxwidth' setting, pummaxwidth not effective when width is 32 and height is 10 (after v9.1.1250) Solution: add missing comparison condition in pum_width() (glepnir) closes: vim/vim#16999 https://github.com/vim/vim/commit/532c5aec6fa8f0a3d743c7d1573d25d75dd36d5f Co-authored-by: glepnir <glephunter@gmail.com>
| * | vim-patch:9.1.1250: cannot set the maximum popup menu widthzeertzjq2025-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: cannot set the maximum popup menu width (Lucas Mior) Solution: add the new global option value 'pummaxwidth' (glepnir) fixes: vim/vim#10901 closes: vim/vim#16943 https://github.com/vim/vim/commit/88d75934c3d5bc4c406343f106e1a61638abd3a7 Co-authored-by: glepnir <glephunter@gmail.com>
* | | vim-patch:1054b18: runtime(java): Make changes for JDK 24 in syntax scriptChristian Clason2025-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - "Demote" SecurityManager from the list of java.lang class types to javaLangDeprecated. - Reintroduce supported syntax-preview-feature numbers 455 and 476 as _new numbers_ 488 and 494, respectively. References: - https://openjdk.org/jeps/486 (Permanently Disable the Security Manager) - https://openjdk.org/jeps/488 (Primitive Types in Patterns etc.) - https://openjdk.org/jeps/494 (Module Import Declarations) closes: vim/vim#16977 https://github.com/vim/vim/commit/1054b18291ce611932bc949b22b87b78f1975ca9 Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
* | | vim-patch:0dc9a0b: runtime(lf): add lf r34 keywords to syntax scriptChristian Clason2025-03-29
| | | | | | | | | | | | | | | | | | | | | | | | closes: vim/vim#17002 https://github.com/vim/vim/commit/0dc9a0bc60d469f52db064fc88ed9d8938fb5cc3 Co-authored-by: Andis Spriņķis <andis@sprinkis.com>
* | | fix(api): use original LHS in keymap error message #33135Gregory Anders2025-03-29
|/ / | | | | | | | | | | | | | | | | | | | | | | When setting a keymap with "unique" that already exists the error message contains the LHS of the keymap with termcodes replaced. In particular this means that keys like <Tab> show as an actual tab character, meaning the error message displays as "Mapping already exists for ", which is hard to debug for users. Instead, display the original LHS (without any simplification or parsed termcodes). This rperesents exactly what the user passed to the `lhs` argument of `nvim_set_keymap`, which makes it easier to find where the offending keymap is.
* | vim-patch:9.1.1258: regexp: max \U and \%U value is limited by INT_MAX (#33156)zeertzjq2025-03-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: regexp: max \U and \%U value is limited by INT_MAX but gives a confusing error message (related: v8.1.0985). Solution: give a better error message when the value reaches INT_MAX When searching Vim allows to get up to 8 hex characters using the /\V and /\%V regex atoms. However, when using "/\UFFFFFFFF" the code point is already above what an integer variable can hold, which is 2,147,483,647. Since patch v8.1.0985, Vim already limited the max codepoint to INT_MAX (otherwise it caused a crash in the nfa regex engine), but instead of error'ing out it silently fell back to parse the number as a backslash value and not as a codepoint value and as such this "/[\UFFFFFFFF]" will happily find a "\" or an literal "F". And this "/[\d127-\UFFFFFFFF]" will error out as "reverse range in character class). Interestingly, the max Unicode codepoint value is U+10FFFF which still fits into an ordinary integer value, which means, that we don't even need to parse 8 hex characters, but 6 should have been enough. However, let's not limit Vim to search for only max 6 hex characters (which would be a backward incompatible change), but instead allow all 8 characters and only if the codepoint reaches INT_MAX, give a more precise error message (about what the max unicode codepoint value is). This allows to search for "[\U7FFFFFFE]" (will likely return "E486 Pattern not found") and "[/\U7FFFFFF]" now errors "E1517: Value too large, max Unicode codepoint is U+10FFFF". While this change is straight forward on architectures where long is 8 bytes, this is not so simple on Windows or 32bit architectures where long is 4 bytes (and therefore the test fails there). To account for that, let's make use of the vimlong_T number type and make a few corresponding changes in the regex engine code and cast the value to the expected data type. This however may not work correctly on systems that doesn't have the long long datatype (e.g. OpenVMS) and probably the test will fail there. fixes: vim/vim#16949 closes: vim/vim#16994 https://github.com/vim/vim/commit/f2b16986a194ab839c5a23bd7fe904f9fae1526f Co-authored-by: Christian Brabandt <cb@256bit.org>
* | fix(checkhealth): don't override user "q" keymap #33132phanium2025-03-29
| |
* | fix: remove exec permission from .gitattributes #33140Ricardo Casía2025-03-29
| | | | | | | | | | | | | | | | Problem: .gitattributes was marked as executable, which isn’t needed for a config file and goes against the principle of least privilege. Solution: Set file mode to 100644 to reflect its intended use.
* | refactor(diff): remove unreachable code (#33149)zeertzjq2025-03-29
| |
* | fix(pum): fix heap-buffer-overflow with 'rightleft' (#33146)zeertzjq2025-03-29
| |
* | vim-patch:9.1.1252: typos in code and docs related to 'diffopt' "inline:" ↵zeertzjq2025-03-29
| | | | | | | | | | | | | | | | | | | | | | | | (#33143) Problem: Typos in code and docs related to 'diffopt' "inline:". (after v9.1.1243) Solution: Fix typos and slightly improve the docs. (zeertzjq) closes: vim/vim#16997 https://github.com/vim/vim/commit/5a307c361cbe9f7ac438a917b905378d87f8f2de
* | fix(cmdline): avoid empty @: register after :<CR> (#33126)luukvbaal2025-03-28
| | | | | | Fix https://github.com/neovim/neovim/issues/33125
* | fix(lsp): warn on missing config in :checkhealth #33087Micah Halter2025-03-28
| | | | | | | | | | | | | | | | | | | | | | Problem When calling `:checkhealth vim.lsp` after the user has enabled a language server with `vim.lsp.enable` that has no configuration a runtime error is hit because the code expects for a configuration to exist. Solution: Check if a configuration was returned before parsing it, if it isn't returned then warn the user that the server has been enabled but a configuration was not found.
* | fix(cmdline): empty ext_cmdline block events for :<CR> #33118luukvbaal2025-03-28
| | | | | | | | | | Problem: An ext_cmdline block event that should be empty after :<CR> re-emits the previous cmdline. Solution: Clear `last_cmdline` even when `new_last_cmdline == NULL`.
* | fix(provider)!: drop Python 3.7, 3.8 support #33088v1nh1shungry2025-03-28
| | | | | | | | | | | | Problem: #33022 didn't update `min_version` to 3.9, therefore Python 3.7 and 3.8 are still available. Solution: Update `min_version` to 3.9.
* | refactor(treesitter): simplify injection retrieval #33104Riley Bruins2025-03-28
| | | | | | | | | | | | | | Simplify the logic for retrieving the injection ranges for the language tree. The trees are now also sorted by starting position, regardless of whether they are part of a combined injection or not. This would be helpful if ranges are ever to be stored in an interval tree or other kind of sorted tree structure.
* | fix(mouse): crash with click on win-separator in statusline (#33091)Shadman2025-03-28
| | | | | | | | | | | | | | Problem: Clicking on window separator in statusline crashes Nvim due to out of bound memory access Solution: Check if the click location is within clicking range before applying it.
* | Merge pull request #33086 from zeertzjq/vim-9.1.1243zeertzjq2025-03-28
|\ \ | | | | | | vim-patch:9.1.{1243,1246}
| * | vim-patch:9.1.1246: coverity complains about some changes in v9.1.1243zeertzjq2025-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: coverity complains about some changes in v9.1.1243 Solution: remove duplicate code in diff_find_changed() (Yee Cheng Chin) closes: vim/vim#16988 https://github.com/vim/vim/commit/4f9b1243e3ef60b9efb64a4e789c55be3cdc7a25 Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
| * | vim-patch:9.1.1243: diff mode is lacking for changes within lineszeertzjq2025-03-28
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Diff mode's inline highlighting is lackluster. It only performs a line-by-line comparison, and calculates a single shortest range within a line that could encompass all the changes. In lines with multiple changes, or those that span multiple lines, this approach tends to end up highlighting much more than necessary. Solution: Implement new inline highlighting modes by doing per-character or per-word diff within the diff block, and highlight only the relevant parts, add "inline:simple" to the defaults (which is the old behaviour) This change introduces a new diffopt option "inline:<type>". Setting to "none" will disable all inline highlighting, "simple" (the default) will use the old behavior, "char" / "word" will perform a character/word-wise diff of the texts within each diff block and only highlight the differences. The new char/word inline diff only use the internal xdiff, and will respect diff options such as algorithm choice, icase, and misc iwhite options. indent-heuristics is always on to perform better sliding. For character highlight, a post-process of the diff results is first applied before we show the highlight. This is because a naive diff will create a result with a lot of small diff chunks and gaps, due to the repetitive nature of individual characters. The post-process is a heuristic-based refinement that attempts to merge adjacent diff blocks if they are separated by a short gap (1-3 characters), and can be further tuned in the future for better results. This process results in more characters than necessary being highlighted but overall less visual noise. For word highlight, always use first buffer's iskeyword definition. Otherwise if each buffer has different iskeyword settings we would not be able to group words properly. The char/word diffing is always per-diff block, not per line, meaning that changes that span multiple lines will show up correctly. Added/removed newlines are not shown by default, but if the user has 'list' set (with "eol" listchar defined), the eol character will be be highlighted correctly for the specific newline characters. Also, add a new "DiffTextAdd" highlight group linked to "DiffText" by default. It allows color schemes to use different colors for texts that have been added within a line versus modified. This doesn't interact with linematch perfectly currently. The linematch feature splits up diff blocks into multiple smaller blocks for better visual matching, which makes inline highlight less useful especially for multi-line change (e.g. a line is broken into two lines). This could be addressed in the future. As a side change, this also removes the bounds checking introduced to diff_read() as they were added to mask existing logic bugs that were properly fixed in vim/vim#16768. closes: vim/vim#16881 https://github.com/vim/vim/commit/9943d4790e42721a6777da9e12637aa595ba4965 Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* | vim-patch:9.1.1247: fragile setup to get (preferred) keys from ↵zeertzjq2025-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | key_name_entry (#33102) Problem: fragile setup to get (preferred) keys from key_name_entry (after v9.1.1179) Solution: refactor the code further, fix a bug with "pref_name" key entry introduced in v9.1.1180 (Yee Cheng Chin) The optimization introduced for using bsearch() with key_name_entry in vim/vim#16788 was fragile as it required synchronizing a non-obvious index (e.g. IDX_KEYNAME_SWU) with the array that could be accidentally changed by any one adding a key to it. Furthermore, the "pref_name" that was introduced in that change was unnecessary, and in fact introduced a bug, as we don't always want to use the canonical name. The bug is triggered when the user triggers auto-complete using a keycode, such as `:set <Scroll<Tab>`. The bug would end up showing two copies of `<ScrollWheelUp>` because both entries end up using the canonical name. In this change, remove `pref_name`, and simply use a boolean to track whether an entry is an alt name or not and modify logic to respect that. Add test to make sure auto-complete works with alt names closes: vim/vim#16987 https://github.com/vim/vim/commit/7d8e7df55190e8e4e5a66f443e4440b52edf2fdb In Nvim there is no `enabled` field, so put `is_alt` before `name` to reduce the size of the struct. Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
* | Merge pull request #33101 from zeertzjq/vim-052b86bzeertzjq2025-03-28
|\ \ | | | | | | vim-patch: runtime file updates
| * | vim-patch:f9f4e27: runtime(hyprlang): save and restore cpo setting in syntax ↵zeertzjq2025-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | script fixes: vim/vim#16970 closes: vim/vim#16973 https://github.com/vim/vim/commit/f9f4e27ad76ee36a5a49013a84a466800d26f360 Co-authored-by: Christian Brabandt <cb@256bit.org>
| * | vim-patch:052b86b: runtime(solidity): update syntax script with error ↵zeertzjq2025-03-28
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | definitions closes: vim/vim#16978 References: - https://docs.soliditylang.org/en/latest/contracts.html#transient-storage - https://soliditylang.org/blog/2021/04/21/custom-errors/ https://github.com/vim/vim/commit/052b86ba6315e65eb034ac906128f9bd82d5f2d7 Co-authored-by: S0AndS0 <strangerthanbland@gmail.com>
* | fix(health): message should mention "vim.provider" #33095Eisuke Kawashima2025-03-27
| |
* | Merge pull request #33098 from zeertzjq/vim-9.1.1245zeertzjq2025-03-28
|\ \ | | | | | | vim-patch:9.1.{1245,1249}
| * | vim-patch:9.1.1249: tests: no test that 'listchars' "eol" doesn't affect "gM"zeertzjq2025-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: No test that 'listchars' "eol" doesn't affect "gM". Solution: Add a test (zeertzjq). closes: vim/vim#16990 https://github.com/vim/vim/commit/757c37da6dd99d23fed90c00e44dd65e351e19ac
| * | vim-patch:9.1.1245: need some more tests for curly braces evaluationzeertzjq2025-03-28
|/ / | | | | | | | | | | | | | | | | | | | | | | Problem: need some more tests for curly braces evaluation Solution: Add a test for the regression introduced by patch v9.1.1242 (Yegappan Lakshmanan) closes: vim/vim#16986 https://github.com/vim/vim/commit/d9b82cfe846e988772f2eec40643d7009d61ffdf Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
* | refactor(eval): move diff functions to diff.c (#33085)zeertzjq2025-03-27
| | | | | | | | They were moved in Vim in patch 8.1.1989. This change is required to port patch 9.1.1243.