5439 Commits

Author SHA1 Message Date
zeertzjq
6ad73421cb vim-patch:b422a33: runtime(gdb): Update syntax and ftplugin (#37783)
- Change syntax file maintainer.
- Add Guile and Python command highlighting.
- Update command list to version 12.
- Add foldable regions for the commands 'define', 'if' and 'while'
  multiline commands.
- Support documented partial command names.
- Add matchit, browsefilter, and comment formatting support.
- Support embedded C in compiler {code|print} commands.
- Add largely complete settings highlighting and folding.
- Add syntax tests (incomplete).

Thanks to Claudio Fleiner for many years of maintenance.

closes: vim/vim#10649

b422a33ac2

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-02-09 00:19:39 +00:00
Mike J McGuirk
15ff454443 feat(lsp): display codelens as virtual lines, not virtual text #36469
Problem: Code lenses currently display as virtual text on the same line
and after the relevant item. While the spec does not say how lenses
should be rendered, above the line is most typical. For longer lines,
lenses rendered as virtual text can run off the side of the screen.

Solution: Display lenses as virtual lines above the text.

Closes https://github.com/neovim/neovim/issues/33923

Co-authored-by: Yi Ming <ofseed@foxmail.com>
2026-02-08 16:10:41 -05:00
Mike J McGuirk
6cb3254c2f docs(eval): fix fn.strchar types #37737
Problem: The following strchar functions have incorrect types:

strcharlen() - Currently any. Always returns an integer, including on
error

strcharpart() - The skipcc annotation does not specify that 0 and 1 are
valid. These inputs are required for vimscript usage. The current
return type is any, even though the function returns an empty string
on error

strchars() - The skipcc annotation does not specify that 0 and 1 are
valid

Solution: Update the problem types.
2026-02-08 08:07:49 -05:00
Mike J McGuirk
6771b10b88 docs(eval): correct types for getcharsearch, setcharsearch #37734
Problem: In eval.lua, setcharsearch() has an incorrect param type,
causing Lua_Ls to display an error when a valid table is passed.

While getcharsearch correctly states that it returns a table, the type
is non-specific about the contents.

Solution: Update eval.lua with the correct types.
2026-02-08 08:06:55 -05:00
zeertzjq
a24f190531 vim-patch:1ff2239: runtime(compiler): add pyright Python type checker
closes: vim/vim#19017

1ff2239053

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2026-02-08 07:06:59 +08:00
zeertzjq
d2141396cd vim-patch:422ef98: runtime(doc): fix pattern problem in cmdline.txt (#37753)
closes: vim/vim#19322

422ef984b5

Co-authored-by: Mao-Yining <mao.yining@outlook.com>
2026-02-06 12:55:07 +00:00
Mathias Fußenegger
c4f322b769 refactor(lsp): always fetch lenses again in codelens.run (#37720)
The auto-refresh has a bit of a delay so it can happen that when a user
runs `codelens.run` it operates on an outdated state and either
does nothing, or fails.

This changes the logic for `.run` to always fetch the current lenses
before (optional) prompt and execution.

See discussion in https://github.com/neovim/neovim/pull/37689#discussion_r2764235931

This could potentially be optimized to first check if there's local
state with a version that matches the current buf-version, but in my
testing re-fetching them always was quickly enough that `run` still
feels instant and doing it this way simplifies the logic.

Side effect of the change is that `.run` also works if codelens aren't
enabled - for power users who know what the codelens would show that can
be useful.
2026-02-06 13:31:44 +01:00
Christian Clason
13a9cdc6b4 docs(lua): vim.keymap.set takes no noremap #37723
Problem: Unlike `nvim_keymap_set`, `vim.keymap.set` uses the non-negated
`remap` instead of `:set`'s `noremap`, but the documentation for this
got lost sometime before Nvim 0.10.

Solution: Restore the lost documentation and make it more explicit.
2026-02-05 08:43:04 -05:00
zeertzjq
6f27eb1591 ci(cirrus): update to FreeBSD 15.0 (#37716) 2026-02-05 21:39:08 +08:00
luukvbaal
bf68ba40a0 refactor: rename _extui => _core.ui2 #37692
Problem:
_extui module name is confusing and should eventually end up in _core/.

Solution:
Move it there and name it ui2.
2026-02-05 07:45:45 -05:00
zeertzjq
da60b80a74 vim-patch:03b42b2: runtime(doc): add note for -complete=shellcmdline (#37713)
closes: vim/vim#19330

03b42b2926

Co-authored-by: Mao-Yining <101858210+mao-yining@users.noreply.github.com>
2026-02-05 01:26:27 +00:00
Kevin Locke
2a906bfad6 docs: setting g:clipboard after provider init #37705
Problem:
Users may be unaware that setting `g:clipboard` after providers are
initialized has no effect, and that `has('clipboard')` initializes
providers, as in #13062.

Solution:
Note the restriction and link to workarounds in FAQ for discoverability.
2026-02-04 13:53:08 -05:00
jdrouhard
9278f792c3 feat(lsp): support range + full semantic token requests #37611
From the LSP Spec:
> There are two uses cases where it can be beneficial to only compute
> semantic tokens for a visible range:
>
> - for faster rendering of the tokens in the user interface when a user
>   opens a file. In this use case, servers should also implement the
>   textDocument/semanticTokens/full request as well to allow for flicker
>   free scrolling and semantic coloring of a minimap.
> - if computing semantic tokens for a full document is too expensive,
>   servers can only provide a range call. In this case, the client might
>   not render a minimap correctly or might even decide to not show any
>   semantic tokens at all.

This commit unifies the usage of range and full/delta requests as
recommended by the LSP spec and aligns neovim with the way other LSP
clients use these request types for semantic tokens.

When a server supports range requests, neovim will simultaneously send a
range request and a full/delta request when first opening a file, and
will continue to issue range requests until a full response is
processed. At that point, range requests cease and full (or delta)
requests are used going forward. The range request should allow servers
to return a result faster for quicker highlighting of the file while it
works on the potentially more expensive full result. If a server decides
the full result is too expensive, it can just error out that request,
and neovim will continue to use range requests.

This commit also fixes and cleans up some other things:

- gen_lsp: registrationMethod or registrationOptions imply dynamic
  registration support
- move autocmd creation/deletion to on_attach/on_detach
- debounce requests due to server refresh notifications
- fix off by one issue in tokens_to_ranges() iteration
2026-02-03 13:16:12 -05:00
Justin M. Keyes
f5931102f8 Merge #37626 feat(lsp)!: textDocument/codeLens as decoration provider 2026-02-03 09:46:37 -05:00
Yi Ming
965468fca1 feat(lsp): support workspace/codeLens/refresh 2026-02-03 22:25:21 +08:00
Yi Ming
fe23168e2b feat(lsp)!: reimplement textDocument/codeLens as decoration provider 2026-02-03 22:25:18 +08:00
Pavel Pisetski
41cac54325 feat(defaults): exclude temp dirs from 'shada' oldfiles #37631
Problem:
Temporary files from /tmp/ and /private/ paths clutter :oldfiles list.
Additionally, the documented Windows default (rA:,rB:) was never applied
due to a missing platform condition.

Solution:
Drop platform-specific shada differences and default to excluding
/tmp/ and /private/ paths.
2026-02-03 08:31:37 -05:00
zeertzjq
d594407735 test: unskip msgpackparse() test on Windows (#37683)
Not sure when it was fixed, but it passes now.
2026-02-03 16:31:27 +08:00
zeertzjq
4c0d1aceec vim-patch:093d0cb: runtime(doc): Clarify the behaviour of command completion functions (#37680)
closes: vim/vim#19294

093d0cb1cf

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-02-03 03:16:17 +00:00
zeertzjq
5da2a4b59a vim-patch:079700e: runtime(doc): Improve the description at :help :cwindow (#37661)
Describe the "height" argument when opening the quickfix window.

See: vim/vim#19302 ("[cl]window" has different behaviour from "[cl]open" about
their argument [height])

related: vim/vim#19302
closes:  vim/vim#19305

079700ee45

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-02-01 23:05:34 +00:00
zeertzjq
1906da52db fix(lua): close vim.defer_fn() timer if vim.schedule() failed (#37647)
Problem:
Using vim.defer_fn() just before Nvim exit leaks luv handles.

Solution:
Make vim.schedule() return an error message if scheduling failed.
Make vim.defer_fn() close timer if vim.schedule() failed.
2026-02-01 21:29:19 +08:00
zeertzjq
c74d5ceda1 vim-patch:dd9f7e6: runtime(doc): Fix some overlength lines
closes: vim/vim#19286

dd9f7e6cbb

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-02-01 08:30:59 +08:00
Evgeni Chasnovski
1aa81290a4 docs(pack): clarify caveats about installing based on the lockfile 2026-01-29 16:24:33 +02:00
zeertzjq
484f455402 test(terminal): status is -1 in TermClose if buffer is deleted (#37609) 2026-01-29 08:29:49 +00:00
zeertzjq
bfb30f7599 vim-patch:427fa3e: runtime(doc): 'ignorecase' affects character classes in the old engine
fixes: vim/vim#19230

427fa3e1e4

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-29 08:22:51 +08:00
Phạm Bình An
c7c5455da1 vim-patch:1e54023: runtime(doc): clarify vim.eval behavior with Vim special variables (#37369)
Problem:  The behavior of vim.eval() with Vim special variables is not
          clearly documented. It is (partly) the reason why Nvim
          Python's vim.eval gives different output when evaluating
          v:true and v:false
Solution: Document it (Phạm Bình An)

closes: vim/vim#19157

1e54023673
2026-01-29 07:19:20 +08:00
Josh Cooper
9988d7142d fix(types): add missing @return annotations 2026-01-28 10:56:36 +00:00
zeertzjq
6a28835320 vim-patch:0f3b7d2: runtime(doc): fix missing code block marker in ft-python-syntax (#37588)
related: vim/vim#18922
closes:  vim/vim#19261

0f3b7d2563
2026-01-28 06:50:24 +08:00
Phạm Bình An
d96a88252e docs: misc #37357
Problem:
- According to [pipx
  documentation](https://pipx.pypa.io/stable/docs/#pipx-install), `pipx
  install` doesn't have --upgrade argument. Running `pipx install
  --upgrade pynvim` results in an error "unrecognized arguments:
  --upgrade"
- In file if_pyth.txt:317, it says "Implementation is ... written in C".
  This is not true for Nvim, since find_module logic of Nvim's Python
  interface is implemented in Python.
  (fdaae821a9/pynvim/plugin/script_host.py (L217))
- $NVIM_LISTEN_ADDRESS has been deprecated.
- `:Next` is a core command, not termdebug plugin command. Termdebug
  uses `:Over` to send command `next` to gdb

Solution:
- Just use `pipx install pynvim`
2026-01-27 17:14:57 -05:00
Olivia Kinnear
34815777b2 fix(lsp): remove side-effects if vim.lsp.enable() raises an error (#37571)
Problem:
If `vim.lsp.enable()` fails with an error, either because `'*'` is one
of the provided names or because there is an error in a config,
`vim.lsp.enable()` will still have side-effects:
- All names before the one that encountered an error will still be added
  to `lsp._enabled_configs`, but the autocommand will not get added or
  run.
- Any name which makes `vim.lsp.config[name]` error will be added to
  `lsp._enabled_configs`, causing all future calls to `vim.lsp.enable()`
  to fail. This will also break `:che vim.lsp`.

Solution:
- Check all names for errors before modifying `lsp._enabled_configs`.
- Check `vim.lsp.config[name]` does not raise an error before enabling
  the name.
2026-01-27 13:17:45 -08:00
phanium
dfa5d79d05 fix: misc typos #37471 2026-01-27 09:18:02 -05:00
jdrouhard
8ed68fda50 feat(lsp): semantic token range improvements #37451
* cache all tokens from various range requests for a given document
  version
  - all new token highlights are merged with previous highlights to
    maintain order and the "marked" property
  - this allows the tokens to stop flickering once they've loaded once
    per document version
* abandon the processing coroutine if the request_id has changed instead
  of relying only on the document version
  - this will improve efficiency if a new range request is made while a
    previous one was processing its result
* apply new highlights from processing coroutine directly to the current
  result when the version hasn't changed
  - this allows new highlights to be immediately drawable once they've
    processed instead of waiting for the whole response to be processed
    at once
* rpc layer was changed to provide the request ID back in success
  callbacks, which is then provided as a request_id field on the handler
  context to lsp handlers
2026-01-27 08:56:52 -05:00
skewb1k
8c63d84be1 feat(health): check vim.ui.open() tool #37569
Problem:
`:checkhealth` does not report when no `vim.ui.open()` handler is
available.

Solution:
Factor command resolution into `_get_open_cmd()` and reuse it from
`:checkhealth` to detect missing handlers.
2026-01-27 08:51:00 -05:00
zeertzjq
6543217afc vim-patch:632fd8b: runtime(python): Highlight built-in constants in Python
Also add syntax tests for those newly constants.

closes: vim/vim#17788
closes: vim/vim#18922

632fd8bb96

Co-authored-by: Rob B <github@0x7e.net>
2026-01-27 07:20:41 +08:00
zeertzjq
d6fc5cbf55 vim-patch:0f8c685: runtime(doc): fix inconsistent indent in ft_rust.txt
related: vim/vim#19251
closes:  vim/vim#19257

0f8c685a68
2026-01-27 07:20:41 +08:00
zeertzjq
7c90e77a7c vim-patch:ad0dd7c: runtime(rustfmt): Recover accidentally deleted code, don't hide rustfmt error
closes: vim/vim#19251

ad0dd7cd1e

Co-authored-by: Arkissa <mrarkssac@gmail.com>
2026-01-27 07:20:41 +08:00
luukvbaal
d30d91f3a4 fix(ui): only internal messages are unsafe #37462
Problem:  Fast context for msg_show event inhibits vim.ui_attach from
          displaying a stream of messages from a single command.

Solution: Remove fast context from msg_show events emitted as a result
          of explicit API/command calls. The fast context was originally
          introduced to prevent issues with internal messages.
2026-01-26 18:18:51 -05:00
glepnir
543e14d040 docs: nvim_set_hl fg_index, bg_indexed #37534 2026-01-26 08:31:57 -05:00
Evgeni Chasnovski
e6d955cb2c docspack): mention re-install after source's default branch change #37560
Problem: `vim.pack.update()` doesn't update source's default branch if
  it has changed on the remote. It can be done by executing
  `git remote set-head origin --auto` for every plugin on every update,
  but it feels like too much extra work (which requires Internet
  connection) for a very rare use case.

  This matters since `version = nil` will keep pointing to previous
  default branch even after `vim.pack.update()`.

Solution: Document that in order for `version = nil` to point to the
  source's new default branch, perform clean re-install.
2026-01-26 08:20:33 -05:00
zeertzjq
637dbdbe03 vim-patch:17bba75: runtime(doc): Fix overlength lines in :help {russian,vietnamese}.txt
closes: vim/vim#19252

17bba758fa

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-01-26 07:05:42 +08:00
zeertzjq
d1167d1327 vim-patch:e914ada: runtime(doc): Fix erroneous *roff syntax examples
Problem dates back at least to commit 071d4279d6, Vim 7.0001 (2004).

The examples shown were of special character interpolation syntax, not
("number") register interpolation syntax.

Sources:
* https://www.gnu.org/software/groff/manual/groff.html.node/Built_002din-Registers.html
* https://github.com/mamccollum/troff-resources/blob/main/cstr-54.pdf

closes: vim/vim#19243

e914ada323

Co-authored-by: G. Branden Robinson <g.branden.robinson@gmail.com>
2026-01-26 06:52:50 +08:00
zeertzjq
92e9aaef41 vim-patch:2def2a7: runtime(doc): mark a-a-p website as dead
fixes: vim/vim#19247

2def2a70a3

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-26 06:44:11 +08:00
Aymen Hafeez
8c0c34786e docs(diagnostic): fix indentation in diagnostic-on-jump-example (#37516) 2026-01-25 12:11:01 -08:00
Jan Edmund Lazo
4cce77e547 vim-patch:9.1.1984: terminal OSC52 support can be improved (#37543)
Problem:  terminal OSC52 support to access the clipboard can be improved
Solution: Include and package the optional osc52 package, note: this
          requires a Vim with clipboard provider feature (Foxe Chen).

related: vim/vim#14995
closes: vim/vim#18575

02b8ec7da5

----

Nvim has incompatible implementation for OSC52 clipboard provider.
Vim9 is N/A.

Co-authored-by: Foxe Chen <chen.foxe@gmail.com>
2026-01-25 08:17:33 +08:00
zeertzjq
7daf8d2363 vim-patch:3a324c8: runtime(doc): Fix typo in syntax.txt (#37522)
closes: vim/vim#19239

3a324c83ab

Co-authored-by: Antoine Saez Dumas <antoine.saezdumas.git@gmail.com>
2026-01-23 23:48:23 +00:00
Yi Ming
8876413e2d feat(lsp): highlighting the symbol being renamed (#37390) 2026-01-23 11:02:56 -08:00
Christian Clason
647d3dc454 build(deps): bump luv to 1.51.0-2 2026-01-23 09:30:37 +01:00
zeertzjq
68e0b1bd01 vim-patch:f338a2f: runtime(doc): Update [gnt]roff information (#37476)
Content:
* Refer to the formatter as "GNU troff".  Strictly, "groff" refers to
  several things.[1]  Since the context is the editing of input to the
  formatter, GNU's troff program is most relevant choice.
* Refer to groff as distributions' default "typesetting" rather than
  "text processing" package.  Many text processing tools exist, and some
  distributions (Alpine Linux, NetBSD, OpenBSD) have replaced groff with
  mandoc[2] as their man page formatter.
* Mention that Plan 9 still ships an AT&T-derived troff; they even
  maintain it.[3]
* Correct explanation of traditional `yr` register (1).  `\n(yr` is not
  a request, but an escape sequence.[4]
* Correct explanation of traditional `yr` register (2).  This register
  has not interpolated a "2-digit year" since the year 2000; it now
  interpolates a 3-digit one, because AT&T troff designed the `yr`
  register with a Y2K bug in it.[5]
* Fix scrambled terminology.  The phrase "macro request" confuses two
  separate things: macros and requests.[6]  Say instead "font, request,
  register, macro, and string names"; these are the formatter object
  types that people writing groff documents most often use.
* Refer to "groff's mm package" instead of "GNU mm".  Strictly, this
  package is in groff's "contrib" area, which implies that it's not
  official GNU product.  (To be fair, after shipping with groff for over
  34 years,[7] I'm not sure how much distinction anyone perceives.)
* Motivate the newly added advice preferring macro package facilities
  for paragraphing; this issue is distinct from aiding sentence boundary
  detection, which until recently[8] was the only advice offered here.

Style:
* Condense introductory paragraphs.
* Refer to "language syntax" rather than "language primitives".
* Use slightly more idiomatic English.

While these revisions convey more information, they leave the line count
unchanged.  I'll try to stop fooling with this material now.

Notes:
[1] https://cgit.git.savannah.gnu.org/cgit/groff.git/tree/man/groff.7.man?h=1.24.0.rc1#n303
[2] https://mandoc.bsd.lv/
[3] https://github.com/9fans/plan9port/pull/738
    4f3a4d8b3d
[4] https://www.gnu.org/software/groff/manual/groff.html.node/Formatter-Instructions.html
    https://github.com/mamccollum/troff-resources/blob/main/cstr-54.pdf
[5] Tellingly, groff added the `year` register in its 1.16 release,
    dated 2000-05-23.
    https://cgit.git.savannah.gnu.org/cgit/groff.git/tree/NEWS?h=1.24.0.rc1#n3650
    https://cgit.git.savannah.gnu.org/cgit/groff.git/tree/ChangeLog.116?h=1.24.0.rc1#n261
[6] https://www.gnu.org/software/groff/manual/groff.html.node/Requests-and-Macros.html
    https://www.gnu.org/software/groff/manual/groff.html.node/groff.html_fot.html#FOOT26
[7] https://cgit.git.savannah.gnu.org/cgit/groff.git/tree/NEWS?h=1.24.0.rc1#n4192
    https://cgit.git.savannah.gnu.org/cgit/groff.git/tree/ChangeLog.old?h=1.24.0.rc1#n2714
[8] 638bbc57c1

closes: vim/vim#19221

f338a2f1a6

Co-authored-by: G. Branden Robinson <g.branden.robinson@gmail.com>
2026-01-20 22:58:21 +00:00
zeertzjq
e3990f8643 vim-patch:9.1.1202: Missing TabClosedPre autocommand
Problem:  Missing TabClosedPre autocommand
          (zoumi)
Solution: Add the TabClosedPre autcommand (Jim Zhou).

fixes: vim/vim#16518
closes: vim/vim#16855

5606ca5349

Co-authored-by: Jim Zhou <jimzhouzzy@gmail.com>
2026-01-20 06:23:11 +08:00
zeertzjq
a71ea81b86 vim-patch:638bbc5: runtime(doc): Update advice for [gnt]roff users
Content:
* Offer more specific guidance regarding input line breaks and sentence
  endings.
* Advise what to do when a line ends with sentence-ending punctuation
  but doesn't end a sentence.
* Advise against use of blanks lines and leading spaces for formatting
  when a macro package is in use.
* Advise how to achieve visual separation in the document without
  affecting formatting.
* Point out how the newline/end-of-sentence rules aid diffing.
* Distinguish the separate processes of inter-sentence space
  supplementation and filling.
* Use conventional (but accessible) terms from typography instead of
  more casual, approximate ones.
* Clarify what sort of extension the ms package's `XP` macro is.

Style:
* Fix comma splice with a semicolon.
* Use slightly more standard/idiomatic English.

Sources:
* https://rhodesmill.org/brandon/2012/one-sentence-per-line/
* https://www.ualberta.ca/en/computing-science/media-library/docs/unix-beginners.pdf
  (p. 20)
* https://www.gnu.org/software/groff/manual/groff.html.node/Input-Conventions.html
* https://cgit.git.savannah.gnu.org/cgit/groff.git/tree/doc/ms.ms?h=1.23.0#n1131
* https://docs-archive.freebsd.org/44doc/usd/18.msdiffs/paper.pdf

closes: vim/vim#19193

638bbc57c1

Co-authored-by: G. Branden Robinson <g.branden.robinson@gmail.com>
2026-01-19 07:01:58 +08:00