Commit Graph
899 Commits
Author SHA1 Message Date
Christian ClasonandJohnothan King 172a90c245 vim-patch:b0691b4: runtime(sh): Fix various syntax highlighting problems in ksh93 scripts
- Fixed syntax highlighting for ksh93 namespace variables starting
  with '${.'
- Added support for the alarm, eloop, fds, mkservice, pids, poll and
  sha2sum builtins (which are indeed ksh93 builtins, albeit whether or
  not they are available depends on the ksh release and the compiled
  SHOPT options).
- Added support for the many Unix commands provided by ksh93's libcmd
  as builtin commands (since these are general commands, scripts for
  other shells like bash will also highlight these).
  - The dumps for the sh_0{2,5,6,8,9}.sh were recreated due to this
    change affecting commands those scripts call (e.g. 'wc').
- Enabled ${parameter/pattern/string} and friends for ksh syntax.
- Enabled case modification for ksh. See also:
  https://github.com/ksh93/ksh/commit/c1762e03
- Enabled ;;& support for ksh. See also:
  https://github.com/ksh93/ksh/commit/fc89d20a
- Added many special ksh variables using 93u+m's data/variables.c
  as a reference.

If vim can't figure out which ksh release is in play using e.g.
the hashbang path, in such a case a generic default that enables
everything and the kitchen sink will be used. Otherwise, features will
be disabled if it's absolutely known a certain feature will not be
present. Examples:
   - ERRNO is ksh88 specific, so that is locked to ksh88.
   - Only 93u+m (assumed for generic) has SRANDOM, and only 93u+m
     and 93v- have case modification support.
   - 93u+ and 93v- have VPATH and CSWIDTH variables (the latter
     is vestigal, but still present in the hardcoded variable table).
   - 93v- and ksh2020 have (buggy and near unusable) implementations
     of compgen and complete.
   - Only mksh provides function substitutions, i.e. ${|command;}.

This took the better part of my day to implement. It seems to work well
enough though. (Also had to regenerate the dumps again while testing
it, as now there are dup scripts with mere hashbang differences, used
solely for testing syntax highlighting differences.)

closes: vim/vim#17348

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

