1
0
forked from aniani/vim

1125 Commits

Author SHA1 Message Date
64-bitman
250739d442
patch 9.1.1213: cannot :put while keeping indent
Problem:  cannot :put while keeping indent
          (Peter Aronoff)
Solution: add the :iput ex command (64-bitman)

fixes: #16225
closes: #16886

Signed-off-by: 64-bitman <60551350+64-bitman@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 21:15:11 +01:00
Aliaksei Budavei
7ceca3eb00
runtime(syntax-tests): Support "wait-free" test failure
When certain changes guarantee failure for old syntax tests,
opt for faster failure by reducing the number of screendumps
made for each file "page" to be no greater than the assigned
value of a VIM_SYNTAX_TEST_WAIT_TIME environment variable.
(This variable will be ignored and more screendumps may be
made when Make is GNU Make and a parent Makefile is used.)

Barring regressions, and assuming that v9.1.1163~1 succeeds
in providing a correct synchronisation mechanism outside of
"VerifyScreenDump()", and assuming that "readfile()" always
obtains the latest contents written by "term_dumpwrite()" in
"VerifyScreenDump()"; making a single screendump of a file
"page" and following it with a single reading of the written
screendump file should be enough to decide whether to pass
or fail a syntax test.

In addition, re-enable self testing after v9.1.1183~2.

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 20:59:28 +01:00
Jonathan
3c7d9b11c8
runtime(prql): include prql syntax script
References:
https://prql-lang.org/
https://github.com/PRQL/prql

closes: #16885

Signed-off-by: Jonathan <vanillajonathan@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 20:32:13 +01:00
Nick Jensen
96395e1512
runtime(cs): Update C# runtime files
closes: #16884

Signed-off-by: Nick Jensen <nickspoon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 09:50:41 +01:00
Doug Kearns
b55f0221cc
runtime(vim): Sync syntax generator base file with output file.
Synchronisation was lost in commit 0fab891 and the error propagated to
the output file in commit 5606ca5.

closes: #16889

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 09:30:00 +01:00
Jim Zhou
5606ca5349
patch 9.1.1202: Missing TabClosedPre autocommand
Problem:  Missing TabClosedPre autocommand
          (zoumi)
Solution: Add the TabClosedPre autcommand (Jim Zhou).

fixes: #16518
closes: #16855

Signed-off-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-13 21:58:25 +01:00
MuntasirSZN
a8aeeeb9aa
runtime(tera): remove unwanted code and fix issues in syntax script
closes: #16857

Signed-off-by: MuntasirSZN <muntasir.joypurhat@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-11 21:17:45 +01:00
Doug Kearns
0fab89117f
runtime(vim): Update base-syntax, improve :syntax highlighting
- Highlight missing :syntax subcommands.
- Don't highlight user specified syntax group names.

closes: #16847

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-10 21:04:53 +01:00
Doug Kearns
3dca512939
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: #16727

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-09 16:30:28 +01:00
Lee Lindley
42e498d9c4
runtime(plsql): move fold option from syntax to filetype plugin
closes: #16838

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Lee Lindley <lee.lindley@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-09 16:25:17 +01:00
MuntasirSZN
14da0fb2d8
patch 9.1.1188: runtime(tera): tera support can be improved
Problem:  runtime(tera): tera support can be improved
Solution: update tera filetype plugin, include a tera syntax script
          include tera syntax tests, update the filetype test,
          update makemenu and synmenu vim scripts
          (MuntasirSZN)

closes: #16830

Signed-off-by: MuntasirSZN <muntasir.joypurhat@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-09 08:52:05 +01:00
Aliaksei Budavei
f63c3467b1
runtime(syntax-tests): Improve parts of "runtest.vim"
* Accommodate the calling of "EraseLineAndReturnCarriage()"
  to not interfere with the "skipped" and "failed" reports.

* Create the "failed" directory, if unavailable, without
  relying on "VerifyScreenDump()" to do it so that reporting
  with "Xtestscript#s:AssertCursorForwardProgress()" can be
  uniformly attempted.

* Make an only list copy of the "Xtestscript" contents and
  share it with every syntax test.

* Narrow the scope of the "filetype" and "failed_root" local
  variables.

