To check for an existing HelpComplete function, exists('*HelpComplete')
should be used, as exists('HelpComplete') still returns 0 after sourcing
the ftplugin.
closes: #20073
Signed-off-by: zeertzjq <zeertzjq@outlook.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>
Problem: filetype: ghostty config files are not recognized
Solution: Detect ghostty configuration files as ghostty filetype,
include a simple ghostty filetype plugin (Bez Hermoso)
closes: #20002
Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Bez Hermoso <me@bez.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Add a minimal ftplugin `runtime/ftplugin/yara.vim` that sets:
- `commentstring` for YARA line comments (`//`)
- `comments` for YARA block comment (`/* */`)
- `formatoptions` to wrap comment lines and continue comment after newlines
This was heavily inspired from `runtime/ftplugin/c.vim`
closes: #19736
Signed-off-by: Thomas Dupuy <thom4s.d@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
- ftplugin(sshdconfig): use "-I" for 'keywordprg' to search
case-insensitive in the man page
- syntax(sshdconfig,sshconfig): Mark "lowdelay", "throughput", and
"reliability" as deprecated for IPQoS, highlighting them as
errors/warnings to reflect OpenSSH 10.1p1 release
Reference:
https://www.openssh.org/releasenotes.html#10.1p1closes: #19636
Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Jakub Jelen <jakuje@gmail.com>
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>
Problem: There is a xkb syntax, but no filetype plugin.
Solution: Create a filetype plugin and set the comment and commentstring
options for the xkb filetype (xkb = X keyboard extension)
closes: #19537
Signed-off-by: GX <59413576+gx089@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Patch 9.2.0033 (#19260) introduced a dedicated `env` filetype for
.env files, which were previously detected as `sh`. This left env
files without `commentstring`, `comments`, or `formatoptions` since
no ftplugin was added alongside the new filetype.
Add runtime/ftplugin/env.vim to set these options, matching the
behavior that .env files had when they used the `sh` filetype.
closes: #19522
Signed-off-by: snelling-a <72226000+snelling-a@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Effective use of 'formatprg' requires both an understanding of the
specific capabilities of the formatting tool and Vim's formatting
commands. This is overly burdensome for some users.
Rather than address each complaint on a filetype by filetype basis,
remove 'formatprg' settings from all ftplugins.
It is expected that formatter plugins will be available in the near
future as a better solution. See #17145 (Add "formatter" feature using
"compiler" as a template).
Note: 'formatprg' will be removed from older ftplugins after the release
of Vim 9.2. The setting was added to the go and gleam ftplugins during
the current development cycle and have not been included in a Vim
release.
See: #18650 (rust.vim: stop setting formatprg to rustfmt)
closes: #19108
Signed-off-by: Doug Kearns <dougkearns@gmail.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>
When using vim9-syntax plugin, :VimKeywordPrg does not lookup functions
correctly, as it relies solely on syntax names to find the help topic.
The syntax keyword used for builtin function is vi9FuncNameBuiltin in
vim9-syntax plugin, not vimFuncName expected by :VimKeywordPrg, so the
fallback rules apply, and there is no fallback rule for function calls.
Fix by just checking if the first char after topic is '(', and if so
assume help topic is a function.
closes: #19320
Signed-off-by: Mark Woods <mwoods.online.ie@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Add "-" to iskeyword. This required a change to the syntax files too
because they were using the word begin and end atoms.
closes: #17259
Co-authored-by: Teemu Ikonen <tpikonen@mailbox.org>
Co-authored-by: A4-Tacks <wdsjxhno1001@163.com>
Signed-off-by: Aman Verma <amanraoverma@gmail.com>
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>
- Allow for an unparenthesised expression argument to the 'if',
'if-then', and 'while' commands. This is undocumented, and probably
unintended, behaviour but is frequently seen in the wild.
- Allow for a continued-line expression argument to the 'if-then'
command.
related: #19172 (csh: Support negated if in matchit)
closes: #19190
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Currently, the matchit configuration chokes on valid syntax like:
```csh
if !(true) then
true
endif
```
Make sure the negation syntax is supported.
closes: #19172
Signed-off-by: Simão Afonso <simao.afonso@powertools-tech.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Add .rst to suffixesadd. This allows gf and similar commands to work for
rst documentation such as in the linux kernel Documentation.
closes: #19149
Signed-off-by: Anakin Childerhose <anakin@childerhose.ca>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This update is meant to be included in the upcoming 9.2 release.
**New**
- Support ConTeXt's convention to optionally specify an output directory
in a comment line at the beginning of a source file.
- If a log file is not found, Vim does not create a new buffer.
- Removed `syntax/shared` files for the following reasons:
- they are not necessary for the plugin to work (they only improve
over existing syntax highlighting);
- they are relative large;
- they can be automatically (re)generated by users at any time using
ConTeXt (explained in the doc);
- since ConTeXt is updated frequently, they quickly become obsolete.
**Minor**
- Prefer `var` to `const` inside functions.
- Prefer `$`-interpolation to `printf()`.
- All revision dates set to the same date for consistency.
- Updated the error format.
- Various tweaks to the documentation, but nothing disruptive or new.
closes: #19148
Signed-off-by: Lifepillar <lifepillar@lifepillar.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Only set fileformat=dos for new files; preserve existing line endings
when editing. This satisfies RFC 5228 for new files while avoiding
issues with version control and existing workflows.
The previous change (3cb4148) unconditionally set fileformat=dos, which
converts existing files with LF line endings to CRLF on save. This
causes issues with version control (entire file appears changed) and
breaks workflows where sieve files are stored with unix line endings.
Dovecot Pigeonhole (the main sieve implementation) has explicitly
accepted LF line endings since 2008 (commit 97b967b5):
/* Loose LF is allowed (non-standard) and converted to CRLF */
This behavior has remained unchanged for almost 18 years.
closes: #19144
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Signed-off-by: André-Patrick Bubel <code@apb.name>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This reverts commits:
- 6b652a7850
- 2f689d5abd
- a025a46d41
Several email addresses that are known to be valid caused bounces
due to an issue with my email setup. The previous commits incorrectly
marked these addresses as invalid. So revert the whole thing again.
Signed-off-by: Christian Brabandt <cb@256bit.org>
Problem: Comment formatting does not work by default for bpftrace.
Solution: Change default 'formatoptions' similarly as C and many other
languages.
closes: #18996
Signed-off-by: Stanislaw Gruszka <stf_xl@wp.pl>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Port changes from JuliaEditorSupport/julia-vim made during 2022-2025.
Most notably:
- 88f178c Do not reset shiftwidth/expandtab at undo
- f17257a Allow else block in try/catch
- 7946ce3 Support public statements (added in Julia v1.11.0-DEV.469)
Signed-off-by: Sergio Alejandro Vargas <savargasqu+git@unal.edu.co>
Signed-off-by: Christian Brabandt <cb@256bit.org>