Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alx741/vim-stylishask
Vim Haskell stylish-haskell integration plugin
https://github.com/alx741/vim-stylishask
haskell stylish-haskell vim
Last synced: 2 months ago
JSON representation
Vim Haskell stylish-haskell integration plugin
- Host: GitHub
- URL: https://github.com/alx741/vim-stylishask
- Owner: alx741
- Created: 2017-09-10T23:03:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-09-10T02:35:35.000Z (over 3 years ago)
- Last Synced: 2024-10-11T23:59:16.313Z (3 months ago)
- Topics: haskell, stylish-haskell, vim
- Language: Vim script
- Homepage:
- Size: 7.81 KB
- Stars: 12
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vim-stylishask
Integrates with [stylish-haskell](https://github.com/jaspervdj/stylish-haskell)
so every time you save a Haskell source file it gets automatically prettified.Simply using `:%!stylish-haskell` replaces your whole source file with an error
message from **stylish-haskell** when you happen to have a syntax error in your
code, this plugin manages that annoyance.*Note:* If you prefer *hindent* use
[vim-hindent](https://github.com/alx741/vim-hindent) instead.## Installation
Compatible with `Vundle`, `Pathogen`, `Vim-plug`.
## Usage
By default, *vim-stylishask* will format your code automatically when saving a
Haskell source file, but you can use the `:Stylishask` command at any time to
format the current file.To apply *stylish-haskell* on a range, either write the range manually or
visually select the desired code and then invoke `:Stylishask`.Use `:StylishaskEnable`, `:StylishaskDisable`, `:StylishaskToggle` to enable,
disable, or toggle running `stylish-haskell` on save.## Configuration
Trigger *stylish-haskell* when saving (default = 1):
```vim
g:stylishask_on_save = 1
```*stylish-haskell* configuration file to use (default = "" == Use default .stylish-haskell.yaml):
```vim
g:stylishask_config_file = "/path/to/.stylish-haskell.yaml"
```Specify the path to the stylish-haskell executable (for example if you
installed stylish-haskell with `stack build --copy-compiler-tool
stylish-haskell`)```vim
g:stylishask_config_file = "~/.stylish-haskell.yaml"
```