mirror of
https://github.com/ivuorinen/nvim-shellspec.git
synced 2026-01-26 03:24:00 +00:00
1.0.0
Neovim ShellSpec DSL Support
Language support and formatter for ShellSpec DSL testing framework.
Installation
With lazy.nvim
{
"ivuorinen/nvim-shellspec",
ft = "shellspec",
}
With vim-plug
Plug 'ivuorinen/nvim-shellspec'
Manual Installation
git clone https://github.com/ivuorinen/nvim-shellspec.git ~/.config/nvim/pack/plugins/start/nvim-shellspec
Features
- Syntax highlighting for all ShellSpec DSL keywords
- Automatic indentation for block structures
- Filetype detection for
*_spec.sh,*.spec.sh, andspec/*.sh - Formatting commands with proper indentation
Usage
Commands
:ShellSpecFormat- Format entire buffer:ShellSpecFormatRange- Format selected lines
Auto-format
Add to your config to enable auto-format on save:
let g:shellspec_auto_format = 1
File Types
Plugin activates for files matching:
*_spec.sh*.spec.shspec/*.shtest/*.sh
Configuration
" Enable auto-formatting on save
let g:shellspec_auto_format = 1
" Custom keybindings
autocmd FileType shellspec nnoremap <buffer> <leader>f :ShellSpecFormat<CR>
autocmd FileType shellspec vnoremap <buffer> <leader>f :ShellSpecFormatRange<CR>
Contributing
Contributions welcome! Please open issues and pull requests at: https://github.com/ivuorinen/nvim-shellspec
License
MIT License - see repository for details.
Related
- ShellSpec - BDD testing framework for shell scripts
Languages
Shell
42.9%
Lua
31.5%
Makefile
13%
Vim Script
12.6%