Match :map ( RHS properly.
Only match ! after :map, :noremap, :unmap and :mapclear.
closes: vim/vim#1529799984fc58a
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Looking into the current standard for Synopsis Design Constraints (SDC)
from their [Technology Access
Program](https://www.synopsys.com/community/interoperability-programs/tap-in.html),
one can see that the current state of the sdc-syntax file is very
outdated as well as short in coverage of keywords.
This commit pursues to add all the missing keywords from the current
standard (Rev. 2.1).
closes: vim/vim#152811724ddbe3a
Co-authored-by: daniel-s-w <59746710+daniel-s-w@users.noreply.github.com>
Match types in Vim9 variable declarations.
Match Vim9 boolean and null literals. These are not matched in all
contexts yet.
related: vim/vim#15277d65e58f6f9
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Problem: filetype: Mediawiki files are not recognized
Solution: detect "*.mw" and "*.wiki" as mediawiki filetype,
include basic syntax and filetype plugins.
(AvidSeeker)
closes: vim/vim#15266b5844104ab
Co-authored-by: AvidSeeker <avidseeker7@protonmail.com>
Problem: ocaml runtime files are outdated
Solution: sync those files with the upstream repo,
detect a few more ocaml files
(Yinzuo Jiang)
closes: vim/vim#15260700cf8cfa1
Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Added overlay, tracefs and fixed the "none" keyword in the fstab syntax definition.
closes: vim/vim#152177a22cb8141
Co-authored-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: antlr4 files are not recognized
Solution: Detect '*.g4' as antlr4 filetype, include a simple antlr4
syntax and filetype plugin (Yinzuo Jiang)
closes: vim/vim#151914a7a4a3675
Co-authored-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Kivy uses "#:" for preprocessing commands (like "#:import ...") which
were overridden by the comment syntax. This has been changed, and a
commentstring has been added.
closes: vim/vim#151638906e22df5
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
It seems that nvim-treesitter stops treesitter highlight when changing
filetype, so it makes sense for builtin ftplugins to do this as well.
Use :call and v:lua here to allow separation with '|'.
With the variables defined, distinctly highlight parts of
a method declaration header: its name and parameter list
parens, from its type parameters, return type, and formal
parameters; and distinctly highlight parts of a lambda
expression: its parameter list parens and the arrow, from
its formal parameters and identifiers.
closes: vim/vim#1508301a4fb104d
Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Match Vim9-script comments after :def and :enddef and legacy-script
comments after :func and :endfunc, in any definition context.
Highlight incorrect comment types after these commands as errors.
fixes: vim/vim#15062closes: vim/vim#15072fc64ac0be2
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
In the presence of parameterised types whose names begin
with a capital letter and end with a less-than sign "<" that
introduces a type argument or a list of comma-separated type
arguments, followed by a greater-than sign ">", a variable
"g:java_highlight_generics" can be defined to have some
components of such types uniformly coloured (by picking
highlight groups for javaGenericsC{1,2}, javaWildcardBound).
For example,
------------------------------------------------------------
java.io.InputStream stream = java.io.InputStream.nullInputStream();
java.util.function.Function<String,
java.util.function.BiFunction<String, String, String>> updater =
property -> (oldValue, newValue) -> oldValue;
java.util.logging.LogManager.getLogManager()
.updateConfiguration(stream, updater);
------------------------------------------------------------
Note that the diamond form and explicit type arguments do
not qualify for this kind of recognition.
For example,
------------------------------------------------------------
new java.util.HashSet<>().<String>toArray(new String[0]);
------------------------------------------------------------
References:
https://docs.oracle.com/javase/specs/jls/se21/html/jls-4.html#jls-4.5https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.9https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.12.2.1closes: vim/vim#15050beb02ed674
Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Instances of anonymous classes can be passed as method
arguments and should be subject to line folding as well.
closes: vim/vim#1504894c5d8a5e2
Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
* vim-patch:1ce65e3: runtime(csv): include a simple csv filetype and syntax plugin
fixes: vim/vim#150381ce65e35ac
Co-authored-by: Maxim Kim <habamax@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Also:
- Restore the capability to mark as an error braces nested
in parens with g:javaInParen.
- Try not to fold top-level-type bodies. (Defining multiple
package-private top level types in a single source file is
not recommended as it can impose order among compilation
units; so it is assumed that only one such top level type
is usually defined.)
- Compose ‘method header’ highlighting and block braces
folding.
- Do not highlight block braces whenever ‘method header’
highlighting is requested.
This bundling of ‘method headers’ and block braces for
highlighting can be traced back to Vim v5.0; however, no
comment or documentation entry conveys any justification.
For example, it is hard to discover the connection between
block braces for "while", "if", etc., statements and method
body block braces. The former behaviour can be attained in,
e.g. ~/.vim/after/syntax/java.vim:
------------------------------------------------------------
if exists("g:java_highlight_functions")
syn clear javaBlock javaInParen
syn match javaBlockOther "[{}]"
syn region javaBlock transparent matchgroup=javaBlockStart
\ start="\%(^\|^\S[^:]\+\)\@120<!{" end="}" fold
hi def link javaBlockStart javaFuncDef
hi def link javaBlockOther javaBlockStart
if exists("g:java_mark_braces_in_parens_as_errors")
syn match javaInParen contained "[{}]"
endif
endif
------------------------------------------------------------
Note: Read ‘a method header omitting a _throws_ clause’ for
every ‘method header’ appellation used above.
371bab0594
Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
Match shebang lines in Vim9 and legacy script.
Mark these as an error if they appear anywhere other than the first line
of a legacy-script file. In Vim9 script these match as normal line
comments rather than an error.
ae321b51f7
Co-authored-by: dkearns <dougkearns@gmail.com>
Match :sleep arg properly including a lone "m" with a leading count.
closes: vim/vim#15003262e25e5a1
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Make a formal definition for normal and single-element kinds
of annotations that otherwise require for their containment
to repeat each time all syntax groups that describe element
values.
Reference:
https://docs.oracle.com/javase/specs/jls/se21/html/jls-9.html#jls-9.7902b766858
Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
Allow highlighting of strings within comments to be disabled by setting
g:vimsyn_comment_strings to false.
959c3c887b
Co-authored-by: dkearns <dougkearns@gmail.com>
Allow whitespace between the :substitute command and its pattern
argument. Although unusual, it is supported and there are examples in
the wild.
Match Vi compatible :substitute commands like :s\/{string}/. See :help
E1270.
fixes: vim/vim#14920closes: vim/vim#1492392f4e91590
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Problem: no whitespace padding in commentstring option in ftplugins
Solution: Change default to include whitespace padding, update
existing filetype plugins with the new default value
(Riley Bruins)
closes: vim/vim#148430a0830624a
Co-authored-by: Riley Bruins <ribru17@hotmail.com>
Problem: filetype: rasi files are not recognized
Solution: regonize '*.rasi' files as rasi filetype,
include a filetype and syntax plugin
(Pierrick Guillaume)
ported from: https://github.com/Fymyte/rasi.vimcloses: vim/vim#14821280e5b13ca
Co-authored-by: Pierrick Guillaume <pierguill@gmail.com>
* Add space in template for 'commentstring'
* Add 'comments' and 'commentstring' support to debcontrol
* debversions: Move Ubuntu releases outside of standard support to unsupported
Although trust, xenial, and bionic are not EOL yet, their standard support period has ended.
Reported-by: Riley Bruins <ribru17@gmail.com>
0076ddc07d
Co-authored-by: James McCoy <jamessan@debian.org>
Co-authored-by: Riley Bruins <ribru17@gmail.com>
- fix floating_modifier $mod normal|inverse was being hightlighted as error
reverting the floating_modifier change from dd83b63
- will currently allow invalid syntax after floating_modifier
fixes: vim/vim#14826closes: vim/vim#1482722ac941208
Co-authored-by: James Eapen <james.eapen@vai.org>
Co-authored-by: JosefLitos <litosjos@fit.cvut.cz>
runtime(java): Strive to remain compatible for at least Vim 7.0 (vim/vim#14744)
Also:
- Limit all look-behind regexp patterns.
- Cache regexp capabilities for [:upper:] and [:lower:].
d3952e8cfe
Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>