vim-patch:17d60ce: runtime(compiler): add compiler plugin for cabal

closes: vim/vim#19152

17d60cee55

Co-authored-by: Mateo Gjika <104777599+mateoxh@users.noreply.github.com>
This commit is contained in:
zeertzjq
2026-01-14 07:12:35 +08:00
parent 3f10748a07
commit 6869d0698f
2 changed files with 45 additions and 1 deletions

View File

@@ -0,0 +1,39 @@
" Vim compiler file
" Compiler: Haskell Cabal Build file
" Maintainer: Mateo Gjika <@mateoxh>
if exists('current_compiler')
finish
endif
let current_compiler = 'cabal'
let s:save_cpo = &cpo
set cpo&vim
CompilerSet makeprg=cabal\ build
CompilerSet errorformat=
\%W%f:(%l\\,%c)-(%e\\,%k):\ %tarning:\ [%.%#],
\%W%f:(%l\\,%c)-(%e\\,%k):\ %tarning:%m,
\%W%f:(%l\\,%c)-(%e\\,%k):\ %tarning:,
\%W%f:%l:%c-%k:\ %tarning:\ [%.%#],
\%W%f:%l:%c-%k:\ %tarning:%m,
\%W%f:%l:%c-%k:\ %tarning:,
\%W%f:%l:%c:\ %tarning:\ [%.%#],
\%W%f:%l:%c:\ %tarning:%m,
\%W%f:%l:%c:\ %tarning:,
\%E%f:(%l\\,%c)-(%e\\,%k):\ %trror:\ [%.%#],
\%E%f:(%l\\,%c)-(%e\\,%k):\ %trror:%m,
\%E%f:(%l\\,%c)-(%e\\,%k):\ %trror:,
\%E%f:%l:%c-%k:\ %trror:\ [%.%#],
\%E%f:%l:%c-%k:\ %trror:%m,
\%E%f:%l:%c-%k:\ %trror:,
\%E%f:%l:%c:\ %trror:\ [%.%#],
\%E%f:%l:%c:\ %trror:%m,
\%E%f:%l:%c:\ %trror:,
\%Z\ %\\+\|%.%#,
\%C%m
let &cpo = s:save_cpo
unlet s:save_cpo

View File

@@ -2,12 +2,17 @@
" Language: Haskell Cabal Build file
" Maintainer: Riley Bruins <ribru17@gmail.com>
" Last Change: 2024 Jul 06
" 2026 Jan 13 by Vim project: set compiler #19152
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1
compiler cabal
let b:undo_ftplugin = 'compiler make'
setl comments=:-- commentstring=--\ %s
let b:undo_ftplugin = 'setl com< cms<'
let b:undo_ftplugin .= '| setl com< cms<'