shout/vim/README.md

46 lines
1.1 KiB
Markdown

# shout.vim
Neovim plugin for `.shout` shell integration test files.
## Features
- **Syntax highlighting** for commands, expected output, directives, wildcards, exit codes, and comments
- **`:ShoutRun`** — run the current `.shout` file, results in quickfix
- **`:ShoutUpdate`** — run with `--update` to capture actual output into the file
- **`:ShoutRunAll`** — run all test files
## Install
### lazy.nvim
```lua
{
dir = "~/path/to/shout/vim",
ft = "shout",
}
```
### Manual / symlink
Symlink or copy the `vim/` directory into your nvim runtime path:
```sh
mkdir -p ~/.local/share/nvim/site/pack/shout/start
ln -s /path/to/shout/vim ~/.local/share/nvim/site/pack/shout/start/shout
```
## Syntax elements
| Pattern | Highlight |
|---|---|
| `$ command` | Statement (prompt as Special) |
| `# comment` | Comment |
| `@env KEY=VALUE` | PreProc / Identifier / String |
| `@setup`, `@teardown` | PreProc |
| Expected output | String |
| `...` (wildcard) | WarningMsg |
| `[N]`, `[*]` (exit code) | Constant |
| `\$ ...` (escaped dollar) | SpecialChar + String |
| `\# ...` (escaped hash) | SpecialChar + String |
| `# inline comment` | Comment |