Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Added Purescript language and Pulp syntax checker #1531

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions plugin/syntastic/registry.vim
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ let s:_DEFAULT_CHECKERS = {
\ 'po': ['msgfmt'],
\ 'pod': ['podchecker'],
\ 'puppet': ['puppet', 'puppetlint'],
\ 'purescript': ['pulp'],
\ 'python': ['python', 'flake8', 'pylint'],
\ 'qml': ['qmllint'],
\ 'r': [],
Expand Down
52 changes: 52 additions & 0 deletions syntax_checkers/purescript/pulp.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
"============================================================================
"File: pulp.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: Sean Hess <seanhess at gmail dot com>
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
"
"============================================================================

if exists('g:loaded_syntastic_purescript_pulp_checker')
finish
endif
let g:loaded_syntastic_purescript_pulp_checker = 1

let s:save_cpo = &cpo
set cpo&vim

function! SyntaxCheckers_purescript_pulp_GetLocList() dict

let makeprg = self.makeprgBuild({
\ 'exe_after': 'build --main ',
\ 'fname': syntastic#util#shexpand('%:p') })

let errorformat =
\ '%E\\s%#psc: %m,' .
\ '%C\\s%#at \"%f\" \(line %l\, column %c\)%.%#,' .
\ '%E\\s%#\"%f\" \(line %l\, column %c\)%.%#,' .
\ '%E%.%#Error at %f line %l\, column %c - %.%#,'.
\ '%-G\* ERROR: Subcommand%.%#,' .
\ '\* ERROR: %m,' .
\ '%Z\\s%#See http%.%#,' .
\ '%C\\s%#%m,' .
\ '%Z'


return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat })

endfunction

call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'purescript',
\ 'name': 'pulp'})

let &cpo = s:save_cpo
unlet s:save_cpo

" vim: set sw=4 sts=4 et fdm=marker: