Commit Graph

9554 Commits

Author SHA1 Message Date
zeertzjq
43f7434bd5 vim-patch:014c731: runtime(doc): make :h virtcol() more accurate (#35976)
The current description (especially the "unlimited width" part) is
inaccurate in several ways:
- The size of virtual text can depend on window width. In particular,
  the size of "above" virtual text can be equal to window width.
- A double-width character that doesn't fit adds 1 to the virtual column
  of the following characters.
- The size of 'showbreak' and 'breakindent' is counted.

related: vim/vim#5713
closes: vim/vim#18447

014c731fa5
2025-10-01 23:33:36 +00:00
v1nh1shungry
70460d557c fix(lsp): scope inline_completion autocmds to buffer (#35965)
Problem:
Autocmds in inline_completion Completor are not scoped to specific
buffers. When multiple buffers have inline completion enabled, events
(InsertEnter, CursorMovedI, TextChangedP, InsertLeave) in any buffer
trigger callbacks for all Completor instances, causing incorrect
behavior across buffers.

Solution:
Add `buffer = bufnr` parameter to nvim_create_autocmd() calls to make
them buffer-local. Each Completor instance now only responds to events
in its own buffer.
2025-10-01 06:56:56 -07:00
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

4edaf89233
2025-09-30 09:32:33 +08:00
zeertzjq
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

c05335082a

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-30 09:32:33 +08:00
zeertzjq
4896178863 vim-patch:05e44e9: runtime(tex): add amsmath support to tex syntax script (#35958)
Problem:  tex syntax file does not support some of the math equation
          environments provided by amsmath.sty, therefore well-formed
          snippet is highlighted as "texBadMath"
Solution: add the environments

closes: vim/vim#18433

05e44e978f

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2025-09-30 08:26:55 +08:00
zeertzjq
af2932e2dc vim-patch:992e307: runtime(doc): update list of modifiers at :h expand() (#35957)
fixes: vim/vim#18435

992e30774f

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
Justin M. Keyes
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
zeertzjq
11b6fcdfa6 vim-patch:ae20d73: runtime(vim): Update base syntax, improve line-continuation skip patterns
Factor out the common prefix in line-continuation :syn-skip patterns.

closes: vim/vim#18416

ae20d732ae

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-29 09:23:42 +08:00
zeertzjq
7c9a4a2a71 vim-patch:f4a6acd: runtime(vim): Update base syntax, allow Vim9 :echo tail comments
- Match comments after Vim9 :echo and :execute.
- Match comments after Vim9 and legacy :eval.

closes: vim/vim#18420

f4a6acd86e

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-29 09:19:07 +08:00
zeertzjq
2cd899f730 vim-patch:7bb733f: runtime(vim): Update base syntax, match null_tuple literal
closes: vim/vim#18404

7bb733f6bf

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-29 09:17:13 +08:00
zeertzjq
e9d8d1b061 vim-patch:57d243e: runtime(vim): Update base syntax, fix indented Vim9 :redir highlighting
Include post operator whitespace in the Vim9 variable assignment
lookahead so that "redir =>" doesn't match as an assignment.

fixes: vim/vim#18319
closes: vim/vim#18323

57d243e27d

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-29 09:16:50 +08:00
zeertzjq
6b0365ae2f vim-patch:6f97624: runtime(vim): Update base syntax, fix Vim9 :for loop variable highlighting
Highlight the iteration variable's type in Vim9 :for {var} loops.

Reported by Aliaksei Budavei.

fixes: vim/vim#17961
closes: vim/vim#18163

6f97624e11

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-29 09:16:17 +08:00
zeertzjq
0ebb2ec4e4 vim-patch:4de931d: runtime(vim): Update base syntax, match enum constructor type args
closes: vim/vim#17840

4de931daae

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2025-09-29 09:15:17 +08:00
zeertzjq
22f6b9d11f vim-patch:72473ce: runtime(vim): Update base syntax, match generic functions
Match Vim9 generic functions, added in vim/vim#17313.

closes: vim/vim#17722

72473ce9f8

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-29 09:14:39 +08:00
zeertzjq
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

91ac18cb03

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

9d5208a931

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
Maria Solano
c5c6ddba91 feat(lsp): document method types (#35934) 2025-09-27 14:52:30 -07:00
Maria Solano
5fbc5ab810 fix(lsp): use correct workspace.diagnostics capability key (#35937) 2025-09-27 13:40:52 -07:00
Eisuke Kawashima
2d8ed73143 build(vim-patch.sh): ignore runtime/*/testdir/
tracked files are removed
2025-09-27 18:55:43 +08:00
skewb1k
e3c36f31e3 fix(highlight): ensure extmark range is within buffer bounds #35928
Adds an additional check for the case when end_col = 0, addressing
https://github.com/neovim/neovim/issues/35814#issuecomment-3340709532.

Validation is now localized to the highlighter without affecting the C API.
2025-09-26 19:32:28 -07:00
Tomasz N
56709ca168 fix(extui): setup buffers after activating eventignorewin (#35915)
fix(extui): set options and buffer name after 'eventignorewin'

Problem:  Setting up extui buffers emits OptionSet and BufFilePost events.
Solution: Set options and buffer name after 'eventignorewin'.
2025-09-26 01:51:14 +00:00
zeertzjq
a9486fe7e1 vim-patch:900c747: runtime(python): fix 'type' syntax highlighting (#35918)
The previous patterns unintentionally highlighted words like 'typename'.

addresses: https://github.com/vim/vim/pull/18090#issuecomment-3333025523
closes: vim/vim#18394

900c747da3

Co-authored-by: Jon Parise <jon@indelible.org>
2025-09-26 07:54:19 +08:00
zeertzjq
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

b6f9d38f96

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
0be3dee44f vim-patch:4b97fc9: runtime(javascript): Add "using" keyword to JavaScript syntax highlighting (#35910)
Prior to this change, const and let were keywords for variable
declarations.

This change adds `using` as another keyword for variable declaration.

This JavaScript feature was recently introduced.

Docs:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/using

closes: vim/vim#18381

4b97fc901f

Co-authored-by: Devin Weaver <suki@tritarget.org>
2025-09-24 23:28: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

1ae980a9cb
2025-09-25 06:50:44 +08:00
zeertzjq
641cb41832 vim-patch:34747a1: runtime(doc): update live-grep and fuzzy-file-picker examples
closes: vim/vim#18371

34747a13e0

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2025-09-25 06:50:44 +08:00
zeertzjq
d954763b85 vim-patch:b1446df: runtime(vim): Update base syntax, match :wincmd (#35898)
Match the full :wincmd command syntax.

Allow for oneline assignment to Vim9 variables named winc[md].

Fixes vim/vim#18368.

b1446dfd23

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-24 10:22:46 +08:00
zeertzjq
b7742714aa vim-patch:20e78ee: runtime(swayconfig): support new config options in syntax script
From sway(5):
 - allow_tearing
 - primary_selection
 - swaybg_command
 - swaynag_command

From sway-output(5):
 - color_profile
 - allow_tearing

From sway-input(5):
 - clickfinger_button_map
 - rotation_angle
 - scroll_button_lock

closes: vim/vim#18293

20e78ee807

Co-authored-by: Felix Pehla <29adc1fd92@gmail.com>
2025-09-24 08:38:15 +08:00
zeertzjq
0c23b863f4 vim-patch:9.1.1787: filetype: not all Sway config files are recognized
Problem:  filetype: not all Sway config files are recognized
Solution: Detect files within */sway/config.d/* as swayconfig filetype
          (Felix Pehla).

Sways default config automatically includes files placed in
@sysconfdir@/sway/config.d/* (see config.in), so it makes sense to use
the sway syntax for those.

related: vim/vim#18293

24f0dbba8c

Co-authored-by: Felix Pehla <29adc1fd92@gmail.com>
2025-09-24 08:36:53 +08:00
zeertzjq
409122e5ae vim-patch:11bde1f: runtime(sh): refactored sh.vim syntax script (#35895)
- unified bashStatement, kshStatement and shStatement as much as
  possible
- separated builtin commands from external programs
- cleaned up kornshell flavor logic
- fixed alias syntax highlighting
- added test for bash alias syntax highlighting
- removed daemon keyword

closes: vim/vim#18355

11bde1f169

Co-authored-by: Bjoern Foersterling <bjoern.foersterling@gmail.com>
2025-09-24 00:28:38 +00:00
zeertzjq
dd630e7f84 vim-patch:5830407: runtime(netrw): 'equalalways' is not always respected (#35894)
fixes: vim/vim#18358

58304078ad

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-24 00:03:38 +00:00
zeertzjq
7837161076 vim-patch:70d745a: runtime(zip): support PowerShell Core (#35880)
fixes: vim/vim#17987
closes: vim/vim#18345

70d745a61b

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

224f8ca769

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
Yochem van Rosmalen
09266830bd fix(diagnostic): show diagnostics on buffer load #35866
Problem:
Diagnostics set on unloaded buffers are not shown when the buffer loads.

Solution:
Use `once_buf_loaded()` to show the diagnostics on BufRead is the buffer
is not yet loaded.
2025-09-22 13:33:16 -07: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
SkrrtBacharach
cfe10b4014 fix(health): errors in :checkhealth with pyenv-virtualenv #35865
Problem:
pyenv-virtualenv sets a different path for VIRTUAL_ENV than the path to the
python binary it provides, but these paths both symlink to the same file, so
there should be no disparity. The python health-check reports an error, since it
only checks if these paths are equal, not where they point to (resolve to).

Solution:
- Resolve the python symlinks before checking if they are equal.
- Deduplicate some code.
2025-09-21 14:25:14 -07:00
zeertzjq
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

0208b3e80a

Co-authored-by: Girish Palya <girishji@gmail.com>
2025-09-21 00:56:38 +00:00
zeertzjq
6b7fc9d37f vim-patch:841becd: runtime(lf): update syntax to support lf version r38 (#35852)
Adds the lf release 38 specific syntax highlighting changes.

From the PR andis-sprinkis/lf-vim#24 by @CatsDeservePets

closes: vim/vim#18342

841becdc2d

Co-authored-by: Andis Spriņķis <andis@sprinkis.com>
2025-09-21 08:07:01 +08:00
zeertzjq
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

4150283b83

Co-authored-by: thinca <thinca@gmail.com>
2025-09-21 06:31:27 +08:00
zeertzjq
b756a6165a vim-patch:6fd9dac: runtime(log): highlight Java Errors (#35836)
closes: vim/vim#18315

6fd9dac992

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-19 12:36:56 +08:00
Judit Novak
6152bcf42e fix(health): hard fail on invalid "python-*" bin #35382
Problem:
Scripts named with 'python-…' prefix may not be valid python bins. If
such a script is found in a venv, the Python healthcheck fails hard.

    .venv/python-argcomplete-check-easy-install-script
    .venv/bin/python3.13
    .venv/bin/python

Solution:
- Discard known false-positives such as `python-argcomplete*`.
- Call `health.warn()` instead of `assert()` in `python_exepath()`.

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2025-09-18 20:07:14 -07:00
Samuel Huang
e3f15d5424 vim-patch:9.1.1775: filetype: Mamba configuration files are not recognized #35829
Problem:  filetype: Mamba configuration files are not recognized
Solution: Detect .mambarc and mambarc as yaml filetype (Samuel Huang).

References:
- https://mamba.readthedocs.io/en/latest/user_guide/configuration.html

closes: vim/vim#18338

21a21eafec
2025-09-18 19:41:27 -07:00
zeertzjq
67910bc99f vim-patch:e8b0e92: runtime(config): fix inconsistent group name
related: vim/vim#18292

e8b0e926d0
2025-09-19 07:42:45 +08:00
zeertzjq
f5e6c73e60 vim-patch:1e7a288: runtime(config): mark unportable += as an error
closes: vim/vim#18292

1e7a288cd3

Co-authored-by: Damien Lejay <damien@lejay.be>
2025-09-19 07:42:44 +08:00
zeertzjq
ec3dded6dd vim-patch:6701480: runtime(filetype): Use s:StarSetf for all patterns ending in * (#35825)
Problem:  Some filetype autocmds with patterns ending in * do not skip
          filenames matching g:ignored_patterns.
Solution: Move these autocmds to the appropriate section and call
          s:StarSetf() to set the filetype.

- Affected filetypes: dosini, execline, foam, messages, nginx, tmux.
- Convert foam filetype patterns to use wildcard matching.

closes: vim/vim#17422

6701480c43

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-09-19 06:55:00 +08:00
zeertzjq
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

ba36510920

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-09-18 08:12:44 +08:00