closes: #16789

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-08 16:58:17 +01:00
Aliaksei Budavei
6852e5c597
runtime(syntax-tests): Re-introduce support for "phoney" languages
As of patch v9.1.1176~1, there are no longer makeshift Make
targets to accommodate language names that can match phoney
targets.  For example, "clean_" was previously generated for
Clean because otherwise it clashed with the "clean" target.

Additionally, enable test filtering for makeshift targets.

Reference:
https://wiki.clean.cs.ru.nl/Clean

closes: #16810

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-07 19:12:45 +01:00
Doug Kearns
6bdfeb099a
runtime(vim): Update base-syntax, bug fixes
- Allow trailing backslashes in option values.
- Match :map-special modifier.
- Match :map-arguments case-sensitively.
- Remove <*Leader> from map modifier list and allow in RHS of a mapping.

closes: #16822

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-07 18:49:11 +01:00
glepnir
f31cfa29bf
patch 9.1.1178: not possible to generate completion candidates using fuzzy matching
Problem:  not possible to generate completion candidates using fuzzy
          matching
Solution: add the 'completefuzzycollect' option for (some) ins-completion
          modes (glepnir)

fixes #15296
fixes #15295
fixes #15294
closes: #16032

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-06 21:59:13 +01:00
Eisuke Kawashima
2e18facede
test(runtime/syntax): improve syntax tests
When a syntax file is changed, timestamps of the corresponding files are
updated.

NOTE: At the moment this script does not strictly track dependency, like
cpp on c.

Also update ignore files

closes #16548

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-05 21:15:45 +01:00
A4-Tacks
9f827ec587
patch 9.1.1173: filetype: ABNF files are not detected
Problem:  filetype: ABNF files are not detected
Solution: detect '.abnf' file as abnf filetype and
          include an abnf syntax plugin (A4-Tacks).

References:
- RFC5234
- RFC7405

closes: #16802

Signed-off-by: A4-Tacks <wdsjxhno1001@163.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-05 20:19:32 +01:00
Aliaksei Budavei
7003a5d63f
runtime(syntax-tests): Apply stronger synchronisation between buffers
The current lightweight synchronisation with ":redraw" needs further
reinforcement in the light of v9.1.1110.  And, with v9.1.0820, make
another synchronisation point _before_ the first (or only) screenful is
dumped.

Also add a script to regenerate all screendumps.

closes: #16632

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-01 16:28:20 +01:00
Doug Kearns
60bd140256
runtime(vim): Update base-syntax, match Vim9 function calls after "|"
Match Vim9 function calls after ex-bar.  These are also currently
matched but invalid syntax for legacy script.

fixes: #16721
closes: #16747

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-27 19:15:20 +01:00
brianhuster
00a00f5d3f
runtime(lua): Update lua ftplugin and documentation
Problem:
- The doc says the default `g:lua_subversion` is 2, but in fact it is 3
  (see `runtime/syntax/lua.vim`)
- `includeexpr` doesn't work with module in `init.lua`

Solution:
- Update documentation
- Assign value to option `&include`
- Add function `LuaInclude` and assign it to `l:&includeexpr`

closes: #16655

Co-authored-by: dkearns <dougkearns@gmail.com>
Signed-off-by: brianhuster <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-25 20:26:45 +01:00
Doug Kearns
025dc48e88
runtime(vim): Update base-syntax, match :CompilerSet and :SynMenu commands
closes: #16713

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-23 15:48:52 +01:00
David Mandelberg
ed7d8e55ac
patch 9.1.1140: filetype: m17ndb files are not detected
Problem:  filetype: m17ndb files are not detected
Solution: detect m17ndb files as m17ndb filetype,
          include filetype, syntax and indent files for the
          new filetype (David Mandelberg).

References:

https://www.nongnu.org/m17n/manual-en/m17nDBFormat.html describes the
format. https://git.savannah.nongnu.org/cgit/m17n/m17n-db.git/tree/ has
examples of the files.

closes: #16696

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-23 09:41:42 +01:00
Doug Kearns
68ba6c2c6c
runtime(vim): Update base-syntax, improve performance
Contain the vimNotation syntax group, matching this at top level is
unnecessary and very slow.

The removed vimString and vimNumber definitions are broken and/or never
match. They have long been replaced by newer definitions.

