Syntax highlighting and indentation for PureScript
Purescript language support for vim and neovim providing syntax highlighting and indentation based on based on idris-vim and haskell-vim.
See purescript-language-server for details on how to set up language server support for Purescript.
Copy content of this repository into your
~/.vimdirectory (or
%HOME%\vimfileson Windows).
Be sure that the following lines are in your
.vimrc
vim syntax on filetype on filetype plugin indent on
If you are using Pathogen, clone this repo into your
~/.vim/bundledirectory and you are ready to go.
cd ~/.vim/bundle git clone https://github.com/purescript-contrib/purescript-vim.git
If you are using vim-plug, add the following line in between your
plug#beginand
plug#endcalls for your vim config file:
Plug 'purescript-contrib/purescript-vim'
Save and restart (neo)vim and run
:PlugInstall.
To configure indentation in
purescript-vimyou can use the following variables:
Disable indentation altogether.
let g:purescript_disable_indent = 1
let g:purescript_indent_case = 5
case xs of >>>>>[] -> ... >>>>>(y:ys) -> ...
let g:purescript_indent_let = 4
let x = 0 in >>>>x
let g:purescript_indent_in = 1
let x = 0 >in x
let g:purescript_indent_where = 6
where f :: Int -> Int >>>>>>f x = x
let g:purescript_indent_do = 3
do x >>yg:purescriptindentdot
let g:purescript_indent_dot = 1unsnoc :: forall a >. List a -> Maybe (List a, a)Contributing
Contributing checklist:
generate-doc.shto re-generate the documentation