Commit Graph

33635 Commits

Author SHA1 Message Date
zeertzjq
6018aed92f Merge pull request #35454 from zeertzjq/vim-f66674c
vim-patch: runtime file updates
2025-08-24 20:40:06 +08:00
zeertzjq
98407a8b91 vim-patch:99964e2: runtime(python): support 'type's soft keyword form
`type` became a soft keyword in Python 3.12. In that form, it is a
statement that declares a type alias:

    # type_stmt ::= 'type' identifier [type_params] "=" expression
    type Point = tuple[float, float]

To implement support for this, this change does three things:

1. adds a `pythonType` group (linked to `Type`)
2. matches `type` followed by an identifier as `pythonStatement`
3. continues to match `type` in other forms as `pythonBuiltin`

Ref:
- https://docs.python.org/3/reference/lexical_analysis.html#soft-keywords
- https://docs.python.org/3/reference/simple_stmts.html#the-type-statement

closes: vim/vim#18090

99964e2ea7

Co-authored-by: Jon Parise <jon@indelible.org>
2025-08-24 20:09:33 +08:00
zeertzjq
e12eca77ee vim-patch:e06d81f: runtime(sh): add syntax highlighting support for ${ cmd;} and ${|cmd;}
bash 5.3 (released July 2025) added support for ${ cmd;} and
${|cmd;} style command substitution, which is similar (but not
identical) to ksh/mksh.

closes: vim/vim#18084

e06d81fe67

Co-authored-by: Kevin Pulo <kevin.pulo@mongodb.com>
2025-08-24 20:09:02 +08:00
zeertzjq
53802da38b vim-patch:f66674c: runtime(fstab): Added mtab support to fstab syntax.
closes: vim/vim#18074

f66674cf42

