1
0
forked from aniani/vim

818 Commits

Author SHA1 Message Date
Petr Pisar
315cd1fbcb
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.

Signed-off-by: Petr Písař <ppisar@redhat.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-22 20:39:09 +01:00
dkearns
1624970d32
runtime(vim): Update base-syntax, fix :unabbrev highlighting (#14077)
Fixes issue #7876

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-22 19:45:05 +01:00
Nick Hanley
20d61e1b94
runtime(java): add syntax support for Java switch expressions (#9124)
Signed-off-by: Nick Hanley <nicholasjhanley@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-22 15:06:19 +01:00
Maxim Kim
9ca335aad2
patch 9.1.0122: Some minor issues with the getregion() function
Problem:  Some minor issues with the getregion() function
Solution: Fix examples in the help, use OP_NOP op_type and MBLOCK
          as motion_type in f_getreg(), update vim syntax to
          for getregion() (Maxim Kim)

```
:xnoremap <CR>
\ <Cmd>echow getregion('v', '.', mode())<CR>
```
`echo` while in visual mode has no visible effect, thus people trying
example might be frustrated as it looks like nothing happens.

So the option is to change it to `echow` or `echom`.
With `echom` it is again has no visible effect but one can at least inspect `:messages`.
On the other hand `echow` showes selected text in a popup window.

```
Can also be used as a |method|: >
'.'->getregion("'a', 'v')
```

Here is the typo, which makes example invalid, should be `("'a", ...`

closes: #14064

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-21 19:53:02 +01:00
Eric Pruitt
e8f6af6091
runtime(tmux): Update tmux syntax (#14065)
Signed-off-by: Eric Pruitt <eric.pruitt@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-21 19:46:47 +01:00
Christian Brabandt
f9ca139e3a
runtime(misc): announce adoption of various runtime files
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-19 20:46:49 +01:00
Aliaksei Budavei
dfcef890cb
runtime(vim): Distinguish Vim9 constructor definitions from the :new ex command (#14050)
With the arrival of Vim9 classes, the syntax must allow for
_new_ constructors; multiple constructor definitions are
supported for a class, provided distinct suffix-names are
used.  Currently, the defined constructors match either
vimCommand or vimFunctionError (for any newBar).

For example:
------------------------------------------------------------
vim9script

class Foo
    def new()
    enddef

    def newBar()
    enddef
endclass
------------------------------------------------------------

Since every constructor is required to bear a lower-cased
_new_ prefix name, it should suffice to distinguish them
from functions, and so there are no new highlight or syntax
groups introduced.


Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-18 19:02:14 +01:00
Doug Kearns
1633de8c35
runtime(vim): Update base-syntax, remove unused vimString region
These were included with the initial release of the syntax file for Vim
5 and were probably intended to allow for syn-region start/skip/end
patterns with a '!' or '+' delimiter.  However, these cases are
currently handled by the vimSynRegPat group.

The removed patterns never match anywhere in the distributed runtime
files and it is believed that this is generally true.

closes: #14035

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-14 21:28:44 +01:00
Doug Kearns
fe6d5b0ae4
runtime(vim): Update base-syntax, fix :behave highlighting
closes: #14036

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-14 21:17:43 +01:00
h-east
5c3855bcab
runtime(vim): update Vim Syntax generator
- Add missing "Last Change:" line.
- The date on this line in vim.vim is updated by update_date.vim at
  Make time. (I made a mistake in the file path)
- Remove unnecessary "b:loaded_syntax_vim_ex".
- Remove "Base File Date:" line in vim.vim.base
- Add Doug Kearns as Maintainer

closes: #14031

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-14 21:00:01 +01:00
h-east
9b53c052d5
runtime(vim): include Vim Syntax generator
fixes: #13939
closes: #14021
related: vim-jp/syntax-vim-ex#28

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-13 21:11:22 +01:00
Christian Brabandt
6d91227267
runtime(gpg): Mark dangerous use-embedded-filename with WarningMsg
The syntax highlighter is likely to encourage people to use the listed
commands.

But `use-embedded-filename` is a dangerous option that can cause GnuPG
to write arbitrary data to arbitrary files whenever GnuPG encounters
malicious data.

GnuPG upstream explicitly warns against using this option:

https://dev.gnupg.org/T4500
https://dev.gnupg.org/T6972

However, since this is a valid option, we cannot just drop it from the
syntax script. Instead, let's mark it with the WarningMsg highlighting
to make it obvious, that this option is different (and should not be
used for security reasons).

closes: #13961

Co-authored-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Signed-off-by:  Christian Brabandt <cb@256bit.org>
2024-02-11 18:19:45 +01:00
dkearns
b614b284ee
runtime(vim): Update syntax file (#14009)
- allow comments after :highight commands
- match the bang in a :highlight[!] command
- highlight the bang in :map[!], :menu[!] and :unlet[!] with vimOper
  like all other commands

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-11 17:13:34 +01:00
Christian Brabandt
627c950e5b
patch 9.1.0091: Syntax test fails when run with non C locale
Problem:  Syntax test fails when run with non C locale
Solution: Run syntax tests with C locale, clean up Xtestscript file,
          strip environment variables from GetVimCommand()
          (h-east)

closes: #14007

Co-authored-by: h-east <h.east.727@gmail.com>
Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-10 13:02:17 +01:00
Christian Brabandt
f7f33e3719
runtime(dosbatch): improve '::' comment highlighting
Added a syntax region for command blocks so that the highlighting of
`::` comments in them can be controlled.  The `dosbatch_colons_comment`
variable now controls if all `::` comments in a code block are
highlighted as comments or errors.  A `::` comment at the end of a
command block is always highlighted as an error.

This re-enables the highlighting of `::` comments in `.bat` files as
requested in #13666, while allowing control of highlighting them in
command blocks requested in #11778 and first attempted in #11980.

related: #11980
fixes: #13666

Co-authored-by: Mike Williams <mikew@globalgraphics.com>
Signed-off-by: Mike Williams <mikew@globalgraphics.com>
Signed-off-by: mevanlc <mevanlc@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-06 10:56:26 +01:00
dkearns
7c5aeaffa2
runtime(vim): Update syntax file (#13969)
Improve string interpolation highlighting.

Use the vimSep group to highlight interpolation braces as vimOperParen
has no highlighting of its own and employs vimSep via matchgroup.

Add vimNumber to the interpolation group's contained list.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: thinca <thinca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-03 18:18:31 +01:00
dkearns
e3e3934bb1
runtime(vim): Update syntax file (#13948)
Improve string escape sequence and special key matching.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-01 21:44:26 +01:00
Ajit-Thakkar
9204f39580
runtime(fortran): update syntax (#13953)
* runtime (Fortran) update syntax
* runtime (Fortran) small fix

Signed-off-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-01 21:43:01 +01:00
zeertzjq
bf321806bf
patch 9.1.0060: Recorded register cannot be translated using keytrans()
Problem:  Recorded register cannot be translated using keytrans() when
          it involves character search (iddqd505)
Solution: Record a K_IGNORE instead of a K_NOP (zeertzjq)

related: #13916
closes: #13925

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-28 19:03:00 +01:00
thinca
cf8695d48c
runtime(vim): Highlight string interpolation
closes: #13923

Signed-off-by: thinca <thinca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-28 18:58:14 +01:00
dkearns
21ce159e05
runtime(vim): Update syntax and ftplugin files (#13924)
Improve matching of line-continuations and interspersed comments.

These are now also matched in multiline syntax command patterns,
dictionary literals, and parenthesised expressions and argument lists.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-28 18:54:08 +01:00
dkearns
0cc6108fea
runtime(ant): Update syntax file (#13926)
Remove invalid display option from syn-keyword commands.

Take over maintenance of this file.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-27 18:20:46 +01:00
dkearns
b418a51933
runtime(vim): Update syntax file (#13919)
Add foreach() function.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-27 11:24:45 +01:00
Sergey Vlasov
1f47db75fd
patch 9.1.0059: No event triggered before creating a window
Problem:  No event is triggered before creating a window.
          (Sergey Vlasov)
Solution: Add the WinNewPre event (Sergey Vlasov)

fixes: #10635
closes: #12761

Signed-off-by: Sergey Vlasov <sergey@vlasov.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-25 23:07:00 +01:00
gi1242
046a0f75d0
runtime(mail): fix #13913 (#13917)
switch to the DFA engine for the emoji collaction range

Co-authored-by: GI <gi1242+vim@gmail.com>
Signed-off-by: GI <gi1242@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-25 19:52:47 +01:00
Ajit-Thakkar
e1ddc2d587
runtime(fortran): update syntax and documentation (#13912)
* runtime (doc): update Fortran section
* runtime(syntax): Complete support for Fortran 2023.
   Minor improvements.

Signed-off-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-24 20:08:34 +01:00
Luca Saccarola
ca0e9823a1
runtime(c): Highlight user defined functions
closes: #13763

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23 21:34:09 +01:00
dkearns
9c5b90db03
runtime(vim): Update syntax file (#13906)
Highlight :2match and :3match and add these to :help ex-cmd-index.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23 20:34:28 +01:00
GI
36e2c0f293
runtime(mail): updated syntax file
Signed-off-by: GI <gi1242@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23 19:48:08 +01:00
Johnothan King
add31baeda
runtime(sh): Add handling for ksh93 shared-state comsubs and mksh valsubs (#13884)
This commit adds support for ksh93 shared-state command
substitutions (syntax: ${ command; }) and mksh's value
substitutions (syntax: ${|command;}) in the sh syntax script.

Also add a syntax test for ksh subshares with dumps included
to make sure it doesn't regress.

fixes: #9514

Signed-off-by: Johnothan King <johnothanking@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-22 20:19:54 +01:00
Andrea C from The App
3b2c27415d
runtime(chuck): include ChucK syntax file (#13895)
Co-authored-by: gacallea <gacallea@users.noreply.github.com>
Signed-off-by: gacallea <gacallea@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-22 20:10:42 +01:00
Billie Cleek
ea9a93e5b0
runtime(go): update Go syntax file (#13896)
Update the Go syntax file with some recent changes made to vim-go.

Signed-off-by: Billie Cleek <bhcleek@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-22 20:08:44 +01:00
James Eapen
46d67d22b9
runtime(swayconfig): add focus_follows_mouse and smart_qaps syntax keywords
See:
0aceff7469/sway/sway.5.scd (L680)
`focus_follows_mouse yes|no|always`
0aceff7469/sway/sway.5.scd (L770)

closes: #13797

Signed-off-by: James Eapen <james.eapen@vai.org><author>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-17 21:43:31 +01:00
James Eapen
a39af02904
runtime(i3config): remove always from focus_follows_mouse
The always option does not exist in i3, only sway.

From https://i3wm.org/docs/userguide.html:
`focus_follows_mouse yes|no`

Version number incremented by 2 because the last commit did not
increment the version.

Signed-off-by: James Eapen <james.eapen@vai.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-17 21:43:12 +01:00
Maxim Kim
211211052d
runtime(odin): include ftplugin, syntax and indent script (#13867)
Note for Neovim Contributors: this is bundled as Vim9 Script. If you want to use this on Neovim, you need to convert the Vim9 scripts to Vim Script or Lua or leave it out.

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-16 17:33:51 +01:00
Ajit-Thakkar
ef79c57837
runtime(fortran): update fortran syntax (#13870)
Support most remaining features of Fortran 2018/2023
Small improvements to folding etc,
Code cleanup: use \? instead of mix of \= and \?

Signed-off-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-15 22:42:03 +01:00
PMunch
a606f3ac03
patch 9.1.0030: Cannot use terminal alternate font
Problem:  Cannot use terminal alternate fonts (PMunch)
Solution: Support terminal alternate fonts using
          CSI SGR 10-20 and t_CF code (PMunch)

Add support for alternate font highlighting

This adds support for alternate font highlighting using CSI SGR 10-20.
Few terminals currently support this, but with added tool support this
should improve over time. The change here is more or less taken from how
colors are configured and applied, but there might be some parts I
missed while implementing it. Changing fonts is done through the new
`:hi ctermfont` attribute which takes a number, 0 is the normal font, and
the numbers 1-9 select an "alternative" font. Which fonts are in use is
up to the terminal.

fixes: #13513
closes: #13537

Signed-off-by: PMunch <peterme@peterme.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-15 22:27:35 +01:00
Danek Duvall
d7d560374b
patch 9.1.0029: Cannot act on various terminal response codes
Problem:  Cannot act on various terminal response codes
Solution: Add the TerminalResponseAll autocommand
          (Danek Duvall)

closes: #13829

Signed-off-by: Danek Duvall <duvall@comfychair.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-14 20:19:59 +01:00
Maxim Kim
ceed36873e
runtime(vim): accept dot in completionList for Vim9 syntax (#13832)
if you have autoloaded command complete function in vim9script, it shouldn't be highlighted as Error:

```
import autoload "share.vim"
command! -range=% -nargs=? -complete=custom,share.Complete Share share.Paste(<q-args>, <line1>, <line2>)
```

`share.Complete` is a valid complete function.

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-08 19:42:02 +01:00
Romain Lafourcade
124371c5a1
patch 9.1.0016: default diff highlighting is too noisy
Problem:  default diff highlighting is too noisy
Solution: Link diff highlighting groups to new
          Added/Removed/Changed, revert previous change
          (Romain Lafourcade)

Remove diff* links added in #13776 and doc added in commit b1392be

The links added in #13776 are way too noisy for the contexts in which
the `diff` syntax is applied (git commits, patches, etc.).

This commit:

- removes those links
- adds new default highlighting groups Added, Changed and
  Removed
- links the diff highlighting groups to those new defaults
- removes the doc changes
- adjusts the syntax_completion test for those newly added group
  names

Note: Changes to the default color schemes will be handled separately,
by adding links to those newly created Added/Removed/Changed
highlighting groups.

related: #13776
closes #13825

Signed-off-by: Romain Lafourcade <romain.lafourcade@razorfish.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-07 23:32:19 +01:00
Doug Kearns
68a8947069
patch 9.1.0013: Modula2 filetype support lacking
Problem:  Modula2 filetype support lacking
Solution: Improve the Modula-2 runtime support, add additional modula2
          dialects, add compiler plugin, update syntax highlighting,
          include syntax tests, update Makefiles (Doug Kearns)

closes: #6796
closes: #8115

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Benjamin Kowarsch <trijezdci@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-05 17:59:04 +01:00
dkearns
c79646dfb1
runtime(vim): Update syntax file (#13671)
Support multiline :syntax commands.

Match :syn-cchar option in :syn-{keyword,region}.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-04 22:58:48 +01:00
Ajit-Thakkar
d94ca966ca
runtime(fortran): syntax and documentation updates (#13811)
closes: #13802

Signed-off-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-03 19:58:21 +01:00
Hugo van de Vliert
b5352931b3
runtime(vim): add jumpoptions to syntax file (#13808)
* Add jumpoptions and jop to vim syntax file
* Clean up some whitespace

Signed-off-by: Hugo van de Vliert <hugo.vandevliert@floryn.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-03 18:03:29 +01:00
dezza
80beeef0c6
runtime(vim): Add support for <ScriptCmd> syntax (#10686)
Adding `<ScriptCmd>` to list of angle-bracket notation syntax, just like `<Cmd>`

`<Cmd>` is already highlighted.
```vim
nnoremap <leader>o <Cmd>Oldfiles()<CR>
```

`<ScriptCmd>` is not.

Signed-off-by: dezza <402927+dezza@users.noreply.github.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-03 16:20:22 +01:00
Brad King
d4634a26cd
runtime(vim): Add support for syntax foldlevel command (#6182)
Signed-off-by: Brad King <brad.king@kitware.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-03 16:17:24 +01:00
Lucien Grondin
b16fc98055
runtime(sh): Update sh syntax and add local keyword for bash (#13806)
add `local` in shStatement

Signed-off-by: Lucien Grondin <grondilu@yahoo.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-01 19:00:41 +01:00
Ajit-Thakkar
d96f25bd69
runtime(fortran): update syntax and documentation (#13784)
* Update Fortran section of indent.txt
* Small addition to fortran syntax

Signed-off-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>

* Update Fortran section of syntax.txt

* Runtime (Fortran)

Fix regression

* Combine two expressions
2023-12-29 16:29:43 +01:00
Tim Pope
715a805889 runtime(cucumber): Updates to indent and syntax 2023-12-28 23:17:54 +01:00
Tim Pope
fda02d03c0 runtime(gitcommit): Updates to ftplugin and syntax 2023-12-28 23:17:54 +01:00