Commit Graph
5177 Commits
Author SHA1 Message Date
zeertzjq e6b2255ac7 vim-patch:4edaf89: runtime(doc): improve preinserted() doc
Change the second "if" to "because", otherwise it may be misinterpreted
that preinserted() can return non-zero just because these options are
set.

closes: vim/vim#18409

https://github.com/vim/vim/commit/4edaf8923335504c31810dc4c5213eaba84e7898
2025-09-30 09:32:33 +08:00
zeertzjqandGirish Palya 7b9c063d11 vim-patch:9.1.1797: completion: autocompletion can be improved
Problem:  completion: autocompletion can be improved
Solution: Add support for "longest" and "preinsert" in 'autocomplete';
          add preinserted() (Girish Palya)

* Add support for "longest" in 'completeopt' when 'autocomplete'
  is enabled. (Note: the cursor position does not change automatically
  when 'autocomplete' is enabled.)
* Add support for "preinsert" when 'autocomplete' is enabled. Ensure
  "preinsert" works the same with and without 'autocomplete'
* introduce the preinserted() Vim script function, useful for defining
  custom key mappings.

fixes: vim/vim#18314
closes: vim/vim#18387

https://github.com/vim/vim/commit/c05335082adb21d99d96374779856444a3a0688f

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-30 09:32:33 +08:00
zeertzjqandChristian Brabandt af2932e2dc vim-patch:992e307: runtime(doc): update list of modifiers at :h expand() (#35957)
fixes: vim/vim#18435

https://github.com/vim/vim/commit/992e30774f5ec81f53d5554c42137d3c85999081

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-30 08:26:40 +08:00
Maria Solano 9da316fcc4 fix(docs): force blank line after numbered list items #35950
Workaround until the vimdoc parser supports numbered list-items:
https://github.com/neovim/tree-sitter-vimdoc/issues/144
2025-09-28 21:01:20 -07:00
2739ab485e docs: json, tests, lsp #35754
Close #35926
Close #35818

Co-authored-by: skewb1k <skewb1kunix@gmail.com>
Co-authored-by: glepnir <glephunter@gmail.com>
2025-09-28 20:57:59 -07:00
zeertzjqandAliaksei Budavei c07a24e31c vim-patch:91ac18c: runtime(java): Recognise _module_ import declarations (#35947)
After two preview proposals (JEPs 476 and 494), _module_
import declarations are now a part of the language (JDK 25).

Reference:
https://openjdk.org/jeps/511

closes: vim/vim#18424

https://github.com/vim/vim/commit/91ac18cb036f87ceff83bf8d05f7c03b50b94633

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2025-09-29 01:03:42 +00:00
zeertzjq 0fa0717d4e vim-patch:9.1.1802: 'nowrap' in a modeline may hide malicious code (#35946)
Problem:  'nowrap' in a modeline may hide malicious code.
Solution: Forcibly use '>' as 'listchars' "extends" if 'nowrap' was set
          from a modeline (zeertzjq).

Manual `:setlocal nowrap` disables this behavior.  There is a separate
problem with `:set nowrap` that also applies to some other options.

related: vim/vim#18214
related: vim/vim#18399
closes: vim/vim#18425

https://github.com/vim/vim/commit/9d5208a9313dd8b0d62c97af5485f1715af98a1c

Cherry-pick some test_modeline.vim changes from patches 9.0.{0363,0626}.
2025-09-29 07:48:46 +08:00
glepnir fcf752476a fix(cmd): :update writes new file buffers only for real files #35939
Problem: :update should write new file buffers, but previous fix
affected special buffer types (acwrite, nofile, etc.).

Solution: Add bt_nofilename() check to only write new files for
buffers representing real filesystem paths.
2025-09-27 20:28:05 -07:00
Maria Solano 03032d1f73 fix(lsp): remove vim.lsp.diagnostic.reset() (#35938) 2025-09-27 14:53:00 -07:00
zeertzjqandDoug Kearns 0646d0ea28 vim-patch:b6f9d38: runtime(doc): Improve documentation of the ..= assignment operator (#35916)
Explicitly mention the "..=" compound assignment operator everywhere
".=" is documented.

Convert some uses of "." and ".=" in the examples to ".." and "..=",
respectively.

closes: vim/vim#18380

https://github.com/vim/vim/commit/b6f9d38f9607d837b45d905f58dc0199f79414dc

Cherry-pick a change to eval.txt from patch 9.1.1232.

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-25 23:31:21 +00:00
zeertzjq ca377f3c35 vim-patch:1ae980a: runtime(doc): fix inconsistent indent in cmdline.txt
Also fix typo in autoload/netrw.vim.

related: vim/vim#18371
closes: vim/vim#18376

https://github.com/vim/vim/commit/1ae980a9cb8d8cb5e5897f3708ddeb7c8c0555bd
2025-09-25 06:50:44 +08:00
zeertzjqandKonfekt 641cb41832 vim-patch:34747a1: runtime(doc): update live-grep and fuzzy-file-picker examples
closes: vim/vim#18371

https://github.com/vim/vim/commit/34747a13e08770ca871e08581551f05153dce9e2

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2025-09-25 06:50:44 +08:00
zeertzjqandShay 7837161076 vim-patch:70d745a: runtime(zip): support PowerShell Core (#35880)
fixes: vim/vim#17987
closes: vim/vim#18345

https://github.com/vim/vim/commit/70d745a61bc12d94b9b217887004c1a5c263cb9d

Co-authored-by: Shay <shay_public@hotmail.com>
2025-09-22 23:21:27 +00:00
zeertzjqandChristian Brabandt 4b4d58a2f9 vim-patch:224f8ca: runtime(doc): clarify 'fileignorecase' option setting (#35879)
fixes: vim/vim#18360

https://github.com/vim/vim/commit/224f8ca769f2f5c8c4f3293e2adf7672418ba2fe

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-23 07:10:00 +08:00
Peter Aronoff 7b99e1f0c3 fix: remove typo from buffer-local LSP docs (#35841)
Problem: example code refers to `vim.lsp.buf.document_color`, but there
is no such thing.

Solution: replace `vim.lsp.buf.document_color` with `vim.lsp.document_color`.
2025-09-22 18:27:44 -04:00
Karl Yngve Lervåg 0790e08f52 docs(diagnostics): allow list of strings for vim.diagnostic.Opts.border (#35863)
Type checkers complain if we pass a list of strings, but this should be allowed.
2025-09-22 21:57:19 +02:00
zeertzjqandGirish Palya a70997442e vim-patch:9.1.1779: completion: 'autocomplete' cannot be enabled per buffer (#35853)
Problem:  completion: 'autocomplete' cannot be enabled per buffer
          (Tomasz N)
Solution: Make 'autocomplete' global or local to buffer (Girish Palya)

fixes: vim/vim#18320
closes: vim/vim#18333

https://github.com/vim/vim/commit/0208b3e80a080740ff77a5661d0f65090e317d90

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-21 00:56:38 +00:00
zeertzjqandthinca 39a21d749d vim-patch:9.1.1774: cannot calculate sha256 of a Blob
Problem:  cannot calculate sha256() of a Blob
Solution: Change sha256() to accept a Blob or String argument
          (thinca).

closes: vim/vim#18336

https://github.com/vim/vim/commit/4150283b837975152d36f87a2bb975e894bc965c

Co-authored-by: thinca <thinca@gmail.com>
2025-09-21 06:31:27 +08:00
zeertzjqandChristian Brabandt 61d7d983d6 vim-patch:9.1.1761: 'ruler' is set in defaults.vim
Problem:  'ruler' is set in defaults.vim, but not enabled by default in
          non-compatible mode.
Solution: set the ruler option in non-compatible mode, remove it from
          defaults.vim, update tests

closes: vim/vim#18260

https://github.com/vim/vim/commit/ba36510920654a52d8b5908f5a61c6969bb31942

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-18 08:12:44 +08:00
zeertzjqandChristian Brabandt 8964ad45da vim-patch:9.1.1550: defaults: 'showcmd' is not enabled in non-compatible mode on Unix
Problem:  defaults: 'showcmd' is not enabled in non-compatible mode on
          Unix
Solution: Always enable 'showcmd' in non-compatible mode, drop it from
          defaults.vim.

'showcmd' was already always enabled in Vim compatible mode except for
UNIX environments. So let's just enable it always, there is no good
reason why UNIX platforms should be handled differently than other
platforms, especially since `defaults.vim` did enable this option
anyhow.

closes: vim/vim#17739

https://github.com/vim/vim/commit/3f9d2378bd70748fc59e02a402422269bd096492

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-18 08:12:31 +08:00
skewb1k 5148c1247e docs: lsp, vim_diff #35820 2025-09-17 12:29:34 -07:00
Yochem van RosmalenandJustin M. Keyes a57c7238f9 refactor(plugins)!: remove shellmenu #35815
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-09-17 11:03:58 -07:00
Yochem van Rosmalen 0bb74f0fe2 docs: standard-plugin-list #35796
The following plugins are intentionally left out:

• osc52.lua: not user-facing
• rplugin.vim: will be removed
• shellmenu: will probably be removed
2025-09-17 09:09:49 -07:00
zeertzjqandChristian Brabandt 8ec562fe52 vim-patch:684edc7: runtime(doc): mention generic log highlighter (#35812)
https://github.com/vim/vim/commit/684edc7dceea2e5c4f840eb6465595b78459e2f1

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-17 10:13:59 +08:00
zeertzjqandHirohito Higashi da66c34a4f vim-patch:0b7d094: runtime(doc): Tweak doc style in syntax.txt (#35810)
closes: vim/vim#18310

https://github.com/vim/vim/commit/0b7d094d70eaeb2dbb1288144c28ad2a6fd05902

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-09-17 10:13:43 +08:00
zeertzjqandChristian Brabandt f896f07132 vim-patch:10d1ec6: runtime(doc): fix doc style from commit 5c9b71d63c1
related: vim/vim#18265

https://github.com/vim/vim/commit/10d1ec658cc4f0d5fca5d8518edcadf6027450e8

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-16 20:58:27 +08:00
zeertzjqandGirish Palya 051b8b88c8 vim-patch:9.1.1762: completion: selected item not cleared on <BS> with 'ac'
Problem:  completion: selected item not cleared on backspace when
          'autocomplete' is set
Solution: Clear the selected item (Girish Palya)

closes: vim/vim#18260

https://github.com/vim/vim/commit/5c9b71d63c1b324c6f4c7b84faf3fafa40c3fcc5

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-16 20:58:27 +08:00
ff777f9a85 docs: small fixes (#35791)
Close #34938
Close #35030
Close #35233
Close #35259
Close #35290
Close #35433
Close #35541
Close #35766
Close #35792

Co-authored-by: huylg <45591413+huylg@users.noreply.github.com>
Co-authored-by: Jason Del Ponte <961963+jasdel@users.noreply.github.com>
Co-authored-by: sooriya <74165167+thuvasooriya@users.noreply.github.com>
Co-authored-by: Andrew Braxton <andrewcbraxton@gmail.com>
Co-authored-by: Enric Calabuig <enric.calabuig@gmail.com>
Co-authored-by: Augusto César Dias <augusto.c.dias@gmail.com>
Co-authored-by: David Sierra DiazGranados <davidsierradz@gmail.com>
Co-authored-by: Stepan Nikitin <90522882+vectravox@users.noreply.github.com>
Co-authored-by: Emilien Breton <bricktech2000@gmail.com>
2025-09-16 11:41:36 +08:00
zeertzjqandPeter Kenny cf9be1ea23 vim-patch:d4c2cb4: runtime(doc): Improve doc for cmdline-ranges in cmdline.txt (#35788)
closes: vim/vim#18278

https://github.com/vim/vim/commit/d4c2cb4b271b3e018d13a51245714a387d7006ec

Co-authored-by: Peter Kenny <github.com@k1w1.cyou>
2025-09-16 09:28:37 +08:00
ddcfa8bb4a vim-patch:8e0d374: runtime(doc): Improve the doc for :syn-containedin (#35785)
closes: vim/vim#18290

https://github.com/vim/vim/commit/8e0d374e4d3f1be11e64010d69b6d9a5e913ec8d

Co-authored-by: Damien Lejay <damien@lejay.be>
Co-authored-by: h_east <h.east.727@gmail.com>
2025-09-16 07:31:21 +08:00
Yochem van Rosmalen 47b0a718c3 feat(help): gx opens help tag in web browser #35778
Problem:
`gx` does not work on tags in help buffers to open the documentation of that tag in the browser.

Solution:
Get the `optionlink`, `taglink` and `tag` TS nodes and set extmark "url" property.
`gx` then discovers the extmark "url" and opens it.
2025-09-15 15:38:49 -07:00
Yochem van Rosmalen 566e8c66f9 docs: optionlinks don't need the bars #35777
Problem:
Options links work even without vertical bars around them due to their
single quotes: the bars are unnecessary.

Solution:
Remove them.
2025-09-15 12:36:44 -07:00
zeertzjqandMao-Yining 3f1b12c886 vim-patch:c37f25c: runtime(doc): update Markdown syntax documentation and mention Pandoc (#35762)
fixes: vim/vim#18286

https://github.com/vim/vim/commit/c37f25c651722f118289c3e09e7ee5b905c57af4

Co-authored-by: Mao-Yining <mao.yining@outlook.com>
2025-09-15 08:16:41 +08:00
zeertzjqandHirohito Higashi ca9cc98298 vim-patch:partial:235e77a: runtime(doc): Tweak documentation style more in options and ft_hare (#35761)
closes: 18289

https://github.com/vim/vim/commit/235e77a3a35525671d6a5e60c180c0dcc0351ea1

Skip ft_hare.txt.

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-09-15 08:00:43 +08:00
zeertzjq fbb1caf5f8 vim-patch:97e0f95: runtime(doc): tweak documentation style a bit more in options.txt (#35755)
related: vim/vim#18284

https://github.com/vim/vim/commit/97e0f955dadc58e878d9933ca6a5d97374573199
2025-09-14 16:45:18 +08:00
skewb1k a897cc17a5 feat(json): vim.json.encode() sort_keys #35574
Problem: There is no way to ensure a stable key order when encoding a JSON string,
which can be useful for comparisons and producing cleaner diffs.

Solution: Introduce a `sort_keys` option for `vim.json.encode()`,which
is disabled by default. When enabled, object keys are sorted in
alphabetical order.
2025-09-13 21:17:07 -07:00
Justin M. Keyes a30a947593 docs: move editorconfig.txt into plugins.txt
It helps to have plugins living in one common area, because it signals
to users the mechanisms for controlling them, which are typically driven
by keymaps and autocmds rather than builtin options.

We can always revisit if plugins.txt gets "too big" (for example, we may
want to introduce "project.txt" for the project concept, where
editorconfig and 'exrc' are relevant), but for now it's rather unusual
for editorconfig.txt to have its own dedicated helpfile.
2025-09-13 23:23:24 -04:00
Justin M. Keyes db67607201 docs: manpage, keycodes, json 2025-09-13 22:49:50 -04:00
zeertzjqandHirohito Higashi 68f40386ed vim-patch:partial:450d591: runtime(doc): tweak documentation style (#35748)
closes: vim/vim#18284

https://github.com/vim/vim/commit/450d59145e8675e608611a37db5f722ae31e041d

Skip ft_hare.txt.

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-09-13 23:33:06 +00:00
fredizzimo 8ae9a44d38 feat(ui): support grid=0 in nvim_input_mouse #32535
Problem:
Multigrid UIs have to find out which window to send the input by using
the Nvim focus rules, which are not fully documented.

Furthermore,`getmousepos()` has several problems when multigrid is
enabled, with the main one being that screenrow and screencol are window
relative instead of screen relative, due to the fact that the UI don't
send any absolute coordinates.

Solution:
Allow passing 0 as grid to `nvim_input_mouse`, with absolute
coordinates, which lets nvim determine the actual window to send the
mouse input to. This works as long as nvim is in charge of the window
positioning. If the UI repositions or resizes the windows, it can still
pass the grid it determines like before.
2025-09-13 14:57:04 -07:00
luukvbaal c1648cf820 fix(ui): forward 'rulerformat' to msg_ruler event #35707
Problem:  A 'rulerformat' not part of the statusline is not emitted through
          msg_ruler events.
Solution: Build the message chunks to emit as a msg_ruler event.
2025-09-13 13:34:58 -07:00
zeertzjqandDoug Kearns 99d16af86a vim-patch:e8bbdb9: runtime(doc): Add :defe[r] shortname spec and tag (#35741)
closes: vim/vim#18281

https://github.com/vim/vim/commit/e8bbdb90e449959dba9f3b270a78321e2cf1fae8

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-13 01:39:53 +00:00
zeertzjq a47ef74ff1 docs: add some missing items to vim_diff.txt (#35731) 2025-09-13 08:40:12 +08:00
zeertzjqandYee Cheng Chin cf9b7a37cc vim-patch:9.1.1753: defaults: 'diffopt' option value can be improved (#35727)
Problem:  defaults: 'diffopt' option value can be improved
Solution: Update diffopt defaults to include "indent-heuristic" and
          "inline:char" (Yee Cheng Chin)

The default diff options have not been updated much despite new
functionality having been added to Vim.

- indent-heurstic: This has been enabled by default in Git since
  33de716387 in 2017. Given that Vim uses xdiff from Git, it makes sense
  to track the default configuration from Git.

- inline:char: This turns on character-wise inline highlighting which is
  generally much better than the default inline:simple. It has been
  implemented since vim/vim#16881 and we have not seen reports of any issues
  with it, and it has received good feedbacks.

closes: vim/vim#18255

https://github.com/vim/vim/commit/976b365305c2e9025813ff3c7fe52f8d927fafc3

Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2025-09-12 03:57:05 +00:00
zeertzjq c06f0970b0 vim-patch:a0f37db: runtime(doc): use a single pattern in :h 'incsearch' example (#35721)
related: https://github.com/vim/vim/pull/18262#issuecomment-3277008408
closes: vim/vim#18270

https://github.com/vim/vim/commit/a0f37dbbf413537815656fb0752a8eb926acb05c
2025-09-11 23:08:02 +00:00
altermoandJustin M. Keyes 2e70f3522b docs: plugins.txt #35680
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-09-10 21:16:13 -07:00
zeertzjqandMaxim Kim 5377cd34a9 vim-patch:5a9ef93: runtime(doc): Update autocmd examples for command line autocompletion (#35713)
In Windows [/] should be escaped [\/]:

	autocmd CmdlineChanged [:\/\?] call wildtrigger()

This updated example works both in Linux and Windows.

closes: vim/vim#18262

https://github.com/vim/vim/commit/5a9ef93b2caeb0a7eb8838efbd992f6a9a72166c

Co-authored-by: Maxim Kim <habamax@gmail.com>
2025-09-11 08:02:47 +08:00
zeertzjq c4ecb7256b vim-patch:b2c8848: runtime(doc): improve docs related to 'autocomplete'
Manual completion can still be used when 'autocomplete' is set, so
saying "active" is better than "enabled".

closes: vim/vim#18261

https://github.com/vim/vim/commit/b2c88480553de7a7dc247fe8e361c8365eb4edec
2025-09-11 07:23:29 +08:00
zeertzjqandGirish Palya 5a7586a109 vim-patch:9.1.1750: completion: preinserted text highlighed using ComplMatchIns
Problem:  completion: preinserted text highlighed using ComplMatchIns
Solution: Use highlighting group PreInsert and update the documentation
          (Girish Palya).

When "preinsert" is included in 'completeopt', only the PreInsert
highlight group should be applied, whether autocompletion is active or not.
Previously, ComplMatchIns was used when autocompletion was not enabled.

Related to https://github.com/vim/vim/pull/18213.

closes: vim/vim#18254

https://github.com/vim/vim/commit/2525c56e423b3ddce8de925f582b9c4d00079675

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-11 07:23:28 +08:00
Jan Edmund LazoandBram Moolenaar 58ee249c2c vim-patch:9.0.0729: the rightleft and arabic features are disabled
Problem:    The rightleft and arabic features are disabled.
Solution:   Re-enable the features, some users want to use the functionality.

https://github.com/vim/vim/commit/ae906c8b1bf023f4a15f38b4abef9dedc2f18467

bug-reports -> bug-report

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2025-09-09 23:45:44 -04:00