closes: #16645

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:40:12 +01:00
Doug Kearns
4f010c90bd
runtime(vim): Update base-syntax, always match continuation comments to EOL
closes: #16630

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:24:42 +01:00
Doug Kearns
a9c06429ac
runtime(vim): Update base-syntax, match Vim9 boolean and null literals in parens
- Match Vim9 boolean and null literals in parenthesised expressions and
  function argument lists.
- Match read-only registers in expressions.

closes: #16622

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-12 20:44:17 +01:00
Yee Cheng Chin
5881828104
ci: syntax tests spam output
Currently syntax tests outputs all the Vim commands to the console,
which is annoying for a local developer but also makes the CI output
impossible to parse and just printing all the terminal output comes with
a performance penalty.

So let's just simply redirect all output to /dev/null similar to what
the script tests do.

This can be turned off locally for someone diagnosing issues but it
should not be the default behavior to output all terminal control
sequences to output in CI.

closes: #16612

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-11 20:16:11 +01:00
Doug Kearns
1aa287e048
runtime(vim): Update base-syntax, improve variable matching
- Match variables after operators, including line continuations.
- Match option variables without leading whitespace.
- Explicitly match expression subscripts.
- Match Vim9 variables in LHS of assignments and method calls.
- Match option variables (&option) with a dedicated syntax group like
  environment variables.
- Match list literals, fixes: #5830
- Match :{un}lockvar arguments.
- Match registers and environment variables in :let unpack lists.
- Match lambda expressions
- Match Vim9 scope blocks
- Match variables in :for subject
- Highlight user variables with Normal
- Improve this/super keyword matching, fixes: #15970

closes: #16476

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-10 22:00:27 +01:00
Doug Kearns
f30eb4a170
runtime(qf): Update syntax file, match second delimiter
Match both | separators and link to the Delimiter highlight group.

fixes #16584
closes: #16590

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-09 18:40:05 +01:00
Luuk van Baal
b7147f8236
patch 9.1.1084: Unable to persistently ignore events in a window and its buffers
Problem:  Unable to persistently ignore events in a window and its buffers.
Solution: Add 'eventignorewin' option to ignore events in a window and buffer
          (Luuk van Baal)

Add the window-local 'eventignorewin' option that is analogous to
'eventignore', but applies to a certain window and its buffers. Identify
events that should be allowed in 'eventignorewin', adapt "auto_event"
and "event_tab" to encode this information. Window context is not passed
onto apply_autocmds_group(), and when to ignore an event is a bit
ambiguous when "buf" is not "curbuf", rather than a large refactor, only
ignore an event when all windows into "buf" are ignoring the event.

closes: #16530

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-08 18:52:39 +01:00
Eisuke Kawashima
a35040f795
runtime(tex): improve syntax highlighting
this change includes the following changes:
- a macro option must be #1–#9
- add \providecommand
- add starred versions of \newcommand, \newenvironment, and their
  variants
- add number of arguments to \(re)newenvironment

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-08 18:32:14 +01:00
Doug Kearns
4a530a632b
runtime(vim): Update base-syntax, match :debuggreedy count prefix
Match :0debuggreedy as a special case until better range/count support
is implemented.

closes: #16572

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-03 18:59:09 +01:00
Luca Saccarola
a5d19aa44d
runtime(hyprlang): fix string recognition
fixes: #16064
closes: #16527

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-29 10:28:42 +01:00
Nir Lichtman
db23436b92
runtime(asm): add byte directives to syntax script
closes: #16523

Signed-off-by: Nir Lichtman <nir@lichtman.org>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-26 16:55:54 +01:00
Peter Benjamin
509a8d58f9
runtime(just): fix typo in syntax file
closes: #16515

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-25 15:27:15 +01:00
Peter Benjamin
72755b3c8e
patch 9.1.1042: filetype: just files are not recognized
Problem:  filetype: just files are not recognized
Solution: adjust filetype detection pattern, detect just shebang line,
          include just ftplugin, indent and syntax plugin
          (Peter Benjamin)

closes: #16466