Co-authored-by: Johnothan King <johnothanking@protonmail.com>
2025-05-22 08:56:01 +02:00
Christian ClasonandMarkus Heidelberg 14631e2264 vim-patch:5ad53ca: runtime(muttrc): fix mangled keywords in syntax script
Regression introduced in commit 10f23e10a9 ("Update syntax/muttrc.vim to
latest mutt (vim/vim#12797)", 2023-08-15)

Affected keywords:
  invresume_draft_files
  invresume_edited_draft_files
  mailcap_path
  mark_macro_prefix

closes: vim/vim#17344

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

Co-authored-by: Markus Heidelberg <markus.heidelberg@web.de>
2025-05-20 08:15:27 +02:00
zeertzjqandDoug Kearns ba237ce96c vim-patch:a577e42: runtime(vim): Update base-syntax, improve script-interface command highlighting
- Normalise interface heredoc highlighting with that used for
  :let-heredocs.
- Remove interface feature testing.  The Lua and Python interface
  command scripts are now highlighted by default.  Loading all syntax
  files incurs an undesirable load-time burden so highlighting of the
  less popular MzScheme, Perl, Ruby and Tcl interfaces is disabled by
  default.  g:vimsyn_embed can still be used to customise the supported
  interfaces.
- Always highlight interface ex-commands as valid commands, even when
  the corresponding command-script highlighting is disabled.
- Highlight simple command-script statements as well as heredocs.
- Remove error highlighting of heredoc and statement command-script
  regions when an interface is disabled.  These are now highlighted as
  plain text.
- Allow indented heredoc end tokens when "trim" is specified.
- Match interface heredocs in :def functions.
- Fix runaway vimEmbedError regions.  These regions have been removed.
- Use python2 syntax for :python, and :pythonx when 'pyxversion' is
  appropriately set.

closes: vim/vim#15522

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-05-18 06:44:49 +08:00
zeertzjqandDoug Kearns 913e4c6010 vim-patch:e957cba: runtime(vim): Update base-syntax, match quote separated numbers
closes: vim/vim#17250

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-05-18 06:14:16 +08:00
Christian ClasonandKat 1be2fdb910 vim-patch:6451e5f: runtime(gleam): add @Spell clusters to syntax script
closes: vim/vim#17324

https://github.com/vim/vim/commit/6451e5f51763db085a784925a4a4f7b92e70b7cf

Co-authored-by: Kat <65649991+00-kat@users.noreply.github.com>
2025-05-16 10:49:40 +02:00
Christian Clason 59c45b22d9 fix(runtime): remove erroneously added syntax tests
fixup for a2c3591720
2025-05-11 11:54:58 +02:00
Christian ClasonandAliaksei Budavei a2c3591720 vim-patch:dc7ed8f: runtime(html): Optionally fold tags with the "expr" method
Tag folding poses a few difficulties.  Many elements, e.g.
"blockquote", are always delimited by start and end tags;
end tags for some elements, e.g. "p", can be omitted in
certain contexts; void elements, e.g. "hr", have no end tag.
Although the rules for supporting omissible end tags are
ad-hoc and involved, they apply to elements in scope.
Assuming syntactical wellformedness, an end tag can be
associated with its nearest matching start tag discoverable
in scope and towards the beginning of a file, whereas all
unbalanced tags and inlined tags can be disregarded.

For example:
------------------------------------------------------------
<!DOCTYPE html>
<html lang="en">		<!-- >1 : 1 -->
  <body>			<!-- >2 : 2 -->
    <p>Paragraph vim/vim#1.		<!--  = : 2 -->
    <p>				<!-- >3 : 3 -->
      Paragraph vim/vim#2.		<!--  = : 3 -->
    </p>			<!-- <3 : 3 -->
    <p>Paragraph vim/vim#3.</p>	<!--  = : 2 -->
  </body>			<!-- <2 : 2 -->
</html>				<!-- <1 : 1 -->
------------------------------------------------------------

(HTML comments here, "<!-- ... -->", record two values for
each folded line that are separated by ":", a value obtained
from "&foldexpr" and a value obtained from "foldlevel()".)

Innermost foldedable tags will be flattened.  For example:
------------------------------------------------------------
<!DOCTYPE html>
<html lang="en">		<!-- >1 : 1 -->
  <body>			<!-- >2 : 2 -->
    <div class="block">		<!-- >3 : 3 -->
      <pre><code>		<!-- >4 : 4 -->
[CODE SNIPPET]			<!--  = : 4 -->
      </code></pre>		<!-- <4 : 4 -->
    </div>			<!-- <3 : 3 -->
  </body>			<!-- <2 : 2 -->
</html>				<!-- <1 : 1 -->
------------------------------------------------------------

No folding will be requested for the "<code>"-"</code>" tag
pair and reflected by "&foldexpr" because such a fold would
have claimed the same lines that the immediate fold of the
"<pre>"-"</pre>" tag already claims.

Run-on folded tags may confuse Vim.  When a file such as:
------------------------------------------------------------
<!DOCTYPE html>
<html lang="en">		<!-- >1 : 1 -->
  <body>			<!-- >2 : 2 -->
    <div class="block">		<!-- >3 : 3 -->
      <pre>			<!-- >4 : 4 -->
	<code>			<!-- >5 : 5 -->
[CODE SNIPPET vim/vim#1]		<!--  = : 5 -->
	</code>			<!-- <5 : 5 -->
      </pre>			<!-- <4 : 4 -->
    </div>			<!-- <3 : 3 -->
				<!--  = : 3 -->
    <div class="block">		<!-- >3 : 3 -->
      <pre>			<!-- >4 : 4 -->
	<code>			<!-- >5 : 5 -->
[CODE SNIPPET vim/vim#2]		<!--  = : 5 -->
	</code>			<!-- <5 : 5 -->
      </pre>			<!-- <4 : 4 -->
    </div>			<!-- <3 : 3 -->
  </body>			<!-- <2 : 2 -->
</html>				<!-- <1 : 1 -->
------------------------------------------------------------

is reformatted as follows:
------------------------------------------------------------
<!DOCTYPE html>
<html lang="en">		<!-- >1 : 1 -->
  <body>			<!-- >2 : 2 -->
    <div class="block">		<!-- >3 : 3 -->
      <pre>			<!-- >4 : 4 -->
	<code>			<!-- >5 : 5 -->
[CODE SNIPPET vim/vim#1]		<!--  = : 5 -->
	</code>			<!-- <5 : 5 -->
      </pre>			<!-- <4 : 4 -->
    </div><div class="block"><pre><code> <!-- <3 : 3 -->
[CODE SNIPPET vim/vim#2]		<!--  = : 2 ? -->
	</code>			<!-- <5 : 2 ? -->
      </pre>			<!-- <4 : 2 ? -->
    </div>			<!-- <3 : 2 ? -->
  </body>			<!-- <2 : 2 -->
</html>				<!-- <1 : 1 -->
------------------------------------------------------------

"&foldexpr" values will not be used as is for the lines
between (and including) "[CODE SNIPPET vim/vim#2]" and "</div>".
(Cf. v9.1.0002.)

Having syntax highlighting in effect, tag folding using the
"fold-expr" method can be enabled with:
------------------------------------------------------------
	let g:html_expr_folding = 1
------------------------------------------------------------

By default, tag folding will be redone from scratch after
each occurrence of a TextChanged or an InsertLeave event.
Such frequency may not be desired, especially for large
files, and this recomputation can be disabled with:
------------------------------------------------------------
	let g:html_expr_folding_without_recomputation = 1
        doautocmd FileType
------------------------------------------------------------

To force another recomputation, do:
------------------------------------------------------------
	unlet! b:foldsmap
	normal zx
------------------------------------------------------------

References:
https://web.archive.org/web/20250328105626/https://html.spec.whatwg.org/multipage/syntax.html#optional-tags
https://en.wikipedia.org/wiki/Dangling_else

closes: vim/vim#17141

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

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2025-05-11 10:47:39 +02:00
Christian ClasonandDoug Kearns 1826ad16af vim-patch:839b79e: runtime(sh): Update syntax, improve wildcard character class matching
- Default to POSIX supported classes.
- Add a KornShell specific class list.
- Remove "or" from the Bash class list, presumably a typo.

closes: vim/vim#17293

https://github.com/vim/vim/commit/839b79eeb33a41a5b368ad56aeaaa94f5fbace92

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-05-11 10:47:39 +02:00
44a6e5ea99 vim-patch:6b7637e: runtime(lf): use syn iskeyword in syntax script
Sets 'syn iskeyword' in syntax/lf.vim to fix the missing lf keyword
highlighting in lines like 'map e :open; open' (first 'open' not
highlighted).

applies PR andis-sprinkis/lf-vim#21 by @joelim-work
closes: andis-sprinkis/lf-vim#14

https://github.com/vim/vim/commit/6b7637e6bb3c231b8198e3eb9a3f7f558eb67188

Co-authored-by: Andis Spriņķis <andis@sprinkis.com>
Co-authored-by: Joe Lim <50560759+joelim-work@users.noreply.github.com>
2025-05-10 15:16:19 +02:00
zeertzjqandDoug Kearns 186851b1bd vim-patch:87947a9: runtime(sh): Update syntax, match KornShell compound arrays
closes: vim/vim#17268

https://github.com/vim/vim/commit/87947a9a769ad43216beae7946c8b0bda9f8024a

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-05-07 09:46:01 +08:00
zeertzjqandfundawang d8621a53ac vim-patch:adfeb4a: runtime(spec): add more local macro names according to rpm 4.20
closes: vim/vim#17258

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

Co-authored-by: fundawang <fundawang@yeah.net>
2025-05-07 09:45:43 +08:00
zeertzjqandDoug Kearns 45e9054813 vim-patch:fe22867: runtime(sh): Update syntax, fix single-quoted strings in parameter expansions
Ignore single-quoted backslash escape sequences in parameter expansions.

\' is not an escaped single quote in ${foo:-'word\'}.

closes: vim/vim#17261

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-05-07 09:45:34 +08:00
zeertzjq 074a6abd55 vim-patch:9.1.1359: filetype: GNU Radio config files are not recognized
Problem:  filetype: GNU Radio config files are not recognized.
Solution: detect GNU Radio config files as confini filetype.  Only
          allow '#' as start of comment in confini syntax (zeertzjq).

Ref:
- https://wiki.gnuradio.org/index.php/Configuration_Files

closes: vim/vim#17242

https://github.com/vim/vim/commit/9c9200d1eafe50077222a38bfad6cba7156a6487
2025-05-02 21:53:15 +08:00
zeertzjqandDoug Kearns ce8b755a86 vim-patch:1c58019: runtime(vim): Update base-syntax, improve enum highlighting (#33758)
Match enum values and missing class keywords.

fixes: vim/vim#15970

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-05-02 07:26:38 +08:00
zeertzjqandDoug Kearns dd71a21463 vim-patch:f57c065: runtime(sh): Update syntax, highlight escaped chars in test expressions (#33757)
Highlight escape characters in unquoted test expression operands.

E.g., [[ foo == \[bar\] ]]

fixes vim/vim#17221

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-05-02 07:25:58 +08:00
zeertzjqandAliaksei Budavei 0ab0cdb2da vim-patch:910bfd5: runtime(java): Consent to HTML tags folding in Javadoc comments (#33718)
HTML tags in Javadoc comments can additionally be folded
after applying
------------------------------------------------------------
	let g:html_syntax_folding = 1
	set foldmethod=syntax
------------------------------------------------------------

and giving explicit consent with
------------------------------------------------------------
	let g:java_consent_to_html_syntax_folding = 1
------------------------------------------------------------

Do not default to this kind of folding unless ALL start tags
and optional end tags are balanced in Javadoc comments;
otherwise, put up with creating runaway folds that break
syntax highlighting.

resolves: zzzyxwvut/java-vim#8.
closes: vim/vim#17216

https://github.com/vim/vim/commit/910bfd5d38812079bf31cc91eb6978415f29b725

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2025-04-30 06:29:10 +08:00
zeertzjqandDoug Kearns 317a897c46 vim-patch:b9ffbf5: runtime(vim): Update base-syntax, fix inline Vim9 dict comments at SOL (#33686)
Match Vim9 comments at start-of-line (no leading whitespace) in
dictionaries, lists and parenthesised expressions and argument lists.

Addresses https://github.com/vim/vim/pull/14975#issuecomment-2832643115

Report and fix by Aliaksei Budavei.

closes: vim/vim#17211

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-28 08:14:42 +08:00
zeertzjqandHirohito Higashi a167800f1c vim-patch:partial:fbe4a8f: runtime(doc): Fix notation of "Vim script" and "Vim9 script" (#33673)
closes: vim/vim#17213

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

Cherry-pick Test_source_ignore_shebang() change from patch 9.0.0363.

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
2025-04-27 22:06:16 +08:00
zeertzjqandDoug Kearns c1d21492a6 vim-patch:c29b533: runtime(vim): Update base-syntax, match continued strings and tail comments (#33659)
Continued strings are currently only matched after operators, in
parenthesised expressions and in function call argument lists.

closes: vim/vim#14975

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-27 01:17:39 +00:00
Christian ClasonandJames McCoy e324ab2b6b vim-patch:35cfc3d: runtime(debversions): Add questing (25.10) as Ubuntu release name
closes: vim/vim#17201

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

Co-authored-by: James McCoy <jamessan@jamessan.com>
2025-04-26 10:43:12 +02:00
Christian ClasonandEisuke Kawashima 1fed4412e4 vim-patch:e36a931: runtime(groff,nroff): improve ftplugin
- set options in ftplugin but not in syntax
- implement ftplugin/groff.vim (wrapper of ftplugin/nroff.vim)

closes: vim/vim#17174

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

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2025-04-25 10:58:49 +02:00
Christian ClasonandKirill Morozov 9e450000d3 vim-patch:32f4973: runtime(gleam): update filetype plugin, include new compiler and syntax script
closes: vim/vim#17172

https://github.com/vim/vim/commit/32f49738d1807b1553d1fbd2f5d1b0b4849dbcb5

Co-authored-by: Kirill Morozov <mail2kirill@gmail.com>
2025-04-25 10:58:49 +02:00
zeertzjqandDoug Kearns 803649da11 vim-patch:fa3b104: runtime(vim): Update base-syntax, improve :autocmd highlighting (#33586)
- Match full :autocmd, :doautocmd and :doautoall commands.
- Add filename pattern (wildcard) highlighting.

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-23 01:31:08 +00:00
Christian ClasonandEisuke Kawashima 1437144740 vim-patch:e125ee4: runtime(pov): deprecate #render and #statistics in syntax script
- 3.1g: active
  https://www.povray.org/ftp/pub/povray/Old-Versions/Official-3.1g/Docs/povuser.pdf#page=172
- 3.5 or later: deprecated
  https://www.povray.org/ftp/pub/povray/Old-Versions/Official-3.5/Linux/povlinux.tgz
  ─ povray-3.50c/html/povdoc_172.html
  - https://www.povray.org/documentation/3.7.0/r3_3.html#r3_3_2_7_1

closes: vim/vim#17177

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

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2025-04-21 12:38:27 +02:00
zeertzjqandDoug Kearns 9045656014 vim-patch:9b171bd: runtime(vim): Update-base-syntax, match full :*grep, :make, :sort and :filter commands
closes: vim/vim#17082

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-18 14:59:20 +08:00
zeertzjqandDoug Kearns 67d6f2baa4 vim-patch:520a2c7: runtime(vim): Update base-syntax, improve :command highlighting
- Match multiline :command definitions.
- Match custom completion funcref var names.

fixes: vim/vim#17001
closes: vim/vim#17067

https://github.com/vim/vim/commit/520a2c7852e1f8798fa1cfbe7a7579982145daa1

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-18 14:57:09 +08:00
zeertzjqandDoug Kearns 5662bdafc2 vim-patch:2f5a8c0: runtime(vim): Update base-syntax, match full :redir command
closes: vim/vim#17057

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-18 14:55:45 +08:00
zeertzjqandDoug Kearns 3ee144aa95 vim-patch:2a6be83: runtime(vim): Update base-syntax, improve :set backslash handling
Improve backslash handling in :set option values. There is no special
handling for options supporting Windows path separators yet.

See :help option-backslash.

Remove the vimSetString syntax group. Option string values cannot be
specified with a quoted string, this is a command terminating tail
comment.

fixes: vim/vim#16913
closes: vim/vim#17034

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-18 14:52:50 +08:00
zeertzjqandDoug Kearns 234be4aebc vim-patch:722fbd1: runtime(vim): Update base-syntax, match tuples
Tuples were introduced in commit 9cb865e.  See PR vim/vim#16776.

fixes: vim/vim#16965
closes: vim/vim#16935

https://github.com/vim/vim/commit/722fbd15549f07fc67b057995e77e2271d639fea

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-18 14:50:05 +08:00
zeertzjqandDoug Kearns 1e2f86394a vim-patch:adb703e: runtime(vim): Update base-syntax, match protected constructors
Support for protected constructors was added in commit 7e89800.

closes: 16618

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-18 14:46:06 +08:00
zeertzjqandDoug Kearns 700840f4b7 vim-patch:dd3f1c0: runtime(vim): Update base-syntax, match multiline return types
fixes vim/vim#14442.
closes: vim/vim#16914

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-18 14:45:36 +08:00
zeertzjqandDoug Kearns e2fa151f9c vim-patch:0fab891: runtime(vim): Update base-syntax, improve :syntax highlighting
- Highlight missing :syntax subcommands.
- Don't highlight user specified syntax group names.

closes: vim/vim#16847

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-18 14:41:39 +08:00
zeertzjqandDoug Kearns 8e5ef60540 vim-patch:3dca512: runtime(vim): Update base-syntax and generator, only match valid predefined variables
- Only match valid predefined and option variables.
- Match scope dictionaries.
- Highlight scope prefixed variables as a scope dictionary accessor. The
  vimVarScope syntax group can be linked to vimVar to disable this.
- Include support for Neovim-only predefined and option variables.

Temporary collateral damage - scope dictionaries match instead of keys
in dictionary literals.

closes: vim/vim#16727

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

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-18 14:31:34 +08:00
ash 118759aa6b vim-patch:8f09684: runtime(jjdescription): Don't require a space to start comments (#33523)
Since jj v0.24.0 (December 2024), `JJ:` comments are recognised even
when not followed by a space.

closes: vim/vim#17130

https://github.com/vim/vim/commit/8f096845693fc7a170283ca5dcf8e13aea3ec273
2025-04-18 01:05:10 +00:00
Christian ClasonandEisuke Kawashima 34b4df774d vim-patch:fbbaa6e: runtime: set 'cpoptions' for line-continuation in various runtime files
closes: vim/vim#17121

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

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2025-04-17 09:25:41 +02:00
e3e8dfe99c vim-patch:9.1.1307: make syntax does not reliably detect different flavors (#33498)
Problem:  GNU extensions, such as `ifeq` and `wildcard` function, are
          highlighted in BSDmakefile
Solution: detect BSD, GNU, or Microsoft implementation according to
	  filename, user-defined global variables, or file contents

closes: vim/vim#17089

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

Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Co-authored-by: Roland Hieber <rohieb@users.noreply.github.com>
2025-04-17 07:13:05 +08:00
Christian ClasonandPierrick Guillaume 287955cfb4 vim-patch:9.1.1299: filetype: mbsyncrc files are not recognized
Problem:  filetype: mbsyncrc files are not recognized
Solution: detect isyncrc and "*.mbsyncrc" files as mbsync filetype,
          include filetype and syntax plugin (Pierrick Guillaume)

mbsync is a command line application which synchronizes mailboxes;
currently Maildir and IMAP4 mailboxes are supported.
New messages, message deletions and flag changes can be propagated both ways;
the operation set can be selected in a fine-grained manner.

References:
mbsync syntax overview: mbsync manual (isync v1.4.4)
https://isync.sourceforge.io/mbsync.html

Upstream support for the mbsync filetype.
Original plugin: https://github.com/Fymyte/mbsync.vim

closes: vim/vim#17103

https://github.com/vim/vim/commit/836b87d6998a1f18783afdc41c90ae1f38c9c3e9

Co-authored-by: Pierrick Guillaume <pguillaume@fymyte.com>
2025-04-14 09:47:56 +02:00
zeertzjqandAliaksei Budavei 3aa833e0d9 vim-patch:5c84d12: runtime(filetype): make shell filetype detection more robust (#33421)
closes: vim/vim#17063

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

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
2025-04-11 16:45:14 +08:00
Christian ClasonandAndis Spriņķis ff2cbe8fac vim-patch:7517a8c: runtime(lf): improve syntax script, add filetype plugin
- Greatly improve detection and highlighting of command/shell regions,
  input-device key labels, escape sequences (@joelim-work)
- Add ftplugin for formatoptions, toggling comment areas
  (@andis-sprinkis)
- Add a few missing lf option keywords, rm. old non-working code, misc.
  formatting (@andis-sprinkis)

closes: vim/vim#17078

https://github.com/vim/vim/commit/7517a8cadfd0e70d0422955cbad4767f6a40f29d

Co-authored-by: Andis Spriņķis <andis@sprinkis.com>
2025-04-09 10:14:27 +02:00
Christian ClasonandAnarion Dunedain 4983fa45fc vim-patch:9.1.1271: filetype: Power Query files are not recognized
Problem:  filetype: Power Query files are not recognized
Solution: detect '*.pq' as pq filetype, include pq syntax and filetype
          plugin (Anarion Dunedain)

Microsoft Power Query provides a powerful data import experience that
encompasses many features. Power Query works with desktop Analysis
Services, Excel, and Power BI workbooks, in addition to many online
services, such as Fabric, Power BI service, Power Apps, Microsoft 365
Customer Insights, and more. A core capability of Power Query is to
filter and combine, that is, to mash-up data from one or more of a rich
collection of supported data sources. Any such data mashup is expressed
using the Power Query M formula language. The M language is a
functional, case sensitive language similar to F#.

Reference:
- Power Query M formula language overview:
  https://learn.microsoft.com/en-us/powerquery-m/

closes: vim/vim#17045

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

Co-authored-by: Anarion Dunedain <anarion80@gmail.com>
2025-04-04 10:43:18 +02:00
Christian ClasonandDoug Kearns b788c7fa6c vim-patch:6099db9: runtime(sh): Update syntax file, command substitution opening paren at EOL
Allow the opening parenthesis of a command substitution to appear at
EOL.

This fixes the issue raised in
https://github.com/vim/vim/issues/17026#issuecomment-2774112284.

closes: vim/vim#17044

https://github.com/vim/vim/commit/6099db9a60d1c047bf9c8feee3e1689c4e653250

Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2025-04-04 10:43:18 +02:00
Christian ClasonandAnarion Dunedain 5cdfa3324f vim-patch:9.1.1268: filetype: dax files are not recognized
Problem:  filetype: dax files are not recognized
Solution: detect "*.dax" as dax filetype, include dax filetype and
          syntax plugin (Anarion Dunedain)

Data Analysis Expressions (DAX) is a formula expression language used in
Analysis Services, Power BI, and Power Pivot in Excel. DAX formulas
include functions, operators, and values to perform advanced
calculations and queries on data in related tables and columns in
tabular data models.

DAX language overview:
- https://learn.microsoft.com/en-us/dax/dax-overview

closes: vim/vim#17035

https://github.com/vim/vim/commit/7f518e044fbc60cffdf2c0f611cc8c4dc35c338c

Co-authored-by: Anarion Dunedain <anarion80@gmail.com>
2025-04-03 10:15:11 +02:00
zeertzjqandJames McCoy 089c28b1e8 vim-patch:649a237: runtime(debversions): Add release name for Debian 15 - duke (#33207)
https://lists.debian.org/debian-devel-announce/2025/01/msg00004.html

closes: vim/vim#17010

https://github.com/vim/vim/commit/649a237bc886a2b702e95d5d45f661d8db6025f8

Co-authored-by: James McCoy <jamessan@jamessan.com>
2025-03-31 21:54:02 +08:00
Christian ClasonandAliaksei Budavei d6a5bc4e8b vim-patch:1054b18: runtime(java): Make changes for JDK 24 in syntax script
- "Demote" SecurityManager from the list of java.lang class
  types to javaLangDeprecated.
- Reintroduce supported syntax-preview-feature numbers 455
  and 476 as _new numbers_ 488 and 494, respectively.

References:
- https://openjdk.org/jeps/486 (Permanently Disable the Security Manager)
- https://openjdk.org/jeps/488 (Primitive Types in Patterns etc.)
- https://openjdk.org/jeps/494 (Module Import Declarations)

closes: vim/vim#16977

https://github.com/vim/vim/commit/1054b18291ce611932bc949b22b87b78f1975ca9

Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
2025-03-29 14:29:26 +01:00
Christian ClasonandAndis Spriņķis ab00aec67b vim-patch:0dc9a0b: runtime(lf): add lf r34 keywords to syntax script
closes: vim/vim#17002

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

Co-authored-by: Andis Spriņķis <andis@sprinkis.com>
2025-03-29 14:29:26 +01:00
zeertzjqandYee Cheng Chin 2331c52aff vim-patch:9.1.1243: diff mode is lacking for changes within lines
Problem:  Diff mode's inline highlighting is lackluster. It only
          performs a line-by-line comparison, and calculates a single
          shortest range within a line that could encompass all the
          changes. In lines with multiple changes, or those that span
          multiple lines, this approach tends to end up highlighting
          much more than necessary.

Solution: Implement new inline highlighting modes by doing per-character
          or per-word diff within the diff block, and highlight only the
          relevant parts, add "inline:simple" to the defaults (which is
          the old behaviour)

This change introduces a new diffopt option "inline:<type>". Setting to
"none" will disable all inline highlighting, "simple" (the default) will
use the old behavior, "char" / "word" will perform a character/word-wise
diff of the texts within each diff block and only highlight the
differences.

The new char/word inline diff only use the internal xdiff, and will
respect diff options such as algorithm choice, icase, and misc iwhite
options. indent-heuristics is always on to perform better sliding.

For character highlight, a post-process of the diff results is first
applied before we show the highlight. This is because a naive diff will
create a result with a lot of small diff chunks and gaps, due to the
repetitive nature of individual characters. The post-process is a
heuristic-based refinement that attempts to merge adjacent diff blocks
if they are separated by a short gap (1-3 characters), and can be
further tuned in the future for better results. This process results in
more characters than necessary being highlighted but overall less visual
noise.

For word highlight, always use first buffer's iskeyword definition.
Otherwise if each buffer has different iskeyword settings we would not
be able to group words properly.

The char/word diffing is always per-diff block, not per line, meaning
that changes that span multiple lines will show up correctly.
Added/removed newlines are not shown by default, but if the user has
'list' set (with "eol" listchar defined), the eol character will be be
highlighted correctly for the specific newline characters.

Also, add a new "DiffTextAdd" highlight group linked to "DiffText" by
default. It allows color schemes to use different colors for texts that
have been added within a line versus modified.

This doesn't interact with linematch perfectly currently. The linematch
feature splits up diff blocks into multiple smaller blocks for better
visual matching, which makes inline highlight less useful especially for
multi-line change (e.g. a line is broken into two lines). This could be
addressed in the future.

As a side change, this also removes the bounds checking introduced to
diff_read() as they were added to mask existing logic bugs that were
properly fixed in vim/vim#16768.

closes: vim/vim#16881

https://github.com/vim/vim/commit/9943d4790e42721a6777da9e12637aa595ba4965

Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2025-03-28 14:45:01 +08:00
zeertzjqandChristian Brabandt d96a685fae vim-patch:f9f4e27: runtime(hyprlang): save and restore cpo setting in syntax script
fixes: vim/vim#16970
closes: vim/vim#16973

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

Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-03-28 07:21:54 +08:00
zeertzjqandS0AndS0 558de3d9ad vim-patch:052b86b: runtime(solidity): update syntax script with error definitions
closes: vim/vim#16978

References:
- https://docs.soliditylang.org/en/latest/contracts.html#transient-storage
- https://soliditylang.org/blog/2021/04/21/custom-errors/

https://github.com/vim/vim/commit/052b86ba6315e65eb034ac906128f9bd82d5f2d7

Co-authored-by: S0AndS0 <strangerthanbland@gmail.com>
2025-03-28 07:21:42 +08:00
zeertzjqandMohamed Akram c5044bd021 vim-patch:51a06ec: runtime(sh): consider sh as POSIX shell by default (#33078)
Also, do not set g:is_kornshell when g:is_posix is set. BSD shells are
POSIX but many are derived from the ash shell.

closes: vim/vim#16939

https://github.com/vim/vim/commit/51a06ecee06096672b2f10fc6cd76bd8f6dfe8c9

Co-authored-by: Mohamed Akram <mohd.akram@outlook.com>
2025-03-27 11:22:22 +08:00
Christian ClasonandDavid Mandelberg 2eddd6f7c0 vim-patch:9.1.1231: filetype: SPA JSON files are not recognized
Problem:  filetype: SPA (single page application) JSON files are not
          recognized (used by pipewire and wireplumber)
Solution: detect pipewire and wireplumber configuration files as spajson
          filetype, include filetype, indent and syntax scripts for this
          new filetype (David Mandelberg).

I looked at all the files found by this command to see if the syntax
highlighting looked reasonable:

```
find {~/.config,/etc,/usr/share}/{pipewire,wireplumber} -type f -name \*.conf
```

References:
*   pipewire config files: https://docs.pipewire.org/page_config.html
*   wireplumber config files:
    https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/conf_file.html
    and
*   https://pipewire.pages.freedesktop.org/wireplumber/daemon/locations.html

closes: vim/vim#16950

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

Co-authored-by: David Mandelberg <david@mandelberg.org>
2025-03-23 11:47:42 +01:00