Syntax highlighting and indentation for Purescript based on idris-vim and haskell-vim.
I recommend using Pathogen for installation. Simply clone
this repo into your ~/.vim/bundle directory and you are ready to go.
cd ~/.vim/bundle
git clone https://github.com/purescript-contrib/purescript-vim.git
Copy content into your ~/.vim directory (or %HOME%\vimfiles on Windows).
Be sure that the following lines are in your
.vimrc
syntax on
filetype on
filetype plugin indent on
To configure indentation in purescript-vim you can use the following variables:
-
let purescript_indent_if = 3if bool >>>then ... >>>else ... -
let purescript_indent_case = 5case xs of >>>>>[] -> ... >>>>>(y:ys) -> ... -
let purescript_indent_let = 4let x = 0 in >>>>x -
let purescript_indent_where = 6where f :: Int -> Int >>>>>>f x = x -
let purescript_indent_do = 3do x <- a >>>y <- b -
let purescript_indent_in = 1let x = 0
in x
-
let purescript_indent_dot = v:trueunsnoc :: forall a >. List a -> Maybe (List a, a)