purescript-vim

by purescript-contrib

purescript-contrib / purescript-vim

Syntax highlighting and indentation for PureScript

130 Stars 25 Forks Last release: about 3 years ago (v1.0.0) BSD 2-Clause "Simplified" License 81 Commits 1 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Purescript Syntax/Indentation

Syntax highlighting and indentation for Purescript based on idris-vim and haskell-vim.

Installation

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

Manual Installation

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

Configuration

Indentation

To configure indentation in

purescript-vim
you can use the following variables:
  • let purescript_indent_if = 3
    if bool
    >>>then ...
    >>>else ...
    
  • let purescript_indent_case = 5
    case xs of
    >>>>>[]     -> ...
    >>>>>(y:ys) -> ...
    
  • let purescript_indent_let = 4
    let x = 0 in
    >>>>x
    
  • let purescript_indent_where = 6
    where f :: Int -> Int
    >>>>>>f x = x
    
  • let purescript_indent_do = 3
    do x >>y 
  • let purescript_indent_in = 1

    let x = 0

    in x

  • let purescript_indent_dot = v:true

    unsnoc :: forall a

    . List a -> Maybe (List a, a)

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.