A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/neovimhaskell/haskell-vim below:

GitHub - neovimhaskell/haskell-vim: Custom Haskell Vimscripts

Syntax Highlighting and Indentation for Haskell and Cabal

I was unhappy with the Haskell scripts that are shipped with vim, therefore I decided to make my own based on idris-vim.

I hope you find this useful.

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/neovimhaskell/haskell-vim.git

Be sure that the following lines are in your .vimrc

syntax on
filetype plugin indent on

Copy content into your ~/.vim directory.

To enable the features you would like to use, just add the according line to your .vimrc.

let g:haskell_enable_quantification = 1   " to enable highlighting of `forall`
let g:haskell_enable_recursivedo = 1      " to enable highlighting of `mdo` and `rec`
let g:haskell_enable_arrowsyntax = 1      " to enable highlighting of `proc`
let g:haskell_enable_pattern_synonyms = 1 " to enable highlighting of `pattern`
let g:haskell_enable_typeroles = 1        " to enable highlighting of type roles
let g:haskell_enable_static_pointers = 1  " to enable highlighting of `static`
let g:haskell_backpack = 1                " to enable highlighting of backpack keywords

haskell-vim has an opinionated highlighting. If you do not like that you can switch to a more traditional mode by setting g:haskell_classic_highlighting to 1.

Disabling Template Haskell and Quasiquoting syntax is possible by setting g:haskell_disable_TH to 1.

To configure indentation in haskell-vim you can use the following variables to change indentation depth, just add the according line to your .vimrc.

If you dislike how indentation works you can disable it by setting g:haskell_indent_disable to 1.

Additionally you can use the vim-hindent plugin to achieve automatic indentation using hindent.

haskell-vim also supports an alterative style for case indentation.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4