mirror of
https://github.com/amix/vimrc
synced 2025-07-06 07:55:00 +08:00
prefinal close
This commit is contained in:
@ -0,0 +1,46 @@
|
||||
"============================================================================
|
||||
"File: ghc-mod.vim
|
||||
"Description: Syntax checking plugin for syntastic.vim
|
||||
"Maintainer: Anthony Carapetis <anthony.carapetis 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_haskell_ghc_mod_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_haskell_ghc_mod_checker = 1
|
||||
|
||||
function! SyntaxCheckers_haskell_ghc_mod_IsAvailable()
|
||||
return executable('ghc-mod')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_haskell_ghc_mod_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'ghc-mod check',
|
||||
\ 'filetype': 'haskell',
|
||||
\ 'subchecker': 'ghc_mod' })
|
||||
|
||||
let errorformat =
|
||||
\ '%-G%\s%#,' .
|
||||
\ '%f:%l:%c:%trror: %m,' .
|
||||
\ '%f:%l:%c:%tarning: %m,'.
|
||||
\ '%f:%l:%c: %trror: %m,' .
|
||||
\ '%f:%l:%c: %tarning: %m,' .
|
||||
\ '%f:%l:%c:%m,' .
|
||||
\ '%E%f:%l:%c:,' .
|
||||
\ '%Z%m'
|
||||
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'postprocess': ['compressWhitespace'] })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'haskell',
|
||||
\ 'name': 'ghc_mod'})
|
@ -0,0 +1,46 @@
|
||||
"============================================================================
|
||||
"File: hdevtools.vim
|
||||
"Description: Syntax checking plugin for syntastic.vim
|
||||
"Maintainer: Anthony Carapetis <anthony.carapetis 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_haskell_hdevtools_checker")
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_haskell_hdevtools_checker=1
|
||||
|
||||
function! SyntaxCheckers_haskell_hdevtools_IsAvailable()
|
||||
return executable('hdevtools')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_haskell_hdevtools_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'hdevtools check',
|
||||
\ 'args': get(g:, 'hdevtools_options', ''),
|
||||
\ 'filetype': 'haskell',
|
||||
\ 'subchecker': 'hdevtools' })
|
||||
|
||||
let errorformat= '\%-Z\ %#,'.
|
||||
\ '%W%f:%l:%c:\ Warning:\ %m,'.
|
||||
\ '%E%f:%l:%c:\ %m,'.
|
||||
\ '%E%>%f:%l:%c:,'.
|
||||
\ '%+C\ \ %#%m,'.
|
||||
\ '%W%>%f:%l:%c:,'.
|
||||
\ '%+C\ \ %#%tarning:\ %m,'
|
||||
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'postprocess': ['compressWhitespace'] })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'haskell',
|
||||
\ 'name': 'hdevtools'})
|
||||
|
@ -0,0 +1,36 @@
|
||||
"============================================================================
|
||||
"File: hlint.vim
|
||||
"Description: Syntax checking plugin for syntastic.vim
|
||||
"Maintainer: Nicolas Wu <nicolas.wu at gmail dot com>
|
||||
"License: BSD
|
||||
"============================================================================
|
||||
|
||||
if exists('g:loaded_syntastic_haskell_hlint_checker')
|
||||
finish
|
||||
endif
|
||||
let g:loaded_syntastic_haskell_hlint_checker = 1
|
||||
|
||||
function! SyntaxCheckers_haskell_hlint_IsAvailable()
|
||||
return executable('hlint')
|
||||
endfunction
|
||||
|
||||
function! SyntaxCheckers_haskell_hlint_GetLocList()
|
||||
let makeprg = syntastic#makeprg#build({
|
||||
\ 'exe': 'hlint',
|
||||
\ 'filetype': 'haskell',
|
||||
\ 'subchecker': 'hlint' })
|
||||
|
||||
let errorformat =
|
||||
\ '%E%f:%l:%c: Error: %m,' .
|
||||
\ '%W%f:%l:%c: Warning: %m,' .
|
||||
\ '%C%m'
|
||||
|
||||
return SyntasticMake({
|
||||
\ 'makeprg': makeprg,
|
||||
\ 'errorformat': errorformat,
|
||||
\ 'postprocess': ['compressWhitespace'] })
|
||||
endfunction
|
||||
|
||||
call g:SyntasticRegistry.CreateAndRegisterChecker({
|
||||
\ 'filetype': 'haskell',
|
||||
\ 'name': 'hlint'})
|
Reference in New Issue
Block a user