Co-authored-by: Radu Dineiu <radu.dineiu@gmail.com>
2025-08-24 20:08:15 +08:00
zeertzjq
523371b044 vim-patch:9.1.1681: tests: no test for actually moving cursor with 'acl' (#35452)
Problem:  tests: no test for actually moving cursor when menu is not
          open with 'autocompletedelay'.
Solution: Use <Up> first in the test. Also remove two unnecessary <Esc>s
          in completion timeout test (zeertzjq).

closes: vim/vim#18097

e8b99ff6d5
2025-08-24 11:33:44 +00:00
zeertzjq
0b8a9bde0e fix(diff): set default diff flags properly (#35450) 2025-08-24 14:42:10 +08:00
zeertzjq
810a234978 vim-patch:9.1.1672: completion: cannot add timeouts for 'cpt' sources (#35447)
Problem:  completion: cannot add timeouts for 'cpt' sources
          (Evgeni Chasnovski)
Solution: Add the 'autocompletetimeout' and 'completetimeout' options
          (Girish Palya)

fixes: vim/vim#17908
closes: vim/vim#17967

69a337edc1

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-08-24 13:16:55 +08:00
Yochem van Rosmalen
c1fa3c7c37 feat(gen_help_html): generate helptags.json, helptag.html #35442
Problem:
No way to know the html page with the docs of a tag when you only have
the tag name.

Solution:
Generate a helptags.json that maps tags to their locations.
Generate a helptag.html page that redirects to the HTML page of the given tag.

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-08-23 15:04:52 -07:00
Riley Bruins
29c5559ce1 fix(treesitter): show capture-level priorities in :Inspect #35443 2025-08-23 12:01:38 -07:00
github-actions[bot]
faff3617ba docs: update version.c #35411
vim-patch:8.2.0082: when reusing a buffer listeners are not cleared
vim-patch:8.2.0446: listener with undo of deleting all lines not tested
vim-patch:8.2.1092: not checking if saving for undo succeeds
vim-patch:8.2.3174: Vim9: "legacy undo" finds "undo" variable
vim-patch:8.2.3426: crash when deleting a listener in a listener callback
vim-patch:8.2.4142: build failure with normal features without persistent undo

vim-patch:9.0.0361: removing a listener may result in a memory leak
2025-08-23 11:59:34 -07:00
zeertzjq
ed40d89d7c Merge pull request #35427 from zeertzjq/vim-9.1.1638
vim-patch: 'autocompletedelay'
2025-08-23 21:24:17 +08:00
zeertzjq
963ead29d9 vim-patch:9.1.1670: completion: autocomplete breaks second completion
Problem:  completion: autocomplete breaks second completion
          (gravndal)
Solution: Fix the autocomplete bug (Girish Palya)

fixes: vim/vim#18044
closes: vim/vim#18068

b4e0bd93a9

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-08-23 20:40:59 +08:00
zeertzjq
1c0465bec6 vim-patch:5ca1ea8: runtime(doc): Tweak documentation style
closes: vim/vim#18078

5ca1ea83ad

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-08-23 20:40:59 +08:00
zeertzjq
6ef996a082 vim-patch:9.1.1657: Autocompletion adds delay
Problem:  Autocompletion adds delay
          (gcanat, char101, after v9.1.1638)
Solution: Temporarily disable autocomplation (Girish Palya).

related: vim/vim#17960
fixes: vim/vim#18022
closes: vim/vim#18048

196c376682

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-08-23 20:40:59 +08:00
zeertzjq
4019d3050d vim-patch:9.1.1638: completion: not possible to delay the autcompletion
Problem:  completion: not possible to delay the autcompletion
Solution: add the 'autocompletedelay' option value (Girish Palya).

This patch introduces a new global option 'autocompletedelay'/'acl' that
specifies the delay, in milliseconds, before the autocomplete menu
appears after typing.

When set to a non-zero value, Vim waits for the specified time before
showing the completion popup, allowing users to reduce distraction from
rapid suggestion pop-ups or to fine-tune the responsiveness of
completion.

The default value is 0, which preserves the current immediate-popup
behavior.

closes: vim/vim#17960

a09b1604d4

N/A patch: vim-patch:9.1.1641: a few compiler warnings are output

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-08-23 20:40:58 +08:00
zeertzjq
639f9f4cda vim-patch:9.1.1667: Another outdated comment in eval.c (#35438)
Problem:  Another outdated comment in eval.c (after 9.1.1665).
Solution: Remove that comment as well. Add a few more tests for mapnew()
          that fail without patch 8.2.1672 (zeertzjq).

closes: vim/vim#18089

6b56711804
2025-08-23 10:35:18 +00:00
zeertzjq
b9699d5701 vim-patch:9.1.1665: Outdated comment in eval.c (#35436)
Problem:  Outdated comment in eval.c.
Solution: Remove the comment, which is no longer true after 8.2.1672.
          Also fix a typo in version9.txt (zeertzjq).

closes: vim/vim#18077

5d3c39af2a
2025-08-23 07:38:07 +08:00
glepnir
eeba0dc2ed fix: memory leak from double buffer initialization in read_stdin #35413
Problem: When stdin follows files, set_curbuf() initializes buffer via
enter_buffer(), then open_buffer() initializes again, causing memory leaks.

Solution: Use readfile() directly for new buffers already initialized by
enter_buffer(), only call open_buffer() for original buffer case.
2025-08-22 14:50:30 -07:00
Gregory Anders
586b1b2d9b feat(tui): add nvim_ui_send (#35406)
This function allows the Nvim core to write arbitrary data to a TTY
connected to a UI's stdout.
2025-08-22 15:05:43 -05:00
Justin M. Keyes
5d8e870c11 Merge #35429 vim.pack adjustments 2025-08-22 14:35:41 -04:00
bfredl
df9ff9cfa8 Merge pull request #35434 from bfredl/zigtag2
fix(build): workaround errors in zig build due to stale cache
2025-08-22 19:40:38 +02:00
bfredl
ec8a0c7340 fix(build): workaround errors in zig build due to stale cache
addDirectoryArg with a source dir is not enough to depend on changes
to invidiual files. as a workaround, mark this step as having
side-effects (always being run) for now.
2025-08-22 19:10:43 +02:00
Evgeni Chasnovski
1ffaaa06c5 docs(pack): document $XDG_DATA_HOME/nvim/site presence in 'packpath'
Problem: Some use cases might lead to `vim.pack.add()` failing to
`:packadd` a plugin because of missing entry in 'packpath'. Like with
`nvim --clean` or manually setting `$XDG_DATA_HOME` during startup.

Solution: Document it. A more proactive approach can be ensuring correct
'packpath' entry, but it is currently somewhat verbose to do (due to
having to adjust for Windows using `\` in 'packpath' entries).
2025-08-22 13:41:36 +03:00
Evgeni Chasnovski
7acfad226d test(pack): simplify tests for data field 2025-08-22 13:32:11 +03:00
Evgeni Chasnovski
92e7d5eaf2 perf(pack): reduce number of 'opt/' directory computations 2025-08-22 13:00:30 +03:00
tao
d73cfefed5 fix(folds): error when deleting lines at end of buffer #35396
Problem:
with `foldmethod=expr foldexpr=v:lua.vim.treesitter.foldexpr()
foldminlines=0`, deleting lines at the end of the buffer always
reports an invalid top error, because the top value (i.e. the
start line number of the deletion) is always 1 greater than
the total line number of the modified buffer.

Solution:
remove the ml_line_count validation
2025-08-21 19:55:45 -07:00
zeertzjq
12b6f65283 vim-patch:014d50d: runtime(systemverilog): Add syntax highlighting for 1800-2023 block strings (#35425)
closes: vim/vim#18056

014d50df80

Co-authored-by: Ayan Banerjee <ayanbanrj@gmail.com>
2025-08-22 09:26:47 +08:00
Igor Lacerda
8e48c02061 fix(lsp): handle array with empty string when checking empty hover (#35423) 2025-08-21 17:15:56 -07:00
zeertzjq
865a28155e vim-patch:8.2.1672: v_lock is used when it is not initialized (#35416)
Problem:    v_lock is used when it is not initialized. (Yegappan Lakshmanan)
Solution:   Initialize the typval in eval1().

4a091b9978

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-08-22 06:28:45 +08:00
Birdee
c522cb0e96 feat(pack): support user-defined data in plugin spec #35360
Problem:
The load function in opts was difficult to use if you wished to
customize based on the plugin being loaded.

You could get the name, but without some way to mark a spec, that was of
limited usefulness unless you wanted to hardcode a list of names in the
function, or write a wrapper around the whole thing

Solution:
Allow users to provide an arbitrary data field in plugin specs so that
they may receive info as to how to handle that plugin in load, get() and
events, and act upon it

Co-authored-by: BirdeeHub <birdee@localhost>
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
2025-08-21 10:08:29 -07:00
luukvbaal
9467731865 feat(extui): support paging in the dialog window (#35310)
Problem:  Unable to see e.g. `inputlist()` prompts that exceed the dialog
          window height.
          Multi-line prompts are not handled properly, and tracking
          is insufficient for messages in cmdline_block mode.
Solution: Add vim.on_key handler while the dialog window is open that
          forwards paging keys to the window.
          Properly render multi-line prompts. Keep track of both the start
          and end of the current cmdline prompt. Append messages after the
          current prompt in cmdline_block mode.
2025-08-21 14:56:59 +02:00
Cameron Ring
30dae87de4 fix(startup): file buf is lost if stdin is empty and "-" is last #35402
Problem:
Running `echo dummy | nvim file1 file2` closes the file1 buffer if
file1 doesn't exist.

Solution:
Logic changed in 43e8ec9 such that stdin buffer may now be created *after*
file args. Handle that case.
2025-08-20 20:34:49 -07:00
zeertzjq
a8dad46e1c Merge pull request #35352 from janlazo/vim-8.1.2008
vim-patch:8.1.2008,v8.2.{844,853,3348,3795,4379}
2025-08-21 11:31:31 +08:00
Jan Edmund Lazo
dc2d4b07a8 vim-patch:8.2.0853: ml_delete() often called with FALSE argument
Problem:    ml_delete() often called with FALSE argument.
Solution:   Use ml_delete_flags(x, ML_DEL_MESSAGE) when argument is TRUE.

ca70c07b72

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-08-20 21:46:35 -04:00
Jan Edmund Lazo
e77d15cc5d vim-patch:8.2.3348: line2byte() returns wrong value after adding textprop
Problem:    line2byte() returns wrong value after adding textprop. (Yuto
            Kimura)
Solution:   Reduce the length by the size of the text property. (closes vim/vim#8759)

14c7530c4f

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-08-20 21:46:35 -04:00
Jan Edmund Lazo
ed012b817d vim-patch:8.2.0844: text properties crossing lines not handled correctly
Problem:    Text properties crossing lines not handled correctly.
Solution:   When saving for undo include an extra line when needed and do not
            adjust properties when undoing. (Axel Forsman, closes vim/vim#5875)

ML_DEL_UNDO, ML_APPEND_UNDO are no-opt because textprop feature is N/A.

a9d4b84d97

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-08-20 21:45:49 -04:00
Jan Edmund Lazo
09964b7ef0 vim-patch:8.2.4379: an empty change is reported to a listener
Problem:    An empty change is reported to a listener.
Solution:   Do not report an empty change. (closes vim/vim#9768)  Remove unused
            return value.

55737c2a31

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-08-20 21:45:49 -04:00
Jan Edmund Lazo
15d3a83999 vim-patch:8.2.3795: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate the jumplist feature.

739f13a55b

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-08-20 21:45:48 -04:00
Jan Edmund Lazo
d06fdecb97 vim-patch:8.1.2008: error for invalid range when using listener and undo
Problem:    Error for invalid range when using listener and undo. (Paul Jolly)
Solution:   Do not change the cursor before the lines are restored.
            (closes vim/vim#4908)

4544bd2f24

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-08-20 21:45:48 -04:00
zeertzjq
fbaead249b Merge pull request #35410 from zeertzjq/vim-308a313
vim-patch: doc updates
2025-08-21 09:15:20 +08:00
zeertzjq
7d53982b7f vim-patch:84a343a: runtime(doc): correct another problem in :h items()
The returned value is only in arbitrary order for a Dict.

closes: vim/vim#18050

84a343a6ed
2025-08-21 08:44:08 +08:00
zeertzjq
1fdacbb3e4 vim-patch:44c8072: runtime(doc): fix style and clarify items() function for String type
related: vim/vim#18021

44c8072ef6

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-08-21 08:44:08 +08:00
zeertzjq
049de6f119 vim-patch:partial:308a313: runtime(doc): Update help for the items() function
closes: vim/vim#18021

308a3130be

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2025-08-21 08:44:07 +08:00
Tiago Inaba
848c7a7894 fix(lsp): update window title when cycling through signatures #35407 2025-08-20 11:09:16 -07:00
github-actions[bot]
cd2d5de1f9 docs: update version.c #35201
vim-patch:8.1.1555: NOT_IN_POPUP_WINDOW is confusing
vim-patch:8.1.1586: error number used in two places
vim-patch:8.1.1599: compiler warning for uninitialized variable
vim-patch:8.1.1603: crash when using unknown highlighting in text property
vim-patch:8.1.1655: popup window border drawn wrong with multi-byte char
vim-patch:8.1.1675: listener list not correctly updated on listener_remove()
vim-patch:8.1.1710: Coverity found dead code
vim-patch:8.1.1844: buffer no longer unloaded when adding text properties
vim-patch:8.1.2071: when 'wincolor' is set text property changes highlighting
vim-patch:8.1.2211: listener callback "added" argument is not the total
vim-patch:8.1.2215: unreachable code in adjusting text prop columns
vim-patch:8.1.2216: text property in wrong place after :substitute
vim-patch:8.1.2298: missing part of 8.1.2296
vim-patch:8.1.2308: deleting text before zero-width textprop removes it
vim-patch:8.1.2369: cannot build with quickfix and without text properties


vim-patch:8.2.0124: compiler warnings for variable types
vim-patch:8.2.0126: textprop test fails
vim-patch:8.2.0967: unnecessary type casts for vim_strnsave()
vim-patch:8.2.1670: a couple of gcc compiler warnings
vim-patch:8.2.2429: :goto does not work correctly with text properties
vim-patch:8.2.2890: text property duplicated when data block splits
vim-patch:8.2.3062: internal error when adding several text properties
vim-patch:8.2.3372: line2byte() value wrong when adding a text property
vim-patch:8.2.3483: #ifdef for using sysinfo() is incomplete
vim-patch:8.2.4043: using int for second argument of ga_init2()
vim-patch:8.2.4144: cannot load libsodium dynamically
vim-patch:8.2.4960: text properties that cross lines not updated for deleted line
vim-patch:8.2.4961: build error with a certain combination of features
vim-patch:8.2.5014: byte offsets are wrong when using text properties
vim-patch:8.2.5041: cannot close a terminal popup with "NONE" job

vim-patch:9.0.0169: insufficient testing for line2byte() with text properties
vim-patch:9.0.0181: textprop test with line2byte() fails on MS-Windows


vim-patch:9.1.0633: Compilation warnings with `-Wunused-parameter`
vim-patch:9.1.0957: MS-Windows: conversion warnings
2025-08-20 09:43:26 -07:00
luukvbaal
61b6553ee9 fix(ui): proper event ordering for nested cmdline_block events (#35344)
Problem:  Wrong event order for nested cmdline in a conditional cmdline_block.
Solution: Emit all but the first cmdline_block event immediately after
          getting the next command, before executing it.
2025-08-20 15:02:55 +02:00
bfredl
4a1295c626 Merge pull request #34186 from bfredl/neotags
build: generate helptags without running "nvim" binary
2025-08-20 09:10:02 +02:00
zeertzjq
27bc7dcb01 Merge pull request #35399 from zeertzjq/vim-9.1.1647
vim-patch: runtime file updates
2025-08-20 08:09:14 +08:00
zeertzjq
3d511833ae vim-patch:2f7e4eb: runtime(python): optimize pythonSync pattern
Order the keywords by expected frequency: "def" and "class" are assumed
to be more likely than "async def" in the majority of Python code.

closes: vim/vim#18032

2f7e4eb335

Co-authored-by: Jon Parise <jon@indelible.org>
2025-08-20 07:24:35 +08:00
zeertzjq
ba25f3e4d4 vim-patch:9.1.1647: filetype: Cangjie files are not recognized
Problem:  filetype: Cangjie files are not recognized
Solution: Detect *.cj files as cangjie filetype, include a syntax plugin
          (WuJunkai2004)

This commit introduces a new syntax highlighting file for the Cangjie
programming language, includes 4 parts as required:
- The main syntax file: runtime/syntax/cangjie.vim
- The filetype detection rule in: runtime/filetype.vim
- The documentation update in: runtime/doc/syntax.txt
- Some menus

References:
- https://gitcode.com/Cangjie
- https://cangjie-lang.cn/

fixes: 18014
closes: vim/vim#18027

0c4405a6b2

Co-authored-by: WuJunkai2004 <wujunkai20041123@outlook.com>
2025-08-20 07:23:49 +08:00