Signed-off-by: Peter Benjamin <petermbenjamin@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-20 21:56:41 +01:00
Doug Kearns
c273f1ac77
runtime(vim): Update base-syntax, match ternary and falsy operators
fixes: #14423
fixes: #16227
closes: #16484

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-20 21:53:01 +01:00
Christian Brabandt
4335fcfed1
runtime(kconfig): updated ftplugin and syntax script
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-20 21:01:41 +01:00
Doug Kearns
8dec6c2e6c
runtime(vim): Update base-syntax, fix is/isnot operator matching
- Match is? and isnot? operators.
- Limit other comparison operators to one match modifier rather than
  two.

closes: #16482

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-19 14:02:06 +01:00
Christian Brabandt
2cb8246eb9
runtime(tex): add texEmphStyle to texMatchGroup in syntax script
fixes: #16228

Co-authored-by: Github User JordL
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 18:09:38 +01:00
Doug Kearns
e06405181a
runtime(c): add new constexpr keyword to syntax file (C23)
closes: #16471

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 10:52:27 +01:00
Eisuke Kawashima
54cb514c9a
runtime(sh): update syntax script
- remove duplicated keywords
- add bash coproc and COPROC_PID keywords

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 10:11:28 +01:00
Doug Kearns
866f229591
runtime(c): Add missing syntax test files
These were missing from commit c2a967a.

closes: #16470

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 10:06:59 +01:00
Doug Kearns
c2a967a1b9
runtime(c): Update syntax and ftplugin files
- highlight more C keywords, including some from C23

Conditionally highlight C23 features:
- #embed, #elifdef and #elifndef preprocessor directives
- predefined macros
- UTF-8 character constants
- binary integer constants, _BitInt literals, and digit separators
- nullptr_t type and associated constant
- decimal real floating-point, bit precise and char types
- typeof operators

Matchit:
- update for new preprocessor directives

fixes: #13667
fixes: #13679
closes: #12984

Co-authored-by: Albin Ahlbäck <albin.ahlback@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-17 14:12:16 +01:00
Luca Saccarola
9cfdabb074
runtime(netrw): change netrw maintainer
Dr. Chip retired some time ago and is no longer maintaining the netrw
plugin. However as a runtime plugin distributed by Vim, it important to
maintain the netrw plugin in the future and fix bugs as they are
reported.

So, split out the netrw plugin as an additional package, however include
some stubs to make sure the plugin is still loaded by default and the
documentation is accessible as well.

closes: #16368

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-17 13:03:53 +01:00
Denilson Sá Maia
30377e0fe0
runtime(lyrics): support milliseconds in syntax script
The following tool creates LRC files using three fractional digits after
the seconds (i.e. milliseconds).

References:
https://github.com/magic-akari/lrc-maker
https://lrc-maker.github.io/

closes: #16436

Signed-off-by: Denilson Sá Maia <denilsonsa@gmail.com>
Signed-off-by: ObserverOfTime <chronobserver@disroot.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-13 08:23:24 +01:00
Aliaksei Budavei
5eaacef18e
tests: Load screendump files with "git vimdumps"
Also, fold the difference part and the bottom part for the
identical screendump files.

closes: #16380

Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-11 17:12:04 +01:00
Doug Kearns
695522dea3
runtime(vim): Update base-syntax, highlight literal string quote escape
Match the '' escape sequence in literal strings.  These were previously
ending the current string and starting another concatenated literal
string.

closes: #16415

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
2025-01-10 20:02:17 +01:00
Wu, Zhenyu
df4a7d7617
runtime(tiasm): use correct syntax name tiasm in syntax script
closes: #16416

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-09 22:09:16 +01:00
Wu, Zhenyu
4f73c07abf
patch 9.1.0998: filetype: TI assembly files are not recognized
Problem:  filetype: TI assembly files are not recognized
Solution: inspect '*.sa' and assembly files and detect TI assembly
          files, include filetype plugin and syntax script for TI
          assembly files (Wu, Zhenyu)

closes: #15827

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-08 20:26:38 +01:00
Jan-Arvid Harrach
8ab1819df6
runtime(xf86conf): add section name OutputClass to syntax script
References:
https://man.archlinux.org/man/xorg.conf.5#DESCRIPTION

closes: #16397

Signed-off-by: Jan-Arvid Harrach <jharrach@tutanota.com>
2025-01-08 20:05:05 +01:00