Commit Graph

1052 Commits

Author SHA1 Message Date
zeertzjq
fbcdbd458f vim-patch:e9d296e: runtime(erlang): recognize -if/-elif as erlangPreCondit in syntax script (#36542)
The -if(Condition)/-elif(Condition) are compiler macros that evaluate
the following lines only if Condition evaluates to true.  This patch
enables syntax highlighting for these macros.

https://www.erlang.org/doc/system/macros.html#conditional-compilation

closes: vim/vim#18729

e9d296e52a

Co-authored-by: Vadim Yanitskiy <fixeria@osmocom.org>
2025-11-12 23:45:50 +00:00
zeertzjq
3606b74d24 vim-patch:f85951f: runtime(css): improve cssBoxProp matches (#36528)
closes: vim/vim#18717

f85951fee0

Co-authored-by: Neil Lambert <nlambert@pm.me>
2025-11-12 08:23:35 +08:00
zeertzjq
637c9c4f5f vim-patch:d3bef6c: runtime(sml): Fix number regex in syntax script (#36513)
closes: vim/vim#18690

d3bef6cf3f

Co-authored-by: tocariimaa <tocariimaa@pissmail.com>
2025-11-11 09:28:18 +08:00
zeertzjq
1eb12b896e vim-patch:e1e3474: runtime(vim): Update base syntax, fix :augroup error matching (#36512)
Only terminate the :augroup END argument at whitespace, comments and
trailing bars.

closes: vim/vim#18711

e1e347475e

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-11-11 09:22:00 +08:00
zeertzjq
95f5bbd4a8 vim-patch:c8eeda9: runtime(doc): Improve header formatting
- Normalise header formatting and highlight all bylines.
- Remove broken email address from if_sniff.txt.

closes: vim/vim#18601

c8eeda9b15

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-11-10 11:13:52 +08:00
zeertzjq
c6dad6e9df vim-patch:a795aab: runtime(spec): Add support for more tags and distributions (#36502)
- specMacroIdentifier: support macros starting with '?'; the most common
  example is `%{?dist}`
- specPreAmble: added some missing tags from:
  https://rpm.org/docs/4.19.x/manual/spec.html
- Added support for: `fedora`, `rhel`, `rocky`, `rhl`, `centos`, `el\d`
  and `fc\d`, see https://docs.fedoraproject.org/en-US/packaging-guidelines/DistTag

closes: vim/vim#18703

a795aab885

Co-authored-by: Jesse Portnoy <jesse.portnoy@perforce.com>
2025-11-10 08:44:50 +08:00
zeertzjq
4466c950cb vim-patch:8869800: runtime(vim): Update base syntax, match :*do command arg
Match the Ex command arg to all :*do commands.

closes: vim/vim#18700

8869800f70

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-11-10 08:00:35 +08:00
zeertzjq
24ecd0c48d vim-patch:59f0ea5: runtime(vim): Update base syntax, match Vim9 object type constructor
fixes: vim/vim#18677.
closes: vim/vim#18691

Reported by Aliaksei Budavei.

59f0ea5b3e

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-11-10 08:00:12 +08:00
zeertzjq
82910ddbfb vim-patch:433d2ab: runtime(vim): Update base syntax, match Vim9 lambda arg to :defer
Support added in commit 21ef3c6e5972bbe8ab61195f98ccb85048b78985.

See: vim/vim#18643
closes: vim/vim#18645

433d2ab206

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-11-10 08:00:12 +08:00
zeertzjq
17bcf86cab vim-patch:461dd9a: runtime(vim): 'iskeyword' setting not correctly restored (#36453)
fixes: vim/vim#18673

461dd9aca6

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-11-05 08:07:54 +08:00
zeertzjq
c38365fd8e vim-patch:28f7582: runtime(log): syntax file update
closes: vim/vim#18675

28f7582c16

Co-authored-by: Mao-Yining <mao.yining@outlook.com>
2025-11-02 07:03:44 +08:00
zeertzjq
87ede4ab4f vim-patch:842c778: runtime(vim): Update base syntax, improve :@ highlighting
- Highlight :@ as a normal Ex command rather than something special.
- Fix erroneous matching of the Ex command as a register variable.

closes: vim/vim#18624

842c7788a5

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-10-27 16:52:49 +08:00
zeertzjq
b21a9d5b22 vim-patch:7dba04f: runtime(doc,vim): Update base syntax, match full :syntime command
- Use the optional tail command-name spec at :help :syntime.
- Match full :syntime command and highlight args.

7dba04f15c

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-10-27 16:52:09 +08:00
zeertzjq
e61880957f vim-patch:da5b600: runtime(vim): Update base syntax, match :terminal command
Match the full :terminal command syntax.

closes: vim/vim#18367

da5b6007fb

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-10-27 16:51:19 +08:00
zeertzjq
3bbab42a8d vim-patch:d535e58: runtime(debversions): Add resolute (26.04) as Ubuntu release name (#36345)
closes: vim/vim#18637

d535e5852b

Co-authored-by: James McCoy <jamessan@jamessan.com>
2025-10-27 03:05:57 +00:00
zeertzjq
a121ede1bf vim-patch:7193cab: runtime(make): Prevent makeTargetinDefine matching extra line
This fixes a bug introduced in 2a33b499a3d7f46dc307234847a6562cef6cf1d8:
When makeTargetinDefine ends with makeIdent, makeSpecTarget or
makeComment, the following line is also matched as makeTargetinDefine.

So, add keepend to prevent that just as makeTarget does.

related: vim/vim#18403
closes: vim/vim#18570

7193cab6c8

Co-authored-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
2025-10-26 07:22:59 +08:00
zeertzjq
4a2b9ec3c7 vim-patch:bbf4a10: runtime(unison): update syntax from upstream repository
closes: vim/vim#18623

bbf4a10fe4

Co-authored-by: Anton Parkhomenko <mailbox@chuwy.me>
2025-10-26 07:22:59 +08:00
zeertzjq
6a6ba5c567 vim-patch:46d8697: runtime(rst): Style update
Minor style and whitespace changes to the reST syntax file, to sync with
the development branch.

related: vim/vim#18566

46d86979a9

Co-authored-by: Marshall Ward <marshall.ward@gmail.com>
2025-10-14 10:44:37 +08:00
zeertzjq
d6a9679b46 vim-patch:a70f346: runtime(rst): Enable spell checking for more syntax constructs
Enable spell checking for more recognised constructs:

* comments
* footnotes
* citations
* directives
* inline markup (*text*, **text**, ...)

related: vim/vim#18566

a70f346706

Co-authored-by: Kirk Roemer <91125534+kirk-roemer@users.noreply.github.com>
2025-10-14 10:44:28 +08:00
zeertzjq
263d0f86b4 vim-patch:d7fb4cd: runtime(rst): Inline literal escape support
Escape character support was disabled for inline literals, which are
handled separately from standard inline highlights, in that escape
characters are unsupported.

related: vim/vim#18566

d7fb4cd2f8

Co-authored-by: Marshall Ward <marshall.ward@gmail.com>
2025-10-14 10:44:20 +08:00
zeertzjq
08e29ec4a1 vim-patch:5485827: runtime(rst): Recognise numeric footnotes [1] correctly
The markup for footonotes [1] and citations [2] are almost identical.
The difference is that footnotes allow numeric values but citations
allow every valid reference name except numeric values.

The regex for matching citations currently only checks for valid
reference names but does not exclude number-only labels, thus also
matches numeric footnotes.  To match such footnotes, e.g. ``[1]`` define
the syntax rule for footnotes after the syntax rule for citations so it
gets higher precedence and matches first.

[1] https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#footnotes
[2] https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#citations

related: vim/vim#18566

5485827c5f

Co-authored-by: Kirk Roemer <91125534+kirk-roemer@users.noreply.github.com>
2025-10-14 10:44:09 +08:00
zeertzjq
2b2a297bf1 vim-patch:4e9f16d: runtime(rst): Correctly end nested comments
Previously, a comment in a directive block would incorrectly mark
all subsequent lines in the directive block as comment, because the
syn-region did not check the leading indent.

related: vim/vim#18566

4e9f16dd1e

Co-authored-by: Antony Lee <anntzer.lee@gmail.com>
2025-10-14 10:43:48 +08:00
zeertzjq
6b006a03c4 vim-patch:47949b4: runtime(rst): Fix highlights nested in directive body
The leading two dots of a RST directive gets matched by
rstExplicitMarkup group first, and then the directive name and directive
body will be matched by the groups contained in rstDirectives cluster in
order.

The rstExDirective group in rstDiretives matches any RST directives
other than footnote, citation and hyperlink target, therefore admonition
and code block will be matched by rstExDirective. This fix has
rstExDirective contain rstExplicitMarkup so as to enable recursive RST
directives match.

The interpreted texts enclosed in quotes are not highlighted within a
RST directive body, because the rstCruft cluster contains a non-existing
rstInterpretedText group.It should be renamed to
rstInterpretedTextOrHyperlinkReference which is defined in a
DefineInlineMarkup function call.

related: vim/vim#18566

47949b4b46

Co-authored-by: Minjie Xu <madjxatw@gmail.com>
2025-10-14 10:43:09 +08:00
zeertzjq
dbddd5989a vim-patch:310082f: runtime(rst): Add support for rst_minlines
Following the approach used in other syntax definitions, add support for
defining the "syntax sync minlines=..." values for rst files in the
users' ~/.vimrc files, to allow the users to adjust that value in case
syntax highlighting stops working for some of the files they edit.

related: vim/vim#18566

310082f3cf

Co-authored-by: Dragan Simic <dsimic@manjaro.org>
2025-10-14 10:42:43 +08:00
zeertzjq
7455c5ce88 vim-patch:0940465: runtime(rst): Fix doctest block syntax
A doctest block usually spans multiple lines, e.g.

>>> print('this is a Doctest block')
this is a Doctest block

Remove ``oneline`` argument to syntax region as this requirement is not
met.  Consequently, also remove ``display`` as the prerequisite (the
syntax region is on a single line) is no longer met.

----

Recognise '>>>' inside doctest blocks

Recognise subsequent '>>>' prompts in doctest blocks, e.g.

>>> print('this is a Doctest block')
this is a Doctest block
>>> print('this is a second Doctest block')
this is a second Doctest block
A doctest block usually spans multiple lines, e.g.

>>> print('this is a Doctest block')
this is a Doctest block

related: vim/vim#18566

0940465866

Co-authored-by: Kirk Roemer <91125534+kirk-roemer@users.noreply.github.com>
2025-10-14 10:41:58 +08:00
zeertzjq
72578e5e28 vim-patch:5fe4faa: runtime(bitbake): fix multiline Python function parameter syntax (#36173)
Fix syntax highlighting for def-style Python functions, with their
parameters spanning multiple lines. E.g. the following should match as
valid Python code in Bitbake recipes:

    def myFunction(one, two, \
                   three, four):
        pass

For this to work, use the prefix modifier "\_" before the wildcard ".",
to also match newline characters.

closes: vim/vim#18565

5fe4faa711

Co-authored-by: Martin Schwan <m.schwan@phytec.de>
2025-10-14 02:17:24 +00:00
zeertzjq
446161ae08 vim-patch:2a33b49: runtime(make): syntax highlighting update for makeDefine (#36158)
Previously contents in makeDefine are nearly highlighted as Define, so
comments and targets shares the same color as Define, making it hard to
distinguish if someone write large block of targets-recipes as defined
function.

Such scenario is common in building data analysis pipeline. Recipes are
reused and targets may have multiple variables, and a single % implicit
rule is not enough.

closes: vim/vim#18403

2a33b499a3

Co-authored-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
2025-10-13 08:57:59 +08:00
zeertzjq
398c861daf vim-patch:37c8ce7: runtime(cangjie): Fixes and improvements for syntax script (#36150)
Housekeeping:
- Add GitHub repository link
- Update Last Change date

Style:
- Add Vim modeline for consistent formatting
- Unify indentation style (spaces to tabs)
- Wrap long cluster definitions for readability

New Features:
- Add highlighting for escape sequences
- Add error highlighting for invalid rune literals
- Add syntax-based folding support

Fixes:
- Fix rune matching to allow only a single character/escape
- Fix highlighting for double-quoted rune literals
- Fix highlighting for floats with exponents and type suffixes

37c8ce7fac

Co-authored-by: Wu Junkai <wujunkai20041123@outlook.com>
Co-authored-by: dkearns <dougkearns@gmail.com>
2025-10-13 07:24:45 +08:00
zeertzjq
c401999e47 vim-patch:143686b: runtime(java): Fold adjacent "import" declarations (#36095)
Also, distinguish (by abbreviating their names) and manage
foldable kinds of syntax items: blocks of code ("b"), plain
comments ("c"), Javadoc comments ("d"), adjacent "import"
declarations ("i").  Fold all qualifying items by default;
otherwise, do not fold items of explicitly delisted kinds.
For example,
------------------------------------------------------------
	let g:java_ignore_folding = "bcdi"
------------------------------------------------------------

Resolves zzzyxwvut/java-vim#12.

closes: vim/vim#18492

143686b3c4

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2025-10-09 07:49:35 +08:00
zeertzjq
6969534935 vim-patch:ce5f9f4: runtime(vim): Update base syntax, allow legacy script comments after :eval
closes: vim/vim#18522

ce5f9f45af

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-10-09 07:13:10 +08:00
zeertzjq
e47529ab56 vim-patch:9.1.1834: MS-Windows: not possible to highlight the title bar
Problem:  MS-Windows: not possible to highlight the title bar
Solution: Make the title/caption bar configurable by introducing the
          'go-C' option value which allows to highlight it using the
          TitleBar and TitleBarNC highlighting groups (Mao-Yining).

Introduce titlebar color customization for Windows 11 GUI through
highlight groups and new 'guioptions' flag:

- Add 'C' flag to enable titlebar color customization (opt-in)
- New highlight groups: TitleBar (active) and TitleBarNC (inactive)
- Uses DWMWA_CAPTION_COLOR and DWMWA_TEXT_COLOR DWM attributes
- Dynamically loads dwmapi.dll for Windows 11 compatibility
- Defaults to system colors when set to NONE or feature disabled

closes: vim/vim#18449

2c09368273

Co-authored-by: Mao-Yining <mao.yining@outlook.com>
2025-10-09 07:11:24 +08:00
zeertzjq
8db42b3b86 vim-patch:bfcf638: runtime(java): Make changes for JDK 25 (#36017)
- Add to the list of java.lang classes three new types: IO,
  ScopedValue, and ScopedValue.Carrier.
- Add to the list of java.lang interfaces a new type:
  ScopedValue.CallableOp.
- "Demote" RuntimePermission from the list of java.lang
  class types to javaLangDeprecated.
- Reintroduce supported syntax-preview-feature numbers 455
  and 488 as _a new number_ 507.

References:
https://bugs.openjdk.org/browse/JDK-8353641
https://openjdk.org/jeps/506 (Scoped Values)
https://openjdk.org/jeps/507 (Primitive Types in Patterns etc.)
https://openjdk.org/jeps/512 (Compact Source Files etc.)

closes: vim/vim#18479

bfcf638c73

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2025-10-04 19:15:48 +08:00
zeertzjq
2c76a50e20 vim-patch:9.1.1821: filetype: Not all PKL files are recognized (#36008)
Problem:  filetype: Not all PKL files are recognized
Solution: Detect *.pcf as pkl filetype, detect using the pkl-lsp://
          protocol as pkl filetype, include PKL syntax script
          (Jan Claußen)

This adds basic syntax support for the new PKL language by Apple.

What works:
- Shebang support
- Comment support
- Integers (decimal, hex, octal and binary) support
- Floating point support including exponentials
- Basic datatype support
- Unicode escape delimiters
- Escape code support
- String interpolation
- Support up to five pounds for custom delimiters
- Folding of multi-line comments and blocks

What doesn't work:

  The language heavily uses parameterized type declarations, which can get
  very complex. It is very hard to highlight this properly. There is
  official Tree-sitter support for this. Since it is hard to pull this off
  in a vim syntax file, I opted for basic support of the data types.

References:
  https://github.com/apple/pkl-pantry

fixes: vim/vim#18271
closes: vim/vim#18274

67a8f2945e

Co-authored-by: Jan Claußen <jan.claussen10@web.de>
2025-10-04 06:01:16 +08:00
zeertzjq
0124481c80 vim-patch:0a8b4ef: runtime(log): remove domain highlight (#36002)
The domain highlight is eazy to be confused and useless. Because we can
catch URL as a much obvious syntax.

closes: vim/vim#18467

0a8b4ef8b2

Co-authored-by: Mao-Yining <mao.yining@outlook.com>
2025-10-03 17:30:40 +08:00
zeertzjq
39c0425c4c vim-patch:0977c8b: runtime(vim): Update base syntax, contain user command replacement text (#35979)
Ensure that :command replacement text terminates at the end of the
logical line.

Add :command to the generator exclusion list.

fixes: vim/vim#18414 (@Dougaak)
fixes: vim/vim#18448 (Maxim Kim)
closes: vim/vim#18415

0977c8b03e

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-10-02 00:41:04 +00: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
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
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
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
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
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
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