Commit Graph

4109 Commits

Author SHA1 Message Date
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
Olivia Kinnear
c28113dd9d fix(health): add back vim.cmd.redraw() call (#37576)
Was erroneously removed by #37462 during rebase.
2026-01-27 08:54:27 +01: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
Olivia Kinnear
e9d03b92b6 fix(health): redraw after emitting progress message #37567
Problem:
`vim.cmd.redraw()` is not called after displaying a progress message, so
vim will display progress for the previous health check, not the current
one.

Solution:
Call `vim.cmd.redraw()` so that the correct progress message is displayed.
2026-01-26 16:15:47 -05:00
glepnir
543e14d040 docs: nvim_set_hl fg_index, bg_indexed #37534 2026-01-26 08:31:57 -05:00
Sergei Slipchenko
f7b573f80a fix(diagnostics): assert adjusted diagnostic position #37210
Problem: 
During diagnostic position adjustment we may go out of bounds
when trying to get line's length. But it's not clear what kind of
input triggers that.

Solution:
Assert and print relevant input values.
2026-01-26 08:26:50 -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
d982c00846 vim-patch:9.1.2110: filetype: skhd files are not recognized
Problem:  filetype: skhd files are not recognized
Solution: Detect .skhdrc and skhdrc as skhd filetype,
          include a syntax and filetype plugin, add syntax tests
          (Kiyoon Kim)

Add syntax highlighting for skhd (simple hotkey daemon for macOS)
configuration files. Includes filetype detection for skhdrc and
.skhdrc files.

Reference:
- https://github.com/asmvik/skhd

closes: vim/vim#19235

e5f61842b5

Co-authored-by: Kiyoon Kim <kiyoon@users.noreply.github.com>
2026-01-26 07:00:32 +08:00
zeertzjq
798ee64287 vim-patch:9.1.2109: filetype: NetLinx fires are not recognized
Problem:  filetype: NetLinx fires are not recognized
Solution: Detect *.axs and *.axi as netlinx filetype
          (kb).

Reference:
- https://www.amx.com/en/site_elements/amx-language-reference-guide-netlinx-programming-language
- https://kielthecoder.com/2021/06/11/netlinx-getting-started/

closes: vim/vim#19249

6963e3b8bf

Co-authored-by: kb <kim@simple.industries>
2026-01-26 06:42:36 +08: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
Olivia Kinnear
c39d18ee93 fix(lsp): raise error when lsp config is invalid type (#37508) 2026-01-22 15:44:04 -08:00
Olivia Kinnear
34116bbd9b fix(lsp): fix nil-index error for :lsp enable (#37411)
Problem:
`:lsp enable` with no arguments will fail if there is a invalid config
in `lsp/`, or if `vim.lsp.config[...]` returns nil for any other reason.

Solution:
Add a nil-check to `:lsp enable`.
2026-01-22 12:27:03 -08:00
zeertzjq
87276db7f9 vim-patch:9.1.2100: filetype: tiltfiles are not recognized (#37477)
Problem:  filetype: tiltfiles are not recognized
Solution: Detect Tiltfiles.* and *.tiltfiles as tiltfile  filetype.
          (Luis Davim)

Reference:
- https://docs.tilt.dev/api.html

fixes:  vim/vim#19214
closes: vim/vim#19218

ff0e5d994c

Co-authored-by: Luis Davim <luis.davim@gmail.com>
2026-01-21 07:34:51 +08: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
Christian Clason
c52f6eb49a vim-patch:9.1.2094: filetype: tiger files are not recognized
Problem:  filetype: tiger files are not recognized
Solution: Detect *.tig files as tiger filetype
          (Christian Clason).

Reference:
- https://www.cs.princeton.edu/~appel/modern/

closes: vim/vim#19202

eb53ed5de0

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
2026-01-18 23:33:22 +01:00
Christian Clason
06e4b159ed fix(health): show full curl output
Problem: The health check for `curl` strips the first line of the
version output, which contains potentially useful information.

Solution: Only trim empty lines.
2026-01-17 11:28:00 +01:00
zeertzjq
d6e5286d2c vim-patch:9.1.0059: No event triggered before creating a window
Problem:  No event is triggered before creating a window.
          (Sergey Vlasov)
Solution: Add the WinNewPre event (Sergey Vlasov)

fixes: vim/vim#10635
closes: vim/vim#12761

1f47db75fd

Not sure if this should be triggered before creating a floating window,
as its use case is related to window layout.

Co-authored-by: Sergey Vlasov <sergey@vlasov.me>
2026-01-16 15:55:33 +08:00
ashab-k
86c939ba91 fix(treesitter): fix spell navigation on first line (#37361)
Problem:  Spell navigation skips words on the first line because
          _on_spell_nav passes an empty range (0,0) to the highlighter.

Solution: Use math.max(erow, srow + 1) to ensure a valid search window.

Signed-off-by: ashab-k <ashabkhan2000@gmail.com>
2026-01-15 10:20:24 +08:00
Justin M. Keyes
9afd81512b Merge #37377 from echasnovski/pack-fix-checkout 2026-01-13 00:07:09 -05:00
Evgeni Chasnovski
bac4cde9cd fix(pack): actually checkout proper version of submodules
Problem: Installing plugin with submodules doesn't check out their
  state (due to `git clone --no-checkout` to not end up with default
  branch code in case of invalid `version`).

  Updating a plugin with submodules doesn't update their state.

Solution: Update `git_checkout` helper to account for submodules.
  Another approach would be `git checkout --recurse-submodules ...`,
  but that doesn't seem to allow `--filter=blob:none` for submodules,
  which is nice to have.

  Also make `git_clone` wrapper simpler since `--no-checkout` makes
  `--recurse-submodules` and `--also-filter-submodules` do nothing.
2026-01-12 22:57:38 +02:00
Tristan Knight
d2ca90d87e fix(glob): handle numeric literals in pattern matching (#37257)
Problem:
vim.glob.to_lpeg() errors when patterns contain numeric literals
(like the '1' in '.ps*1') because LPeg interprets numeric strings
as indexed grammar rule references. For example:
  vim.glob.to_lpeg('.ps*1')
  E5108: Lua: rule '1' undefined in given grammar

Solution:
Prefix all rule names with '_' in the end_seg() function to prevent
literal numbers from being interpreted as LPeg indexed rules. This
ensures pattern components like '1', '2', etc. are treated as
regular rule names rather than special references.
2026-01-12 10:58:01 -08:00
Evgeni Chasnovski
8f0b8a2c27 fix(pack): skip git stash during install
Problem: Installing plugin is done via `git clone --no-checkout ...`
  (to not end up with default branch code in case of invalid `version`).
  This leaves cloned repo in a state that `git stash` will actually add
  an entry to the stash list. Although not critical, better to not have
  that if possible.

Solution: explicitly skip `git stash` step in checkout during install.
2026-01-12 15:53:36 +02:00
zeertzjq
7a6e8d4430 docs: misc (#37281)
Close #37289
Close #37348

Co-authored-by: Marc Jakobi <marc@jakobi.dev>
Co-authored-by: Anton Kesy <anton@kesy.de>
2026-01-12 03:50:57 +00:00
zeertzjq
e790c87cd8 vim-patch:9.1.2078: A few more typos in various files (#37368)
Problem:  A few more typos in various files
Solution: Fix those (zeertzjq, antonkesy)

related: neovim/neovim#37348
closes:  vim/vim#19153

6a2b5b2246

Co-authored-by: Anton Kesy <anton@kesy.de>
2026-01-12 01:27:03 +00:00
zeertzjq
aed1f8c377 vim-patch:9.1.2079: use-after-free with 'qftf' wiping buffer (#37364)
Problem:  use-after-free with 'quickfixtextfunc' wiping buffer
          (henices)
Solution: Evaluate 'quickfixtextfunc' with textlock enabled.

closes: vim/vim#19142

300ea1133f

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-12 07:04:36 +08:00
Robert Muir
1629493f72 perf(lsp): avoid textDocument/definition requests during tag completion (#37260)
Problem:
vim.lsp.tagfunc looks for the presence of 'c' (cursor) flag and issues
sync textDocument/definition requests to all clients, otherwise
workspace/symbol requests. But 'c' flag can also be set during the
insert mode completion, e.g. with an empty tag completion query, the tag
func receives pattern of '\<\k\k' with flags 'cir'.

Solution:
check for 'i' (insert mode completion) flag and don't issue any LSP
requests, return vim.NIL for immediate fallback to tags.
2026-01-11 14:41:26 -08:00
zeertzjq
94144d4678 fix(lua): vim._with() doesn't save boolean options properly (#37354)
Problem:  vim._with() doesn't save boolean options with false values
          properly.
Solution: Use vim.F.if_nil().
2026-01-11 20:04:32 +08:00
Yochem van Rosmalen
f19653e370 fix(health): emit Progress message #37123
Problem:
The `"Running healthchecks..."` message doesn't inform the user much and
is a hack from before we got a way to emit actual progress messages.

Solution:
Use `nvim_echo` to emit progress messages showing the name of the report
that is currently running.
2026-01-09 17:00:09 -05:00
Christian Clason
0aabe7ae76 feat(inspect): update to a8ca312
Sync with upstream commit a8ca3120df
2026-01-09 10:07:15 +01:00
Evgeni Chasnovski
3e83f7bec7 docs: drop vim.pack WIP note, add example code #37229 2026-01-07 21:43:55 -05:00
benarcher2691
55a0843b7c feat(editor): :source can run Lua codeblock / ts injection #36799
Problem:
Can't use `:source` to run a Lua codeblock (treesitter injection) in
a help (vimdoc) file.

Solution:
Use treesitter to parse the range and treat it as Lua if detected as
such.
2026-01-07 20:20:53 -05:00
zeertzjq
7500f76e61 fix(filetype): fix typo (#37286)
Follow-up to #37278.

Not sure how I missed the typo. I even remember checking the PR twice...
2026-01-07 18:42:20 +08:00
zeertzjq
dd6ed20272 docs: misc (#37280)
Close #36806
Close #36812
Close #37003
Close #37016
Close #37038
Close #37039
Close #37157
Close #37185
Close #37213

Co-authored-by: saroj_r <sarojregmi.official@gmail.com>
Co-authored-by: Olivia Kinnear <git@superatomic.dev>
Co-authored-by: Igor <igorlfs@ufmg.br>
Co-authored-by: Justin Roberts <JustinEdwardLeo@gmail.com>
Co-authored-by: "Mike J. McGuirk" <mike.j.mcguirk@gmail.com>
Co-authored-by: Aymen Hafeez <49293546+aymenhafeez@users.noreply.github.com>
Co-authored-by: Peter Cardenas <16930781+PeterCardenas@users.noreply.github.com>
Co-authored-by: DrNayak2306 <dhruvgnk.work@gmail.com>
2026-01-07 08:11:42 +08:00
zeertzjq
a84bf386d2 vim-patch:9.1.2062: filetype: djot files are not recognized
Problem:  filetype: djot files are not recognized
Solution: Detect *.dj and *.djot files as djot filetype
          (Hoang Nguyen).

Reference:
- https://djot.net/

closes: vim/vim#19105

8d0fcff002

Co-authored-by: Hoang Nguyen <folliekazetani@protonmail.com>
2026-01-07 06:20:16 +08:00
zeertzjq
0bbbe236aa vim-patch:9.1.2061: filetype: Koka files are not recognized
Problem:  filetype: Koka files are not recognized
Solution: Detect *.kk files as koka filetype (Hoang Nguyen).

Reference:
- https://koka-lang.github.io/koka/doc/index.html

closes: vim/vim#19104

969a4a0ba5

Co-authored-by: Hoang Nguyen <folliekazetani@protonmail.com>
2026-01-07 06:19:12 +08:00
zeertzjq
a6df0db11f vim-patch:9.1.2060: filetype: Rasi include files are not recognized
Problem:  filetype: Rasi include files are not recognized
Solution: Detect *.rasinc as rasi filetype (Hoang Nguyen)

Reference:
- https://github.com/davatorium/rofi/blob/next/doc/rofi-theme.5.markdown#file-extension

closes: vim/vim#19103

b084b8f1db

Co-authored-by: Hoang Nguyen <folliekazetani@protonmail.com>
2026-01-07 06:18:28 +08:00
zeertzjq
b075656279 vim-patch:9.1.2059: filetype: Nickel files are not recognized
Problem:  filetype: Nickel files are not recognized
Solution: Detect *.ncl files as nickel filetype
          (Hoang Nguyen)

Reference:
- https://nickel-lang.org/getting-started/
- https://github.com/tweag/nickel/tree/master/examples

closes: vim/vim#19102

88f3ac34ea

Co-authored-by: Hoang Nguyen <folliekazetani@protonmail.com>
2026-01-07 06:17:49 +08:00
Robert Muir
efa6d91132 fix(diagnostic): display 1-based related information line/col numbers (#37093)
Problem
LSP Related Information line and column numbers are 0-based. Displaying
them this way can confuse the user, since vim line/col numbers are
typically displayed 1-based.

Solution
Display the line and column numbers as 1-based.
2026-01-04 15:07:00 -08:00
zeertzjq
715015d3b2 vim-patch:93eb081: runtime(doc): Clarify visual mark behavior in getpos(), setpos() (#37223)
Add documentation notes explaining that visual marks '< and '> have
different behaviors in getpos() and setpos().

Also fix a small typo.

closes: vim/vim#19070

93eb081eee

Co-authored-by: Larson, Eric <numeric.larson@gmail.com>
2026-01-03 23:46:15 +00:00
zeertzjq
ca731d2e55 vim-patch:9.1.2042: filetype: systemd quadlet files are not recognized (#37208)
Problem:  filetype: systemd quadlet files are not recognized
Solution: Detect additional patterns as systemd filetype
          (Ac5000)

Reference:
- https://docs.podman.io/en/latest/markdown/podman.1.html
- https://docs.podman.io/en/latest/markdown/podman-systemd.unit.5.html
- https://docs.podman.io/en/latest/markdown/podman-quadlet.1.html

fixes:  vim/vim#15078
closes: vim/vim#19057

0f93c988e9

Co-authored-by: Ac5000 <15003210+Ac5000@users.noreply.github.com>
2026-01-03 01:44:56 +00:00
Christian Clason
067b5743f5 vim-patch:9.1.2043: filetype: kos files are not reconized
Problem:  filetype: kos files are not reconized
Solution: Detect *.kos files as kos filetype
          (Chris Dragan)

Reference:
- https://github.com/kos-lang/kos

closes: vim/vim#19056

96a1caac6b

Co-authored-by: Chris Dragan <chris@dragan.dev>
2026-01-02 16:31:32 +01:00
Olivia Kinnear
a03ab03a10 fix(lsp): :lsp restart restarts on client exit #37125
Problem:
`:lsp restart` detects when a client has exited by using the `LspDetach`
autocommand. This works correctly in common cases, but breaks when
restarting a client which is not attached to any buffer. It also breaks
if a client is detached in between `:lsp restart` and the actual
stopping of the client.

Solution:
Move restart logic into `vim/lsp/client.lua`, so it can hook in to
`_on_exit()`. The public `on_exit` callback cannot be used for this, as
`:lsp restart` needs to ensure the restart only happens once, even if
the command is run multiple times on the same client.
2026-01-02 01:58:10 -05:00
Kira Kawai
3ac76977bc fix(diagnostic): check for extmark in get_logical_pos #37127
Problem: The function get_logical_pos did not account for the possibility that a diagnostic might not have an associated extmark, leading to potential errors or incorrect behavior.

Solution: Add a check for diagnostic._extmark_id and return the logical positions directly if it does not exist.
2026-01-02 01:49:28 -05:00
Tristan Knight
ed562c296a fix(lsp): improve dynamic registration handling #37161
Work on #37166 

- Dynamic Registration Tracking via Provider
- Supports_Method
    - Multiple Registrations
    - RegistrationOptions may dictate support for a method
2026-01-02 01:46:13 -05:00
zeertzjq
bd10f781b8 vim-patch:9.1.2035: filetype: filetype: Fennel fnlm files are not recognized (#37178)
Problem:  filetype: Fennel fnlm files are not recognized
          (Alexei Mozaidze, after v9.1.2034)
Solution: Detect *.fnlm files as fennel filetype, revert detecting
          *.fnml files

related: vim/vim#19047

ea189a6f4d

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-31 20:25:19 +08:00
zeertzjq
8e80e54478 vim-patch:9.1.2034: filetype: Fennel fnml files are not recognized (#37176)
Problem:  filetype: Fennel fnml files are not recognized
          (Alexei Mozaidze)
Solution: Detect *.fnml files as fennel filetype

Reference:
- https://fennel-lang.org/changelog#160--2025-10-13

fixes: vim/vim#19047

9c87af5c3c

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-12-31 10:39:50 +00:00
Peter Cardenas
f8ac713448 fix(treesitter): use metadata in :EditQuery captures #37116
Problem:
When the `#offset!` directive is used with `:EditQuery`, the query does not take the offset into consideration when creating the extmark to preview the capture.

Solution:
Use the capture metadata to modify the node range before creating the extmark.
2025-12-30 10:44:18 -05:00
Justin M. Keyes
b24522e77b Merge #37113 from echasnovski/pack-better-revert 2025-12-30 10:40:19 -05:00
glepnir
9833f0da5f fix(diagnostic): unstable sorting by severity #37154
Problem: random order for same-severity diagnostics, severity_sort reversed.

Solution: add stable comparison with _extmark_id tiebreaker.
2025-12-30 04:28:32 -05:00