Commit Graph
697 Commits
Author SHA1 Message Date
Lewis Russell 6a54396db4 build: enable more EmmyLua checks
- call-non-callable
- missing-fields
- redefined-label
- redefined-local
- undefined-field
- unreachable-code

Promote redefined-local and unreachable-code to warnings.

Fix DOS line-ending handling for multiline semantic tokens, and support
intersection types in the help parser.

AI-assisted
2026-09-08 16:50:53 +01:00
zeertzjqandSPFab 94636bdff0 vim-patch:58ed368: runtime(org): Fix escape in formatlistpat (#41782)
The regex atom \| needs an extra escape for a :set command

closes: vim/vim#21214

https://github.com/vim/vim/commit/58ed368ab9645b527d388a5c4dbbc8e8bc6e7193

Co-authored-by: SPFab <42518661+SPFabGerman@users.noreply.github.com>
2026-09-08 14:28:46 +00:00
zeertzjqandDawid Dziurla 31626aed41 vim-patch:a96c3bc: runtime(robot): Include ftplugin and set comment options
Set 'comments' and 'commentstring' for Robot Framework files.

closes: vim/vim#21220

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

Co-authored-by: Dawid Dziurla <dawidd0811@gmail.com>
2026-09-07 08:05:11 +08:00
zeertzjqandD. Ben Knoble a61bd270d6 vim-patch:41cab67: runtime(gitignore): take care when undo_ftplugin is already set
closes: vim/vim#21180

https://github.com/vim/vim/commit/41cab67eef611b065459207390ab3c9c2d200d65

Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
2026-08-31 10:46:15 +08:00
zeertzjqandmdspan 5cd7b3a9ad vim-patch:9.2.1018: filetype: radvd config files are not recognized (#41534)
Problem:  filetype: radvd config files are not recognized
Solution: Detect radvd.conf as radvd filetype, include syntax and
          filetype plugins, add syntax tests, update the menus (mdspan).

Reference:
https://linux.die.net/man/5/radvd.conf

closes: vim/vim#21159

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

Co-authored-by: mdspan <mdspan.github@gmail.com>
2026-08-29 08:49:18 +08:00
zeertzjqandBarrett Ruth 35ae925da9 vim-patch:9.2.1002: filetype: bazelrc files are not recognized (#41496)
Problem:  filetype: bazelrc files are not recognized
Solution: Detect *.bazelrc and tools/bazel.rc files as bazelrc filetype,
          include syntax und filetype plugins, update the menus
          (Barrett Ruth).

closes: vim/vim#21146

https://github.com/vim/vim/commit/1afe7ad1bb72f36a80f8e625b91d0e7506ce8985

Co-authored-by: Barrett Ruth <br@barrettruth.com>
2026-08-26 11:41:17 +08:00
zeertzjqandDoug Kearns d3b4f562a6 vim-patch:8331682: runtime(css): Update ftplugin, disable auto-commenting (#41443)
Remove "ro" from 'formatoptions'.

The universal selector "*" cannot be disambiguated from the 'comments'
middle "*" pattern, causing spurious "*" characters to be inserted after
selector lines.

fixes:  vim/vim#15140
closes: vim/vim#21125

https://github.com/vim/vim/commit/8331682f802455c868fc52ba09f7a8472cd0feea

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-08-23 01:22:08 +00:00
53211ade2b vim-patch:9.2.0969: runtime(shaderslang): matchit % breaks on braces (#41371)
Problem:  b:match_words groups "{" with the if/for/while/switch keywords
          and "}" with "break" which breaks % matching on braces
Solution: Drop the brace and bracket groups, matchit appends
          'matchpairs' by itself (Matthias Bruns).

matchit counts every alternative in a group instead of pairing the
alternatives with each other.  Listing `{` alongside the if, for,
while, switch, struct and class keywords therefore makes a line such
as `for (...) {` count as two openers, and listing `break` alongside
`}` lets a brace pair with a break statement.  As a result % on the
opening brace of a function does not move at all, and % on
`switch (x) {` jumps to `break;` instead of the closing brace.

Braces and brackets do not need to be listed: matchit appends
'matchpairs' to b:match_words by itself.  Drop them and leave the
preprocessor group unchanged.

closes: vim/vim#21064

https://github.com/vim/vim/commit/08c74ce09a9269b93b01ff2289683ad63f396fba

Co-authored-by: Matthias Bruns <matthiasbruns35@gmail.com>
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-19 07:47:24 +08:00
zeertzjqandBogdan Barbu 9c738cb718 vim-patch:9.2.0920: filetype: json-ld files are not recognized
Problem:  filetype: json-ld files are not recognized
Solution: Detect *.jsonld files as jsonld filetype, include
          filetype, indent and syntax plugins (Bogdan Barbu).

Reference:
https://www.w3.org/TR/json-ld11/

closes: vim/vim#20954

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

Co-authored-by: Bogdan Barbu <l4b.bogdan.barbu@gmail.com>
2026-08-07 12:36:41 +08:00
Barrett Ruth 886a270e7f refactor(zip)!: address entries with zip:// paths
Problem:
`zipfile://{archive}::{entry}` is ambiguous: `::` is legal in both an
archive path and an entry path, so the separator cannot be identified.
Splitting at the last `::` reads archives correctly but breaks entries
that contain it, and the plugin then emits buffer names it cannot read
back.

Solution:
Address entries as `zip://{archive}/{entry}`, joining the two paths.
Resolve the split by walking components: the first one that is a regular
file is the archive, because a regular file cannot have children on disk.
Entry paths may then contain any character, and no escaping is needed.

zipPlugin.vim keeps its own scheme, so the Java ftplugin emits whichever
form matches the active plugin until the legacy package is removed.
2026-08-03 15:22:25 -05:00
Justin M. Keyes 726d1a92d2 feat(options): lua closure/function options
Problem:
Cannot assign Lua functions/closures to "func" ('completefunc',
'tagfun', …) or "expr" ('foldexpr', 'indentexpr', …) options.

Solution:
- Store "func"/"expr" options as `Callback` instead of string.
- Delete oceans of copy-pasted code.
- BREAKING: LuaRef returned via RPC/Vimscript is now represented as
  `"<Lua N: file:line>"` (like what `:map` shows) instead of `nil`.
- Note: `man.vim` still uses `v:lua` string, bc it's a vimscript ftplugin.

Helped-by: Lewis Russell <lewis6991@gmail.com>
2026-07-31 21:50:04 +02:00
Barrett Ruth e29af9c32f refactor(zip)!: builtin zip.lua plugin #40846
Problem:
The bundled `zip` plugin is implemented in Vimscript, making it harder to
maintain and build on with Nvim's Lua runtime infrastructure.

Solution:
Add an opt-out `zip.lua` browser backed by `nvim.dir`, and disable the legacy
Vimscript implementation by moving it to `pack/dist/opt/zip/`. Load it with
`:packadd zip`.
2026-07-29 12:54:43 -04:00
Artem Krinitsyn fdc09be03c fix(help): g==: 'No code block found' #40990
Problem:
The code block query relied on a bug fixed in commit
7ed5609439, where a trailing newline was
not included in a node's text.

Solution:
Fix the query to expect the newline.
2026-07-26 12:27:30 -04:00
zeertzjqandYasuhiro Matsumoto 0a8d881537 vim-patch:9.2.0839: [security]: arbitrary code execution via keyword lookup
Problem:  [security]: arbitrary code execution via keyword lookup in
          sh.vim, zsh.vim and ps1.vim filetype plugin
          (manus-use)
Solution: For powershell, quote the commands using single quotes, for
          sh/zsh pass the argument as a separate list item to term_start()/system()
          (Yasuhiro Matsumoto).

Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-r5v6-q6j8-8qw2

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

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-07-24 08:14:04 +08:00
zeertzjqandFionn Fitzmaurice 05c5cf7e40 vim-patch:9.2.0836: filetype: .git-blame-ignore-revs file is not recognized (#40912)
Problem:  filetype: .git-blame-ignore-revs file is not recognized
Solution: Detect .git-blame-ignore-revs file as gitrevlist filetype,
          include syntax and filetype plugins (Fionn Fitzmaurice)

A Git revision list is

> a list of object names (i.e. one unabbreviated SHA-1 per line)...,
> comments (#), empty lines, and any leading and trailing whitespace are
> ignored.

(from Git's fsck.skipList documentation).

The default output of git rev-list will match this. It is also suitable
as input to git blame --ignore-revs-file.

This adds filetype detection matching .git-blame-ignore-revs files,
syntax highlighting and basic filetype settings.

closes: vim/vim#20702

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

Co-authored-by: Fionn Fitzmaurice <fionn@github.com>
2026-07-23 09:03:07 +08:00
774749e134 vim-patch:ac1bb93: runtime(jinja): Include ftplugin for jinja filetype
closes: vim/vim#20778

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

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Co-Authored-by: Alejandro Sanchez <hiphish@posteo.de>
2026-07-19 09:45:15 +08:00
721569dd9b vim-patch:9.2.0788: filetype: hip files are not recognized (#40809)
Problem:  filetype: hip files are not recognized
Solution: Detect *.hip files as hip filetype, include filetype, syntax
          and indent plugins, update makemenu.vim and synmenu.vim (Young)

Round out HIP (Heterogeneous-compute Interface for Portability) support
to mirror the existing CUDA files:

- autoload/dist/ft.vim: detect the ".hip" extension as filetype "hip"
- ftplugin/hip.vim: behave like C++ by sourcing ftplugin/cpp.vim
- indent/hip.vim: use cindent, like indent/cuda.vim
- makemenu.vim / synmenu.vim: add a Syntax menu entry

The syntax/hip.vim file already sources syntax/cpp.vim and adds the
HIP-specific keywords, matching syntax/cuda.vim.

closes: vim/vim#20773

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

Co-authored-by: Young <young20050727@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-18 22:19:48 +08:00
Barrett Ruth 0bb2f5cc08 fix(ftplugin): source inherited Lua ftplugins
Problem:
Vimscript ftplugins that inherit a base ftplugin often use explicit
`runtime! ftplugin/foo.vim` patterns. This skips corresponding Lua
ftplugins, unlike top-level ftplugin loading.

Solution:
Use the existing `{vim,lua}` patterns for bang runtime imports while
preserving each call's current lookup breadth.
2026-07-14 00:18:50 +02:00
Barrett Ruth fd02e91319 fix(ftplugin): port checkhealth ftplugin to Lua 2026-07-14 00:18:50 +02:00
567053bb3c vim-patch:dd89754: runtime(typst): Improve ftplugin, and syntax file
- Move whitespace formatting settings from the indent to the filetype
  plugin behind a "typst_recommended_style" config option.
- Set browsefilter
- Improve syntax file

Thanks to Maxim Kim for taking on maintainership of the typst runtime
files.

related: vim/vim#20036
closes:  vim/vim#20077

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Co-authored-by: Maxim Kim <habamax@gmail.com>
2026-07-02 08:14:48 +08:00
zeertzjqandYasuhiro Matsumoto d3509eac6a vim-patch:3fa4da4: runtime: add missing fnameescape()/shellescape() in a few runtime files (#40486)
ping @jamessan for the debugchangelog change.

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

Co-authored-by: Yasuhiro Matsumoto <mattn.jp@gmail.com>
2026-06-30 06:58:18 +08:00
07c37f6645 vim-patch:1f33732: runtime: guard recommended style settings consistently
Normalize the 15 existing guards to the documented two-level form
get(g:, 'X_recommended_style', get(g:, 'filetype_recommended_style', 1)):
fix the two non-standard "!exists() || != 0" guards (python, arduino) and
tolk's wrong fallback variable, and convert the simple one-level guards.

Add the guard to filetype plugins that set stylistic indentation/format
options without one: aap, abap, ada, cabal, cobol, elixir, falcon,
graphql, heex, idris2, mermaid, occam, racket, scala, swift, tera.

Settings that are required rather than stylistic are left untouched, e.g.
make/gomod/scdoc (mandatory tabs), chatito and vroom (indent mandated by
the format), and the textwidth/formatoptions cases in gitcommit/help/
jjdescription.

Supported by AI.

fixes:  vim/vim#20036
closes: vim/vim#20650

https://github.com/vim/vim/commit/1f33732613304958c935f302d8cb44bddc7f672f

Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-29 08:47:54 +08:00
zeertzjqandDoug Kearns 808fcc5a75 vim-patch:9a899af: runtime(vim): Fix heredoc triggering misidentifcation of Vim9 script
The following let-heredoc can cause legacy scripts to be misidentified
as Vim9 script if it appears early in the file.  Only match :vim9script
at the start of a line where it sensibly belongs.

let x =<< trim LINES
  vim9script
  ...
LINES

fixes:  vim/vim#20647 (reported by Maxim Kim).
closes: vim/vim#20654

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-06-29 06:35:35 +08:00
zeertzjqandMateo Gjika b7c8dcc75b vim-patch:91023ad: runtime(cabal): Update compiler, ftplugin, syntax, add indent script
closes: vim/vim#20623

https://github.com/vim/vim/commit/91023adc67e13158ae1462485a400de787f7aefe

Co-authored-by: Mateo Gjika <104777599+mateoxh@users.noreply.github.com>
2026-06-27 07:04:55 +08:00
zeertzjqandChristian Brabandt b595654c39 vim-patch:8c670b3: runtime(fennel): Update Last Update header
forgotten from commit 8513982a5ed5a84ba8e4e532505b07b4fa1efbdb

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

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-06-23 06:50:12 +08:00
zeertzjqandyilisharcs 8f98882c11 vim-patch:8513982: runtime(fennel): add more ";" comment leaders to 'comments'
closes: vim/vim#20579

https://github.com/vim/vim/commit/8513982a5ed5a84ba8e4e532505b07b4fa1efbdb

Co-authored-by: yilisharcs <yilisharcs@gmail.com>
2026-06-23 06:49:13 +08:00
zeertzjqandDoug Kearns 131f9f73ac vim-patch:98bf999: runtime(lua): Update ftplugin, fix matchit block comment pattern (#40349)
Include the unecessary but idiomatic leading '--' in the closing block
comment token.

E.g.,
	--[[
	 ...
	--]]

closes: vim/vim#20590

https://github.com/vim/vim/commit/98bf999d583118f73a8db7f808b5a22c1d38abd5

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-06-21 13:40:03 +00:00
zeertzjqandLopy cb33b05ba3 vim-patch:8181c6e: runtime(luau): runtime support is incomplete
Problem:  runtime(luau): runtime support is incomplete.
Solution: Add Luau syntax, indent, filetype plugin and indent tests.

closes: vim/vim#20544

https://github.com/vim/vim/commit/8181c6e31387c0467fcd6394d1b7da07f38e737c

Co-authored-by: Lopy <70210066+lopi-py@users.noreply.github.com>
2026-06-19 09:45:06 +08:00
zeertzjqandBruno BELANYI 8ea5747f6d vim-patch:1fee3cd: runtime(beancount): Include Beancount runtime files
Include with adjustments from the upstream repo:
https://github.com/nathangrigg/vim-beancount

closes: vim/vim#20373

https://github.com/vim/vim/commit/1fee3cd4b9a38b18656933d38a4977548d27808b

Co-authored-by: Bruno BELANYI <bruno@belanyi.fr>
2026-06-14 09:37:00 +08:00
zeertzjqandDoug Kearns 75ee4272a6 vim-patch:7895c9e: runtime(vim): Update ftplugin, add heredocs to b:match_words (#40091)
This depends on chrisbra/matchit#61 for full support of non-alphnum
heredoc markers.

closes: vim/vim#20399

https://github.com/vim/vim/commit/7895c9e6b8c6293b293656b48f2cd5f5a46a58b6

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-06-02 16:55:20 +00:00
zeertzjqandredavy df1f8a60cf vim-patch:9.2.0551: filetype: Tolk files are not recognized
Problem:  filetype: Tolk files are not recognized
Solution: Detect *.tolk files as tolk filetype, include a syntax and
          filetype plugin (redavy)

Tolk is a new-generation language for writing smart contracts on TON
blockchain, which is vim/vim#1 in speed among other chains.

Reference:
https://docs.ton.org/blockchain-basics/tolk/overview

closes: vim/vim#20320

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

Co-authored-by: redavy <hello.redavy@proton.me>
2026-05-29 09:06:12 +08:00
zeertzjqandAndrey Starodubtsev 13b7319bae vim-patch:9.2.0535: tests: matchit plugin is not tested (#40006)
Problem:  tests: matchit plugin is not tested
Solution: Add test_plugin_matchit, improve b:match_words for the html
          filetype plugin (Andrey Starodubtsev)

`b:match_words` which contains patterns used by `matchit` plugin to find
tag's counterpath, is fixed so that matching happens using the whole
tag, not just its first letter.

Also, it allows to find matching tag in case if there are spaces or
attributes after tag name.

fixes:  chrisbra/matchit#51
closes: vim/vim#20313

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

Co-authored-by: Andrey Starodubtsev <andrey.starodubtsev@gmail.com>
2026-05-26 08:28:08 +08:00
zeertzjqandChristian Brabandt 86b2751cad vim-patch:c175ce8: runtime(spec): Drop obsolete s:GetRelVer() function
https://github.com/vim/vim/commit/c175ce86fa96c34ed24443a6d0b4e87fda0f03fb

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-05-26 08:00:12 +08:00
zeertzjqandChristian Brabandt a412a4a846 vim-patch:010a71b: runtime(zig): Update upstream repo
related: vim/vim#20312

https://github.com/vim/vim/commit/010a71bb6072c6c99d311222f4960d403c982c47

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-05-26 08:00:12 +08:00
zeertzjqandChristian Brabandt 878718fa76 vim-patch:9.2.0496: [security]: Code Injection in cucumber filetype plugin
Problem:  [security]: Code Injection in cucumber filetype plugin
          (Christopher Lusk)
Solution: Use rubys Regexp.new() with the untrusted pattern

Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-4473-94jm-w5x9

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

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-05-18 08:11:18 +08:00
zeertzjqandmathmil 7096631249 vim-patch:2a01e59: runtime(just): add 'suffixesadd' to ftplugin
closes: vim/vim#20197

https://github.com/vim/vim/commit/2a01e5967103a06dd6c83bfca73995557a171a4b

Co-authored-by: mathmil <82173590+mathmil@users.noreply.github.com>
2026-05-18 08:11:17 +08:00
Marcus Caisey c4285acb92 fix(health): set 'tags' for help filetype #39742
Problem:
The `:checkhealth` buffer uses the help syntax, so help tag links (e.g.
`|clipboard|`) are highlighted like they are in help buffers. However,
unlike in help buffers, `CTRL-]` doesn't jump to the relevant help file.

I expect that if the `:checkhealth` buffer looks like a help buffer,
then it should behave like one where it makes sense. This comment from
/r/neovim suggests that this was the intention:
https://www.reddit.com/r/neovim/comments/5ghv3r/see_clipboard_how/dascnry/.

Solution:
Set `'tags'` in `checkhealth` buffers so that `:tag` and friends look
for tags in the help tags files.
2026-05-11 15:14:52 -04:00
zeertzjqandFelipe Matarazzo 37596fcd29 vim-patch:cb0b4cf: Fix a few more typos (#39596)
closes: vim/vim#20135

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

Co-authored-by: Felipe Matarazzo <felipemps@protonmail.com>
2026-05-04 23:18:52 +00:00
zeertzjq 5834743735 vim-patch:c23bfd7: runtime(help): fix wrong check for existing HelpComplete function
To check for an existing HelpComplete function, exists('*HelpComplete')
should be used, as exists('HelpComplete') still returns 0 after sourcing
the ftplugin.

closes: vim/vim#20073

https://github.com/vim/vim/commit/c23bfd7922dc20d83c96203d9f8840d0673245cf
2026-04-27 06:21:25 +08:00
zeertzjqandDoug Kearns f0ad84366a vim-patch:3cc7d50: runtime(algol68): Add new syntax file, ftplugin and filetype detection
- Add a syntax file update to Neville Dempsey's long-serving version
- Add a new rudimentary ftplugin
- Add filetype detection

Changes to the syntax file include:
- improved prelude, number and symbol highlighting
- prelude highlighting tests
- updated boiler plate

Note that these runtime files currently target Algol 68 Genie employing
the default UPPER stropping regime.  Support for GNU Algol 68 should
also be usable with the UPPER stropping regime, although somewhat less
complete.  Full support for the SUPPER stropping regime in GNU Algol 68
is also planned.

closes: vim/vim#19818

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2026-04-27 06:21:25 +08:00
zeertzjqandPeter Cardenas 91a15b7137 vim-patch:0ca1121: runtime(help): make help omnifunc global
closes: vim/vim#20024

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

Co-authored-by: Peter Cardenas <16930781+PeterCardenas@users.noreply.github.com>
2026-04-27 06:21:25 +08:00
32e249dfa6 vim-patch:9.2.0371: filetype: ghostty config files are not recognized (#39267)
Problem:  filetype: ghostty config files are not recognized
Solution: Detect ghostty configuration files as ghostty filetype,
          include a simple ghostty filetype plugin (Bez Hermoso)

closes: vim/vim#20002

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

Co-authored-by: Bez Hermoso <bezalelhermoso@gmail.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-04-21 02:24:07 +00:00
zeertzjqandHirohito Higashi b10ae3b72b vim-patch:72cefe6: runtime(help): support highlighting groups in translated syntax doc (#38922)
closes: vim/vim#19942

https://github.com/vim/vim/commit/72cefe6b72c92b5f3686ee297277a2940cbb702f

Also include a blank line change from https://github.com/vim/vim/commit/9d9381fb2804c426f88cd9b30650b94fc500d6bb

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2026-04-10 08:23:48 +08:00
JordanandJustin M. Keyes 3a4a66017b feat(api): rename buffer to buf #35330
Problem:
`:help dev-name-common` states that "buf" should be used instead of
"buffer" but there are cases where buffer is mentioned in the lua API.

Solution:
- Rename occurrences of "buffer" to "buf" for consistency with the
  documentation.
- Support (but deprecate) "buffer" for backwards compatibility.

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2026-04-08 20:34:47 -04:00
zeertzjqandChristian Brabandt a0fcf32ad5 vim-patch:82ebaa7: runtime(racket): Make visual K mapping more robust for shell injection (#38677)
fyi @benknoble

https://github.com/vim/vim/commit/82ebaa79b03f0f9d66eeba51570c62a83096108f

Co-authored-by: Christian Brabandt <cb@256bit.org>
2026-04-01 19:21:24 +08:00
d29db48e0a vim-patch:374f06f: runtime(racket): Use shellescape() to harden the K mapping
fyi: @benknoble

https://github.com/vim/vim/commit/374f06ffd8b890809289911334d8f0b0b15603bc

Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Michał Majchrowicz <mmajchrowicz@afine.com>
2026-04-01 07:58:14 +08:00
Matthew ChenandPhạm Bình An 410ba8374d fix(tutor): open a temporary copy instead of original file #38522
Problem:
`:Tutor` should open a copy of the tutor file instead of the original. This is
because edits modify the original file buffer, and crashes or other misuse could
potentially corrupt the original file even if it's WO.

Solution:
Copy the tutor file to a temp path before opening. Store the original path in
`b:tutor_file` so metadata json loading still works.

- `tutor#TutorCmd` will now copy the tutor file to a temp path via `tempname()`
  before opening with `drop`. Store the original path in `b:tutor_file` only
  after the buffer is created.
- `tutor#LoadMetadata` now uses `b:tutor_file` to resolve the JSON path instead
  of `expand('%')`, which now points to the temp copy buffer
- `ftplugin/tutor.vim` does not make the `tutor#LoadMetadata` call anymore. It
  was guarded by `filereadable(expand('%').'.json')` which fails for the new
  temp copy path logic . Instead, `tutor#LoadMetadata` is already called
  directly inside `tutor#TutorCmd` since we are already assumed to enable
  interactive.

Co-authored-by: Phạm Bình An <111893501+brianhuster@users.noreply.github.com>
2026-03-31 15:27:06 -04:00
Eisuke KawashimaandEisuke Kawashima 39bb5d7ca2 fix(runtime): stop treesitter highlight in b:undo_ftplugin #38459
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2026-03-24 05:17:02 -04:00
Anakin Childerhose 1de1c08210 vim-patch:9.2.0235: filetype: wks files are not recognized (#38451)
Problem:  filetype: wks files are not recognized.
Solution: Detect *.wks, *.wks.in and *.wks.inc as wks filetype,
          include a filetype and syntax plugin (Anakin Childerhose)

The OpenEmbedded Image Creation tool, `wic` uses wic kickstarter files
to define image partition and bootloader layouts.
wks files can end with .wks, .wks.in for templated wks files, and
.wks.inc for including in other .wks files.

The autocmd for *.wks.inc needs to come before *.inc in
runtime/ftdetect.vim

Reference:
https://docs.yoctoproject.org/ref-manual/kickstart.html#openembedded-kickstart-wks-reference
https://git.openembedded.org/openembedded-core/tree/scripts/lib/wic/canned-wks

closes: vim/vim#19796

https://github.com/vim/vim/commit/8c116bbe79eab7337bb5c979468d3b0cb5933d07
2026-03-23 23:40:03 +00:00
skewb1k 9a5641b4b5 fix(lua): drop support for boolean buf in vim.keymap #38432
Problem:
`vim.keymap.*.Opts.buf` allows `boolean` aliases for more widely
used `integer?` values, `true` -> `0` and `false` -> `nil`. This
conversion is unnecessary and can be handled at call sites.

Solution:
As a follow-up to deprecating the `buffer` option, drop support for
boolean values for the new `buf` option. The deprecated `buffer`
continues to support booleans for backward compatibility.
2026-03-23 08:00:53 -04:00