>_EXECUTIVE SUMMARY
vim-stryke is the Vim / Neovim editor support for stryke — a highly parallel Perl 5 interpreter written in Rust (a Perl 5 superset). It ships as a standard Vim runtime tree (ftdetect/, syntax/, indent/, ftplugin/, plugin/, doc/), so pathogen / vim-plug / native packages add it to runtimepath with no special handling.
Design principle: the syntax file is a standalone stryke grammar, not a reskin of Vim's perl syntax. It is generated (scripts/gen_syntax.sh) directly from the stryke binary's own reflection tables — the %k keyword table, the %b builtin table, and the $c{parallel} category — so it carries the complete language surface (all 10,407 builtins) and never drifts. Regenerate after a stryke upgrade.
~RUNTIME LAYOUT
Standard Vim runtime directories. Each file is loaded automatically when the plugin is on runtimepath; no entry point or sourcing call is required.
| File | Responsibility |
|---|---|
ftdetect/stryke.vim | Sets filetype=stryke for *.stk files and for any file whose first line is a stryke shebang (e.g. #!/usr/bin/env stryke). |
syntax/stryke.vim | Standalone stryke grammar (generated) — comments / POD, numbers, sigil variables, strings / here-docs / regex, all 10,407 builtins + keywords / types / operators, linked to standard highlight groups. |
indent/stryke.vim | Standalone indentexpr (GetStrykeIndent()) — indents after a line opening a block / paren / bracket, dedents lines starting with a closing delimiter. |
ftplugin/stryke.vim | Buffer-local options: commentstring=# %s, comments=:#, comment-continuation formatoptions, with a matching b:undo_ftplugin. |
plugin/stryke.vim | Global wiring: ALE linter definition, vim-lsp server registration, coc snippet (commented), and the g:vim_stryke_no_ale / g:vim_stryke_no_lsp opt-outs, behind a load guard. |
doc/stryke.txt | Vim help (:help vim-stryke) with tagged sections for install, detection, syntax, linting, LSP, and options. |
$SYNTAX COVERAGE
Token categories taken verbatim from the official stryke lexer category sets. Thread macros (~>, ~>> / ->>, |>, and the streaming ~s> / parallel ~p> / distributed ~d> variants) are first-class stryke operators and are highlighted.
| Group | Tokens (sample) | Highlight link |
|---|---|---|
| Declarations | my var val our local state const typed use package pub is as | StorageClass |
| Function / type introducers | fn sub method class trait struct enum impl extends | Keyword |
| Control flow | if elsif else unless while until loop for match when try catch finally defer | Statement |
| Phase / block hooks | BEGIN END INIT CHECK UNITCHECK BUILD DESTROY | PreProc |
| Word operators | and or not xor cmp eq ne lt le gt ge x | Operator |
| Parallel builtins (39) | pmap pgrep pfor ploop pwhile pchannel preduce fan par_walk | Function |
| Builtins (10,407) | p say print map grep reduce json_encode sha256 fetch ai a_law_decode | Function |
| Type names (12) | Int Str Float Bool Num Any Array Hash List Map Set Void | Type |
| Literals & vars | sigils ($/@/%), $_ topic, special vars, strings, here-docs, m///s////tr////qr// regex, numbers | String / Number / Identifier |
#TOOLING INTEGRATION
All three integrations degrade gracefully: each is guarded so the plugin loads cleanly whether or not ALE / vim-lsp / coc is installed. CLI flags verified against stryke --help (v0.17.22).
| Integration | Mechanism |
|---|---|
| ALE | Registers a linter via ale#linter#Define running stryke --lint %t; the handler parses <message> at <file> line <n> into error items. Skipped if ALE is absent or g:vim_stryke_no_ale is set. |
| vim-lsp | Registers a server (lsp#register_server) running stryke --lsp, allowlisted for the stryke and perl filetypes. Skipped if vim-lsp is absent or g:vim_stryke_no_lsp is set. |
| coc.nvim | A ready-to-paste languageserver block for coc-settings.json using stryke --lsp, documented in the plugin source and README. |
@COMPATIBILITY
| Target | Status |
|---|---|
| Vim 8+ | Filetype, syntax, indent, ftplugin, doc |
| Neovim | Same runtime files (no Lua required) |
| pathogen / vim-plug / native packages | Standard runtime layout — no plugin-manager-specific handling |
| ALE | stryke --lint linter |
| vim-lsp | stryke --lsp server |
| coc.nvim | languageserver config provided |