- Fix regex highlighting after opening parens, javascriptParens was
matching later. Fixes issue #20069.
- Add missing regex flags.
- Mark the file as unmaintained. Thanks Claudio for all your work.
closes: #20076
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Add a syntax file update to Neville Dempsey's long-serving version
- Add a new rudimentary ftplugin
- Add filetype detection
Changes to the syntax file include:
- improved prelude, number and symbol highlighting
- prelude highlighting tests
- updated boiler plate
Note that these runtime files currently target Algol 68 Genie employing
the default UPPER stropping regime. Support for GNU Algol 68 should
also be usable with the UPPER stropping regime, although somewhat less
complete. Full support for the SUPPER stropping regime in GNU Algol 68
is also planned.
closes: #19818
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Janis Papanagnou <janis_papanagnou@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Allow for docker comments to be interspersed in a multiline (continued)
RUN command argument.
fixes: #8364closes: #19829
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Code like ${!#} flags the "#" as shDerefWordError [1]; the "!prefix"
syntax region delegates to one of the shDerefSpecial handlers via
@shDerefList, but it misses the "#" case as valid for ${##} and ${!#}.
[1]: https://vi.stackexchange.com/q/48617/10604
Correct that. Indirection is only valid in Bash in Ksh, so rearrange the
"!" handling to be conditional.
closes: #20016
Helped-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Also:
- drop a few trailing whitespaces
- mark the oneline keyword for :syn keyword as error in the
Vim syntax script, add tests for it.
closes: #20018
Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Enabling modelines poses a risk, cannot whitelist specific
modelines
Solution: Include the 'modelinestrict' option, enabled by default, that
allows only a few very specific modelines, all others will be
ignored
When set (which it is by default), only the following settings will be
applied, all others will be ignored:
'autoindent'
'cindent'
'commentstring'
'expandtab'
'filetype'
'foldcolumn'
'foldenable'
'foldmethod'
'modifiable'
'readonly'
'rightleft'
'shiftwidth'
'smartindent'
'softtabstop'
'spell'
'spelllang'
'tabstop'
'textwidth'
'varsofttabstop'
'vartabstop'
Supported by AI
closes: #19875
Signed-off-by: Christian Brabandt <cb@256bit.org>
- remove `set isk+=-` to highlight `-=` operator correctly
- implement highlighting of GID
- fix highlight of hostname and add special value ALL
- fix highlight of IP address
- update include and includedir patterns
- remove duplicate syntax rules
- add missing options
- fix highlight of parameter assignment (limit operators to list
parameters)
- fix highlight of string and list parameters with trailing whitespaces
- implement highlight of permission (octal)
- implement highlight of floating point numbers
- implement highlight of timeout-specific options
- support highlight of negatable options (integer, mode, float, timeout,
string)
- allow sudoersListParameter to be negated
- fix highlight of comma-separated parameter list used as boolean
- fix highlight of parameter negation (prevent highlighting ill-formed `! !`)
- fix highlight of Tag_Spec
- allow empty Runas spec: `()` and `(:)`
- fix highlight of comma-concatenated commands, hosts, and users
- check word boundaries for special value ALL
- implement highlight of Option_Spec
- fix highlight in User_Spec (specifically for Host position)
- fix highlight of `Default!` command
- support highlight of digests (sha224, etc.)
- add syntax test and update header
closes: #19634
Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Support all GNU address extensions.
- Fix some bugs related to erroneous matching of pattern delimiters in
bracket expressions.
closes: #19587
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Attempt to match all variations of group name and comma separator across
continuation lines.
Fixes issues:
- #18491 (Two ")"s are incorrectly colored 'vimOperError' in
syntax/mail.vim), reported by @lkintact
- #19366 (highlight error for contains elements in a new line), reported
by Maxim Kim
fixes: #18491fixes: #19366
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
The input files with syntax test cases are never compiled or
interpreted on behalf of test runners, just read, and their
parts are rendered in accordance with syntax definitions for
associated languages, to be compared with previously vetted
renderings. Whether their arbitrary contents will be valid
programs, benign programs, etc., is left for test authors to
decide and verify in their own environments. As executable
and non-executable files equally qualify for testing and yet
executability is never exercised, and since maintaining
executable files turns out to be a short-lived exception
than common practice, let us persist in keeping syntax files
non-executable and enforce it with a CI check.
closes: #19433
Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Remove `nextgroup=shComment` from the `shEscape` syntax pattern.
This was causing `#` characters after escape sequences inside
double-quoted strings to be misinterpreted as comments, breaking
highlighting for the rest of the file.
Add a test case for escaped characters followed by # in double quotes.
fixes: #19053closes: #19414
Signed-off-by: Bozhidar Batsov <bozhidar@batsov.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Amend syntax highlighting to allow for ksh93 discipline function names
(e.g. 'foo.get()') and mksh's odd function naming idiosyncrasies
(shNamespaceOne was introduced to enforce stricter naming rules for
ksh93 namespaces).
- Remove 'bind' from ksh93 syntax (such a builtin has never been
implemented in ksh93).
- 'xgrep' is only available in ksh93v- as an alternative way to
invoke the builtin 'grep -X', so reflect that in the syntax
highlighting.
- Forbid bash-style 'function name() {' syntax when highlighting
ksh88 and ksh93 scripts.
- Fix bug causing ' ()' to be incorrectly validated in mksh scripts.
- Add the many ksh93/ksh2020 .sh.* variables to the list of special
variables.
- Amend iskeyword to allow '.' so that '.sh.tilde.get' and such are
valid function names/variable names. (For mksh functions starting
with odd characters like '%' and '@' this would probably have too
many bad side effects, so I've omitted such a change for that shell.)
- Add new syntax tests and regenerate syntax dump files
closes: #19383
Signed-off-by: Johnothan King <johnothanking@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Change syntax file maintainer.
- Add Guile and Python command highlighting.
- Update command list to version 12.
- Add foldable regions for the commands 'define', 'if' and 'while'
multiline commands.
- Support documented partial command names.
- Add matchit, browsefilter, and comment formatting support.
- Support embedded C in compiler {code|print} commands.
- Add largely complete settings highlighting and folding.
- Add syntax tests (incomplete).
Thanks to Claudio Fleiner for many years of maintenance.
closes: #10649
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Also add syntax tests for those newly constants.
closes: #17788closes: #18922
Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: skhd files are not recognized
Solution: Detect .skhdrc and skhdrc as skhd filetype,
include a syntax and filetype plugin, add syntax tests
(Kiyoon Kim)
Add syntax highlighting for skhd (simple hotkey daemon for macOS)
configuration files. Includes filetype detection for skhdrc and
.skhdrc files.
Reference:
- https://github.com/asmvik/skhdcloses: #19235
Signed-off-by: Kiyoon Kim <kiyoon@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: tests: sh_10 fails on MacOS runners (after 16c2279062)
because dash does not exist on MacOS
Solution: Force the test to use bash shebang line
Signed-off-by: Christian Brabandt <cb@256bit.org>
Add links to the example page at cppreference.com used for these tests
as per their licensing requirements.
closes: #19192
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: The :help command lacks command termination tests.
Solution: Add tests for command termination at "|", "^M" and "^J".
- Check special handling of "|" in arguments.
- Update the Vim syntax file.
closes: #18932
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Makefile syntax highlighting incorrectly ends function calls
when encountering ')' inside double or single quoted strings,
causing incorrect highlighting for the remainder of the line.
Solution: Add makeDString and makeSString to the contains list for
makeIdent regions. This allows strings to be recognized inside
variable references and function calls.
fixes: #18687closes: #18818
Signed-off-by: Beleswar Prasad Padhi <beleswarprasad@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Partially revert 2a33b499a3, where all
syn match makeIdent are moved before syn region makeIdent to match $()
(reason: see https://github.com/vim/vim/pull/18403#issuecomment-3341161566)
However this results in https://github.com/vim/vim/issues/18890 ,
because lines like
`$(a) =`
will first start a region search beginning with `$(`
but then the whole target including `)` will be matched by
`syn match makeIdent "^ *[^:#= \t]*\s*="me=e-1`
which leaves the region search for the never-found `)` and let the
region matching overflow.
Same for
`$(a) ::`
`$(a) +=`
The solution is to move those greedy target match back, so they take
priority and prevents region match from happening.
fixes: #18890closes: #18938
Signed-off-by: Yiyang Wu <xgreenlandforwyy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- Match \dE\d real literal form
- Match all string escape sequences
- Add related tests
closes: #18723
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: filetype: Erlang lexical files are not recognized
Solution: Detect *.xrl files as leex filetype, include syntax and
filetype plugins (Jon Parise).
leex is the lexical analyzer generator for Erlang. Its input file format
follows a section-based structure and uses the `.xrl` file extension.
This initial work includes file detection, an ftplugin (which inherits
the Erlang configuration), and a syntax definition.
Reference:
- https://www.erlang.org/doc/apps/parsetools/leex.html
related: #18819closes: #18832
Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Csaba Hoch <csaba.hoch@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Add a test for issue #18776 (allow spaces in backticked operators).
closes: #18783
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Match full :debug, :breakadd, :breakdel and :breaklist commands.
closes: #18748
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Match "object" and "<" ... ">" separately with dedicated syntax groups
to allow for highlighting distinct from that generally used for types.
closes: #18721
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Only terminate the :augroup END argument at whitespace, comments and
trailing bars.
closes: #18711
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Match the Ex command arg to all :*do commands.
closes: #18700
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>