Commit Graph
639 Commits
Author SHA1 Message Date
fb7ffac69f vim-patch:9.1.0326: filetype: some requirements files are not recognized (#28360)
Problem:  filetype: some requirements files are not recognized
Solution: Detect '*-requirements.txt', 'constraints.txt',
          'requirements.in', 'requirements/*.txt' and 'requires/*.txt'
          as requirements filetype, include pip compiler, include
          requirements filetype and syntax plugin
          (Wu, Zhenyu, @raimon49)

closes: vim/vim#14379

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

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Co-authored-by: raimon <raimon49@hotmail.com>
2024-04-16 09:33:33 +08:00
07661009c5 vim-patch:9.1.0325: CMakeCache.txt files not recognized (#28359)
vim-patch:9.1.0325: filetype: CMakeCache.txt files not recognized

Problem:  filetype: CMakeCache.txt files not recognized
Solution: Detect 'CMakeCache.txt' files as cmakecache filetype,
          include basic syntax script for cmakecache
          (Wu, Zhenyu, @bfrg)

closes: vim/vim#14384

https://github.com/vim/vim/commit/62c09e032c6b2d49fffac726300d142381924b98

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Co-authored-by: bfrg <bfrg@users.noreply.github.com>
2024-04-16 09:33:16 +08:00
zeertzjqandAliaksei Budavei 537ba34953 vim-patch:4052474a1bd2 (#28358)
runtime(java): Recognise non-ASCII identifiers (vim/vim#14543)

* runtime(java): Recognise non-ASCII identifiers

Also:

- Remove the already commented out and less general in its
  definition javaFuncDef alternative.

- Stop recognising some bespoke {p,trace} debugging API.

Non-ASCII identifiers have been supported from the outset
of the Java language.

> An _identifier_ is an unlimited-length sequence of _Java
> letters_ and _Java digits_, the first of which must be a
> Java letter.  An identifier cannot have the same spelling
> (Unicode character sequence) as a keyword . . . Boolean
> literal . . . or the null literal . . .
> . . . . . . . .
> Letters and digits may be drawn from the entire Unicode
> character set . . .
> . . . . . . . .
> A Java letter is a character for which the method
> Character.isJavaLetter . . . returns true.  A Java
> letter-or-digit is a character for which the method
> Character.isJavaLetterOrDigit . . . returns true.
> . . . . . . . .
> The Java letters include . . . for historical reasons, the
> ASCII underscore (_) . . . and dollar sign ($) . . .

(Separate syntax tests will be written when particular parts
now touched will have been further improved.)

Reference:
https://javaalmanac.io/jdk/1.0/langspec.pdf [§3.8]

* Take on the maintenance of Java filetype and syntax files

https://github.com/vim/vim/commit/4052474a1bd2fe756bc7dc596d29d0d7581e35ae

Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
2024-04-16 09:32:55 +08:00
Josef Litoš 8c970d3403 vim-patch:dd83b63eb5b7 (#28351)
runtime(i3config/swayconfig): update syntax scripts

modifications with the goals of:
- simplifying structure by using group `cluster`s
- improving visual highlighting responsiveness by using `nextgroup`
- improving recursive wm-msg command highlighting
- separating command variants meant for runtime and for config only

closes: vim/vim#14544

https://github.com/vim/vim/commit/dd83b63eb5b7884c1c882eb984778492f6951ed7
2024-04-16 07:48:15 +08:00
zeertzjqanddkearns 0f5c94c04b vim-patch:4ba70cab37d2 (#28338)
runtime(vim): Update base-syntax, fix nested function folding (vim/vim#14397)

Only match function folding start and end patterns at the start of a
line, excluding heredocs and :append/:change/:insert commands.

Fixes vim/vim#14393

https://github.com/vim/vim/commit/4ba70cab37d2a625d8c59bb136070ef9d1976934

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-04-15 07:46:14 +08:00
zeertzjqandDoug Kearns a928228355 vim-patch:ce06493aeb3d (#28321)
runtime(vim): Update base-syntax, add legacy header folding

Allow for syntax-based folding of Vim9 script legacy header regions.

This is enabled with the "H" flag of the g:vimsyn_folding config variable.

closes: vim/vim#14530

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2024-04-14 07:35:08 +08:00
Christian Clasonandjulio-b b87212e669 vim-patch:5392970921ab
runtime(i3config): Line continuation is not detected for 'set' command (vim/vim#14531)

Problem:  Valid i3config syntax is highlighted as error.
Solution: Skip over line-breaks correctly.

https://github.com/vim/vim/commit/5392970921aba5112f529a5d93407ae65c285fb1

Co-authored-by: julio-b <julio.bacel@gmail.com>
2024-04-13 22:41:51 +02:00
Christian ClasonandLinda_pp ee18c26f26 vim-patch:122d06858568
runtime(go): fix highlighting import string followed by some comment (vim/vim#14538)

https://github.com/vim/vim/commit/122d068585686babd63f0b729759ec269171d464

Co-authored-by: Linda_pp <rhysd@users.noreply.github.com>
2024-04-13 22:41:51 +02:00
zeertzjqandWu, Zhenyu 611cc7de43 vim-patch:9.1.0304: filetype: cgdb config file is not recognized (#28294)
Problem:  filetype: cgdb config file is not recognized
Solution: Detect cgdbrc files as cgdbrc filetype
          (Wu, Zhenyu)

closes: vim/vim#14458

https://github.com/vim/vim/commit/1492fe69037586b6c625d42205d77dd38ba51640

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-12 17:07:24 +08:00
zeertzjqanddkearns d627497156 vim-patch:04e5363b8238 (#28268)
runtime(vim): Improve Vim9 and legacy-script comment highlighting (vim/vim#13104)

This is a first-pass attempt to limit matching of Vim9 and legacy-script
comments to the appropriate syntactic contexts.

Vim9-script comments are highlighted at top level in a Vim9-script file,
in all :def functions, and in all :autocmd and :commmand command blocks.
Legacy-script comments are highlighted at top level in a legacy script
file, in all :func functions and in the Vim9-script preamble before the
:vim9script marker command.

Fixes vim/vim#13047, vim/vim#11307 and vim/vim#9587.

https://github.com/vim/vim/commit/04e5363b823827f144409df011376d00ea6df750

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-04-11 07:41:44 +08:00
zeertzjqanddkearns 7142c5dde9 vim-patch:e43ace558aee (#28258)
runtime(vim): Update base-syntax, no curly-brace names in Vim9 script (vim/vim#14466)

Remove curly-brace name matching for :def functions.  This is not
supported in Vim9 script.

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

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-04-10 06:31:10 +08:00
41521658b1 vim-patch:9.1.0276: No pandoc syntax support
Problem:  No pandoc syntax support
Solution: Add pandoc syntax and compiler plugins
          (Wu, Zhenyu, Konfekt)

closes: vim/vim#14389

https://github.com/vim/vim/commit/7005b7ee7f282b24378c2a844366cb8616cad5d7

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
2024-04-09 10:24:49 +02:00
Christian Clasonandjiangyinzuo 4a1eec85dd vim-patch:a2385c233499
runtime(cuda): Update cuda keywords, remove uncommonly used enumeration constants

closes: vim/vim#14406

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

Co-authored-by: jiangyinzuo <jiangyinzuo@foxmail.com>
2024-04-09 09:54:16 +02:00
Christian ClasonandWu, Zhenyu cbe982bbd5 vim-patch:9.1.0278: filetype: zathurarc files not recognized
Problem:  filetype: zathurarc files not recognized
Solution: Detect '.zathurarc' files as zathurarc filetype,
          add zathurarc filetype (Wu, Zhenyu)

closes: vim/vim#14380

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

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-04-09 09:54:07 +02:00
Christian ClasonandAliaksei Budavei 4add77ddbf vim-patch:5ccdcc482e29
runtime(java): Improve the matching of contextual keywords

- Recognise a _record_ contextual keyword.
- Recognise _non-sealed_, _sealed_, and _permits_ contextual
  keywords.
- Admit _$_ to keyword characters.
- Group _abstract_, _final_, _default_, _(non-)sealed_
  (apart from _(non-)sealed_, the incompossibility of these
  modifiers calls for attention).
- Remove another _synchronized_ keyword redefinition.

I have also replaced a function with an expression.  Before
patch 8.1.0515, it should have been declared :function! to
work with repeatable script sourcing; there is less to worry
about with an expression.

References:
https://openjdk.org/jeps/395 (Records)
https://openjdk.org/jeps/409 (Sealed Classes)
https://docs.oracle.com/javase/specs/jls/se21/html/jls-3.html#jls-3.8

closes: vim/vim#14403

https://github.com/vim/vim/commit/5ccdcc482e299609ae8852a75b22190e38b9b5df

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2024-04-05 09:07:07 +02:00
Christian Clasonanditchyny feaab21c71 vim-patch:cc7597c1edf4
runtime(yaml): improve syntax highlighting for YAML

- Recognize block scalar style to avoid unexpected highlighting by `yamlFlowString` (fix vim/vim#11517)
- Improve performance of `yamlFlowMappingKey` by allowing execution by the NFA engine (fix vim/vim#10730)
  - It was intentionally disabled before patterns were optimized by `s:SimplifyToAssumeAllPrintable`.
- Fix detection of flow style mapping indicators (fix vim/vim#8234).
- Enable highlighting of explicit mapping value indicators and node properties in flow style.
- Add syntax highlighting tests

closes: vim/vim#14354

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

Co-authored-by: itchyny <itchyny@cybozu.co.jp>
2024-04-01 15:52:26 +02:00
Christian ClasonandChristian Brabandt 9b9dab622a vim-patch:807fff135d52
runtime(pamconf): add support for Debian specific @includes

fixes: vim/vim#14335

https://github.com/vim/vim/commit/807fff135d52fe8e6e799b78b80cccb299d246a9

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-03-31 23:05:38 +02:00
Christian ClasonandEisuke Kawashima 20dd60f13c vim-patch:cbb92b5ceb6a
runtime(sshconfig,sshdconfig): update syntax (vim/vim#14351)

* fix case insensitivity of Host and Hostname keys
* improve regexps
* add keywords

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

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2024-03-31 23:05:20 +02:00
zeertzjqanddkearns c804d7968b vim-patch:982e191b38b4 (#28073)
runtime(vim): Update base-syntax, match empty blob and :abclear modifiers (vim/vim#14318)

- Match empty blob literals.
- Match modifier arguments to :abclear commands.

https://github.com/vim/vim/commit/982e191b38b493d148d73871a724381214e4c62f

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-03-28 18:08:05 +08:00
Christian ClasonandEnrico Maria De Angelis 2dea0ea820 vim-patch:b2e1fee72c45
runtime(haskell): allow TODO keywords in comments

closes: vim/vim#14319

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

Co-authored-by: Enrico Maria De Angelis <enricomaria.dean6elis@gmail.com>
2024-03-28 10:41:42 +01:00
Christian ClasonandGuilherme Puida 19b443251f vim-patch:677cd956810e
runtime(debcontrol): add Static-Built-Using field (vim/vim#14306)

https://github.com/vim/vim/commit/677cd956810e685e820a5ade5aa6c29be5044e9b

Co-authored-by: Guilherme Puida <guilherme@puida.xyz>
2024-03-28 10:15:47 +01:00
Christian ClasonandAliaksei Budavei 3587377cda vim-patch:63d68c2c218e
runtime(java): Update java[CR]_JavaLang type lists (vim/vim#14297)

- Add to the list of java.lang runtime exceptions two new
  types: MatchException (Pattern Matching for _switch_) and
  WrongThreadException (Virtual Threads).
- "Demote" Compiler (removed in JDK 21) from the list of
  java.lang class types to a new list javaLangDeprecated.

References:
https://bugs.openjdk.org/browse/JDK-8205129
https://bugs.openjdk.org/browse/JDK-8282274
https://bugs.openjdk.org/browse/JDK-8284161

https://github.com/vim/vim/commit/63d68c2c218eeb80c164e1c56c53f51a9e92a5eb

Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
2024-03-26 21:37:50 +01:00
Christian ClasonandAliaksei Budavei 31c4cb2347 vim-patch:8e59a7ba8877
runtime(java): Recognise the inline kind of the {@return} tag (vim/vim#14284)

Also:

- Refine comment matching (javaComment{Error\ and,Start}).
- Continue rewriting regexps (prefer atom grouping with
  non-capturing parens; factor out common prefixes in
  alternations).
- Allow for relative paths with the _file_ attribute of
  {@snippet}.
- Anticipate HTML in the @see tags.
- Match the nullary method parens in javaDocSeeTagParam.
- Improve the boundary patterns for summary sentences of
  documentation.

> This sentence ends at ... or at the first tag (as defined
> below).

There are Java documentation tags (@) and there are HTML
tags (<?>) (with Markdown looming large; see JEP 467).  With
block tags, e.g. @param, @return, @see, we begin another
documentation "sentence" whether or not the author has
terminated the summary sentence with a period; with
.<!-- -->, we may follow abbreviations, enumerations,
initials, (but instead consider @literal or &nbsp;) _within_
the summary sentence.  On the other hand, inline tags, e.g.
@code, @link, @literal, should not terminate the summary
sentence.

References:
https://bugs.openjdk.org/browse/JDK-8075778
https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html#firstsentence
https://docs.oracle.com/en/java/javase/21/docs/specs/javadoc/doc-comment-spec.html

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

Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
2024-03-25 21:39:46 +01:00
Christian ClasonandAliaksei Budavei 31a15fb2a1 vim-patch:3e72bf10a0a2
runtime(java): Recognise the {@snippet} documentation tag (vim/vim#14271)

Remember that ‘code fragments are typically Java source
code, but they may also be fragments of properties files,
source code in other languages, or plain text.’  Therefore,
with these changes, markup tags are highlighted in the Java
source files (as external snippets) and in the {@snippet}
tags.

Also:

- Improve matching of the multi-line {@code} documentation
  tag with any contained balanced braces.
- Recognise the {@literal} documentation tag.
- Highlight stray blanks in comments.

Related to an enhancement proposal for PCRE-like callouts
discussed at https://github.com/vim/vim/issues/11217.

References:
https://openjdk.org/jeps/413
https://docs.oracle.com/en/java/javase/21/docs/specs/javadoc/doc-comment-spec.html

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

Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
2024-03-25 14:18:52 +01:00
zeertzjqanddkearns a44ac26c75 vim-patch:76d62985c1ff (#27985)
runtime(vim): Update base-syntax, remove old unused syntax groups. (vim/vim#14146)

Remove old unused syntax groups.

- vimRegion, vimPattern and vimKeyword removed in Vim 5.3.
- vimAuSyntax, vimAutoCmdOpt, vimAutoSet and vimStatement removed in 5.6.

The following were linked in :hi commands but never defined with :syn
and, most likely, never used:
 - vimHLMod introduced in 5.0.
 - vimKeycode and vimKeycodeError introduced in 5.4.
 - vimElseif introduced in 5.6.
 - vimFold introduced in 6.4.
 - vimOperStar (and vimoperStar) introduced in 9.0.

https://github.com/vim/vim/commit/76d62985c1ffbd7669ccc628ca43445d14c5aba6

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-03-23 06:43:25 +08:00
zeertzjqanddkearns 15c6909bb1 vim-patch:35e6f4ca27c8 (#27973)
runtime(vim): Update base-syntax, improve function definition highlighting (vim/vim#14203)

Improve function definition highlighting.

- Match bang and function modifiers - abort etc.
- Only match valid scope modifiers.
- Match listing commands.
- Don't match ex commands in function names.
- Split function syntax groups into :func and :def subgroups.
- Match Vim9-script parameter and return types.
- Limit legacy-script and Vim9-script comments to :func and :def
  definitions, respectively.

https://github.com/vim/vim/commit/35e6f4ca27c8115c606f265e4b09e11db01c970d

Omit the vimFunctionError change as it's a whitespace-only change and
will likely be superseded by later patches.

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-03-22 07:31:43 +08:00
zeertzjqanddkearns 37db3d97ea vim-patch:ec21bafc135a (#27939)
runtime(vim): Update base-syntax, disallow '.' at start of menu item names (vim/vim#14232)

Disallow '.' at the start of a menu item name.

This is the menu path separator character and should be escaped with a
'\' in this case.

Partially fixes vim/vim#14230.  "popup" is still incorrectly matched as the Ex
command.

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

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-03-20 07:04:31 +08:00
zeertzjqanddkearns b5e3df37a4 vim-patch:9530fe4f3a69 (#27919)
runtime(vim): Update base-syntax, improve :highlight command (vim/vim#14228)

Improve :highlight command highlighting

- Use the same highlight groups for "default link" with and without
  bang.
- Match some common line-continuation use.
- Match :hi clear variants.
- Highlight color-name values.

Resync vim.vim and generator/vim.vim.base.

https://github.com/vim/vim/commit/9530fe4f3a69c6bd11fc745d3b2d1667cdd0cf6d

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-03-19 06:38:30 +08:00
En-EnandSean Dewar e34c23b701 fix(tutor): set a value for ":syntax iskeyword" (#27833)
Problem: "NOTE"s, inline Vim script code, and links ending in digits may not be
highlighted correctly within the :Tutor.

Solution: set an explicit value for ":syntax iskeyword" that includes digits. Do
it after ":syntax include"s, so the included syntax/sh.vim doesn't mess with the
value.

Increase screen test width so all text within the conclusion section is visible.

Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
2024-03-18 11:19:20 +00:00
Christian ClasonandMatthew Hughes f0bd895995 vim-patch:3d46de703cf6
runtime(go): `goPackageComment` highlighting too broad

Previously this would highlight any comment before a line starting
`package`, for example

    var (
      // This comment would be highlighted as a goPackageComment
      packages []string
    )

The package clause is only valid when followed by a space[1], so include
this restriction

This is upstreaming a change from `go-vim`[2]

[1] https://go.dev/ref/spec#Package_clause
[2] https://github.com/fatih/vim-go/commit/d1c36cc4173093d0be78fd826978a024febe6233

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

Co-authored-by: Matthew Hughes <matthewhughes934@gmail.com>
2024-03-18 15:49:08 +08:00
zeertzjqanddkearns b82d755109 vim-patch:b4b3d7de2413
runtime(vim): Update base-syntax, revert last change to vimUserFunc (vim/vim#14202)

Fix highlighting of ":echo (expr)" (broken in commit 61887b3) by
re-enabling the original fix for vim/vim#9987.

Addresses https://github.com/vim/vim/pull/14199#issuecomment-1999732062.

This will be fixed more generally when there is context-sensitive
matching for commands and functions.

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

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-03-16 04:09:35 +08:00
zeertzjqanddkearns b958b5ee4f vim-patch:61887b3d6fd8
runtime(vim): Update base-syntax, improve :echo and :execute highlighting (vim/vim#14199)

Improve :echo and :execute highlighting.

- Add better line-continuation support for both commands.
- Improve the :execute command's expression argument matching.
- Remove the fix for issue vim/vim#9987 as this is now handled by correctly
  matching the parens in :echo (...) as operator parens.

https://github.com/vim/vim/commit/61887b3d6fd8b441c90416ea7855e1fe5a9ae32c

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-03-15 21:49:17 +08:00
zeertzjqanddkearns 59e3bcfb00 vim-patch:5cd86c6cff94 (#27822)
runtime(vim): Update base-syntax, improve number matching (vim/vim#14175)

- Limit blob literals to an even number of hexadecimal digits and
  correctly located dots.
- Match octal numbers.

The current version unsuccessfully attempts to match a leading '-' as
part of the float literal.  It's actually parsed as part of the literal
for all numbers but the syntax file hasn't matched it like that for a
long time and highlights negative numbers as UNARY-MINUS NUMBER.  This
will be fixed when better expression matching is implemented.

https://github.com/vim/vim/commit/5cd86c6cff94256ed2db872c46b57da259a648ac

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-03-12 07:20:04 +08:00
zeertzjqanddkearns b5f870cf12 vim-patch:5d67aef3060d
runtime(vim): Update base-syntax, improve :map highlighting (vim/vim#14141)

Improve :map command highlighting.

- Fix multiline RHS matching, allow continued lines and comments.
- Allow ^V-escaped whitespace in LHS.
- Handle map-bar properly and allow trailing commands.

Fixes issue vim/vim#12672.

https://github.com/vim/vim/commit/5d67aef3060d6d3aa14d273c39f23d8a90c4cef1

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-03-10 10:39:43 +08:00
zeertzjqanddkearns 84b6ae82c7 vim-patch:62b26040eb4b
runtime(vim): Update base-syntax, improve :menu{,translate} highlighting (vim/vim#14162)

Improve :menu and :menutranslate highlighting.

- Match args to :menutranslation and :popup.
- Only highlight special notation in {rhs} of :menu, like :map.
- Allow line continuations in {rhs} of :menu and between {english} and
  {mylang} of :menutranslation, matching common usage.
- Bug fixes.

https://github.com/vim/vim/commit/62b26040eb4b6752be2c46852e8986083737a1bb

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-03-10 10:39:43 +08:00
Christian ClasonandAliaksei Budavei 3c66e285cc vim-patch:a2c65809dafe
runtime(java): Recognise string templates (vim/vim#14150)

As this is encouraged in the referenced JEPs, "to visually
distinguish a string template from a string literal, and
a text block template from a text block", the default
colours for java\%[Debug]StrTempl are made distinct from
java\%[Debug]String.

According to §3.2 Lexical Translations (JLS, c. 1996 or any
more recent version), line terminators, white space, and
comments are discarded before tokens are accepted. Since
a template expression comprises a template processor, a dot,
and a template, it may be visually appealing to break up
its head across a few lines whenever its tail already spans
multiple lines.  Curiously, no allowance for it is made in
the distributed tests for OpenJDK 21; the proposed regexp
patterns take in consideration a line terminator and white
space after a dot.

References:
https://openjdk.org/jeps/430 (Preview)
https://openjdk.org/jeps/459 (Second Preview)
https://openjdk.org/jeps/465

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

Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
2024-03-10 10:36:26 +08:00
Christian ClasonandWu Yongwei d72c9d1d19 vim-patch:63c39e4ef749
runtime(c): Recognize "__inline" (vim/vim#14145)

`__inline` is recognized by GCC, and may even be preferred, as MSVC does
not recognize `__inline__`.

https://github.com/vim/vim/commit/63c39e4ef749883e96a83b9f647ac91516c0d1be

Co-authored-by: Wu Yongwei <wuyongwei@gmail.com>
2024-03-06 10:05:12 +01:00
zeertzjqanddkearns 0ffc926499 vim-patch:e5c9ba601573 (#27737)
runtime(vim): Update base-syntax, fix escaping :syn and :hi sub-groups (vim/vim#14137)

* runtime(vim): Update base-syntax, fix escaping :syn and :hi sub-groups

- Remove contained :syntax and :highlight sub-groups from the function
  body cluster.  These should only match in the respective commands.
- Remove vimSynLine syntax group from several clusters.  The definition
  of vimSynLine was removed in Vim 5.3.

* runtime(vim): Update syntax generator, use standard Last Change date format

The de facto standard date format is YYYY MMM DD.

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

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-03-05 11:28:34 +08:00
Christian Clasonanddkearns 66c9f987e7 vim-patch:1bdc9435c1a1
runtime(sh): Update syntax file, fix issue vim/vim#962 (vim/vim#14138)

Allow the opening parenthesis of a multiline array assignment, within an
if statement, to appear at EOL.

Fixes issue vim/vim#962.

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

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-03-04 23:03:09 +01:00
Christian ClasonandJay Sitter 56734226af vim-patch:e84490311ba3
runtime(css): update syntax script

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

Co-authored-by: Jay Sitter <jay@jaysitter.com>
2024-03-04 23:03:09 +01:00
zeertzjqanddkearns fc2be84e44 vim-patch:691aee8b0705
runtime(vim): Update base-syntax, fix issue vim/vim#14135 (vim/vim#14136)

Fix incorrect error highlighting for function calls in :command
definitions.  vimFunctionError should be restricted to :function header
lines.

fixes: vim/vim#14135

https://github.com/vim/vim/commit/691aee8b070506e6eea8ec166bf69d9a03002790

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-03-04 06:44:54 +08:00
zeertzjqanddkearns b86799a076 vim-patch:c4aef9a97b36
runtime(vim): Update base-syntax, improve :augroup highlighting (vim/vim#14125)

- Explicitly match the bang and group name in :aug! {name}.
- Allow any characters in a group name.
- Match default group switch marker, END.
- Match :aug without arguments (list command).

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

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-03-04 06:40:31 +08:00
Christian ClasonandAliaksei Budavei 3971797be1 vim-patch:b3030b653bbd
runtime(java): Recognise text blocks (vim/vim#14128)

Also, accept as valid the space escape sequence `\s`.

Also, consistently use the claimed `javaDebug` prefix for
syntax group definitions kept under `g:java_highlight_debug`.

Since `javaStringError` is commented out for its generality,
let's comment out `javaDebugStringError`, its copy, as well.

References:
https://openjdk.org/jeps/378
https://docs.oracle.com/javase/specs/jls/se17/html/jls-3.html#jls-3.10.7

Closes vim/vim#10910.

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

Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
2024-03-03 17:41:04 +01:00
Christian ClasonandAliaksei Budavei 72e0ef2f46 vim-patch:100a665634a0
runtime(java): Improve the recognition of literals (vim/vim#14120)

* Emend the Unicode and octal escape sequence patterns;
* Accept the (repeated) underscore separators in all
  numerical literals;
* Recognise hexadecimal floating-point literals.

(The space escape sequence '\s' will be introduced along
with text blocks in another PR.)

References:
https://docs.oracle.com/javase/specs/jls/se17/html/jls-3.html#jls-3.3
https://docs.oracle.com/javase/specs/jls/se17/html/jls-3.html#jls-3.10.1
https://docs.oracle.com/javase/specs/jls/se17/html/jls-3.html#jls-3.10.2
https://docs.oracle.com/javase/specs/jls/se17/html/jls-3.html#jls-3.10.7

https://github.com/vim/vim/commit/100a665634a0a2edbc755daf453c4915800684dd

Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
2024-03-02 10:06:26 +01:00
Christian ClasonandAliaksei Budavei 86c3f284fc vim-patch:9ecf02cd5f5f
runtime(java): Recognise _when_ clauses in _switch_ blocks

Also:

- distinguish _yield_ when used as a contextual keyword from
  when used qualified as a method or a method reference (as
  can be seen in testdir/input/java_switch.java, variables
  and method declarations named _yield_ will be recognised
  as the namesake keyword--consider picking other names for
  variables, and defining g:java_highlight_functions to have
  method names painted; since _yield_ statements can have
  trailing parens, they must be recognised as statements,
  for only qualified _yield_ method calls are supported);

- recognise grouped _default_ _case_ labels;

- describe primitive types for _case_ labels (JLS, §14.11,
  §3.10.1);

- recognise some non-ASCII identifiers (see javaLambdaDef,
  javaUserLabel) (further improvement for better recognition
  of identifiers will be arranged in a separate PR).

Because the arrow '->' is used in two kinds of expressions,
lambda (abstractions) and _switch_, necessary changes were
made for the recognition of either (and further improvement
touching lambda expressions will be separately arranged).

Because 'default' is used for instance method declarations
in interfaces and in _switch_ labels, necessary changes were
made for the recognition of either (and further improvement
touching method declarations will be separately arranged).

Finally, it deemed appropriate to put 'yield' in the syntax
group of javaOperator rather than javaStatement, for its
member 'var' is also another contextual keyword (e.g., this
is valid syntax: "var var = var(test.var);").

References:
https://openjdk.org/jeps/361 (Switch Expressions)
https://openjdk.org/jeps/440 (Record Patterns)
https://openjdk.org/jeps/441 (Pattern Matching for switch)

Also, add a Java specific filetype plugin for the syntax
test, so that no soft-wrapping of long indented lines occur.

Otherwise the syntax scripts would miss a few lines during
scrolling and verification of the screen dumps.

closes: vim/vim#14105

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

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2024-02-29 09:53:09 +01:00
2f85bbe615 feat!: rewrite TOhtml in lua
Co-authored-by: wookayin <wookayin@gmail.com>
Co-authored-by: clason <c.clason@uni-graz.at>
Co-authored-by: Lewis Russell <me@lewisr.dev>
2024-02-28 16:26:00 +00:00
zeertzjqanddkearns a7788c2e25 vim-patch:b1427b46f5fe (#27652)
runtime(vim): Update base-syntax, improve :echo highlighting (vim/vim#14103)

- Normalise behaviour of :echo commands and improve expression matching.
- Allow continued argument lines.
- Refine string interpolation groups.
- Remove duplicated :menu and :map generated commands that are handled
  specially later in the file.

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

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-02-28 07:57:18 +08:00
1a7c38caec vim-patch:c7ddc9b73543
runtime(debian): update Debian syntax files (#14098)

* debversions.vim: Move lunar to unsupported release
* debsources: Add word boundaries around keyword match patterns

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

Co-authored-by: James McCoy <jamessan@jamessan.com>
Co-authored-by: James Addison <jay@jp-hosting.net>
2024-02-27 10:31:11 +01:00
zeertzjqanddkearns a4b4442524 vim-patch:2c51e15b66a4 (#27637)
runtime(vim): Update syntax file, improve :substitute matching (vim/vim#14093)

- Differentiate between :substitute and substitute(), fixes vim/vim#13883.
- Match all allowed :substitute delimiters.
- Remove leading context from :substitute matches.

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

Co-authored-by: dkearns <dougkearns@gmail.com>
2024-02-27 06:22:57 +08:00
Christian ClasonandPetr Pisar 7e008799a8 vim-patch:315cd1fbcbba
runtime(spec): Recognize SourceLicense tag name in RPM spec syntax (#14046)

rpm-4.19.0 added a new SourceLicense tag. It is used at the same place
as License tag.

This patch adds the new tag name into a Vim syntax file to be
highligted the same way as the License tag. Note that it has to be
defined in the syntax file before Source\d* regexp. Otherwise it's not
recognized by Vim.

https://github.com/vim/vim/commit/315cd1fbcbba7c44ec8743f03645bfcaef58bd55

Co-authored-by: Petr Pisar <ppisar@redhat.com>
2024-02-23 09:31:30 +01:00