Commit Graph

10094 Commits

Author SHA1 Message Date
phanium
fd45bc8cab fix: lsp.enable() don't work correctly inside FileType event #37538
Problem:
Two cases lsp.enable() won't work in the first FileType event
1. lsp.enable luals inside FileType or ftplugin/lua.lua, then:
```
nvim a.lua
```

2. lsp.enable luals inside FileType or ftplugin/lua.lua, then:
```
nvim -> :edit a.lua -> :mksession! | restart +qa! so Session.vim
```

Solution:
Currently `v:vim_did_enter` is used to detected two cases:
1. "maunally enabled" (lsp.enable() or `:lsp enable`)
2. "inside FileType event"

To detect 2. correctly we use did_filetype().
2026-01-27 17:59:36 -05: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
Justin M. Keyes
c2ecc9ca41 Merge #37309 :checkhealth vim.pack 2026-01-27 09:19:46 -05:00
phanium
dfa5d79d05 fix: misc typos #37471 2026-01-27 09:18:02 -05:00
glepnir
ae93639ec4 fix(health): use FileType autocmd for bug report winbar #37486
Problem: In float mode, vim.schedule() may run before filetype is set,
so winbar is not shown.

Solution: Use FileType autocmd to ensure winbar is set after filetype.
Also use type=Bug in URL.
2026-01-27 09:06:50 -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
d4360596b5 vim-patch:b424349: runtime(colors): include new catppuccin colorscheme (#37570)
closes: vim/vim#19258

b42434915b

Co-authored-by: Maxim Kim <habamax@gmail.com>
2026-01-27 19:51:10 +08: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
zeertzjq
f79bddd669 vim-patch:b8efcc0: runtime(vim): set 'path' to common Vim directories
closes: vim/vim#19219

b8efcc0202

Co-authored-by: Mateo Gjika <104777599+mateoxh@users.noreply.github.com>
2026-01-27 07:20:41 +08: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
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
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
41dcfb80af vim-patch:dd3aa92: runtime(toml): update syntax and ftplugin.
Add "-" to iskeyword. This required a change to the syntax files too
because they were using the word begin and end atoms.

closes: vim/vim#17259

dd3aa92ce6

Co-authored-by: Aman Verma <amanraoverma@gmail.com>
Co-authored-by: Teemu Ikonen <tpikonen@mailbox.org>
Co-authored-by: A4-Tacks <wdsjxhno1001@163.com>
2026-01-26 07:03:28 +08: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
4076994db6 vim-patch:5c855ce: runtime: convert *_utf-8.vim files to actual UTF-8 encoding
Several runtime files with "_utf-8" in their filename are actually encoded
in latin1 or cp1255, not UTF-8. This causes errors when tools attempt to
read these files as UTF-8.

Files converted:
- esperanto_utf-8.vim: latin1 -> UTF-8, updated scriptencoding directive
- greek_utf-8.vim: latin1 -> UTF-8
- hebrewp_utf-8.vim: cp1255 (Windows Hebrew) -> UTF-8
- menu_ca.utf-8.vim: latin1 -> UTF-8
- menu_ca_es.utf-8.vim: latin1 -> UTF-8
- menu_pt_pt.utf-8.vim: latin1 -> UTF-8

The actual functionality remains unchanged - only the encoding was modified.

closes: vim/vim#16390

5c855ce43d

Co-authored-by: ThanhNguyxn <thanhnguyentuan2007@gmail.com>
2026-01-26 06:53:53 +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
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
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
Christian Clason
57574db154 build(deps): bump tree-sitter-vim to v0.8.0 2026-01-24 14:16:46 +01:00
zeertzjq
11d1ebba4a vim-patch:09a4805: runtime(csh): Update ftplugin, improve matchit behaviour
- Allow for an unparenthesised expression argument to the 'if',
  'if-then', and 'while' commands.  This is undocumented, and probably
  unintended, behaviour but is frequently seen in the wild.
- Allow for a continued-line expression argument to the 'if-then'
  command.

related: vim/vim#19172 (csh: Support negated if in matchit)
closes:  vim/vim#19190

09a48056c7

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-01-24 08:09:58 +08:00
zeertzjq
2f234d8647 vim-patch:95bb4ef: runtime(csh,tcsh): Update syntax files
- Adopt csh syntax file.
- Highlight tcsh strings with the String highlight group.
- Fix 'set' command highlighting with trailing comments. See
  https://github.com/vim/vim/pull/19172#issuecomment-3751574224
- Fix whitespace style in MAINTAINERS file

closes: vim/vim#19191

95bb4ef7d1

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-01-24 08:09:45 +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
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
35d8dcd020 vim-patch:81f1c5d: runtime(debcontrol): improve Debian syntax files
Changes to debcontrol:
- Only use debcontrolEmail for Maintainer/Uploaders
- Add Build-Driver to debcontrolField
- Add Protected to debcontrolStrictField
- Remove Uploaders from the more generic region
- Add explicit support for highlighting build profiles
- Add explicit support for highlighting architecture specifications
- Fix URL for sections.822

Changes to debversions:
- Move plucky to unsupported

closes: vim/vim#19228

81f1c5d384

Co-authored-by: James McCoy <jamessan@debian.org>
2026-01-22 07:28:05 +08:00
zeertzjq
524f422564 vim-patch:87635dc: runtime(kitty): Add kitty ftplugin file
closes: vim/vim#19232

87635dcb5a

Co-authored-by: Arvin Verain <arvinverain@proton.me>
2026-01-22 07:27:19 +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
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
fb7ac397aa vim-patch:4e2aafd: runtime(netrw): Do not create swapfiles in netrw buffers
Problem:  When using netrw to navigate directories, vim immediately
          creates, then deletes a swap file in the entered directory,
          causing the lastModifiedTime of that directory to change.
Solution: Use the :noswapfile command modifier in s:NetrwEditFile()

fixes: vim/vim#18854

4e2aafddbb

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-01-20 07:56:53 +08:00
zeertzjq
f728895edd vim-patch:d829e10: runtime(sml): add 'include' setting to ftplugin
closes: vim/vim#19156

d829e10e0f

Co-authored-by: Mateo Gjika <104777599+mateoxh@users.noreply.github.com>
2026-01-20 07:56:53 +08:00
zeertzjq
c0062da148 vim-patch:b1fa262: runtime(asm): add '#' as comment symbol (GNU as)
closes: vim/vim#19158

b1fa262960

Co-authored-by: Mateo Gjika <104777599+mateoxh@users.noreply.github.com>
2026-01-20 07:56:53 +08:00
zeertzjq
4fb8ba303c vim-patch:d5f173c: runtime(menu): fix space before Tab and trailing space
closes: vim/vim#19209

d5f173cf90
2026-01-20 07:56:50 +08:00
zeertzjq
eb86bbf83a vim-patch:b55f022: runtime(vim): Sync syntax generator base file with output file.
Synchronisation was lost in commit 0fab891 and the error propagated to
the output file in commit 5606ca5.

closes: vim/vim#16889

b55f0221cc

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-01-20 06:23:11 +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
zeertzjq
069a5ef8e0 vim-patch:0b103d6: runtime(haskell): add include-search and define support in ftplugin
closes: vim/vim#19143

0b103d6a7c

Co-authored-by: Mateo Gjika <104777599+mateoxh@users.noreply.github.com>
2026-01-19 07:02:22 +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
zeertzjq
3bbd646f59 vim-patch:617bf46: runtime(doc): Tweak documentation style in {ft_context,terminal}.txt
closes: vim/vim#19199

617bf466bb

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2026-01-19 06:57:35 +08:00