runtime(compiler): add compiler plugin for cabal

Commit: 
https://github.com/vim/vim/commit/17d60cee555ec36e62492793159f9051218a6bd9
Author: Mateo Gjika <[email protected]>
Date:   Tue Jan 13 21:37:46 2026 +0000

    runtime(compiler): add compiler plugin for cabal
    
    closes: https://github.com/vim/vim/issues/19152
    
    Signed-off-by: Mateo Gjika <[email protected]>
    Signed-off-by: Christian Brabandt <[email protected]>

diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS
index 733c9af1c..274482d08 100644
--- a/.github/MAINTAINERS
+++ b/.github/MAINTAINERS
@@ -48,6 +48,7 @@ runtime/colors/wildcharm.vim                          
@habamax @romainl @neutaaaaan
 runtime/colors/zaibatsu.vim                            @habamax @romainl 
@neutaaaaan
 runtime/colors/zellner.vim                             @habamax @romainl 
@neutaaaaan
 runtime/compiler/biome.vim                             @Konfekt
+runtime/compiler/cabal.vim                             @mateoxh
 runtime/compiler/checkstyle.vim                                @dkearns
 runtime/compiler/cm3.vim                               @dkearns
 runtime/compiler/context.vim                           @lifepillar
diff --git a/runtime/compiler/cabal.vim b/runtime/compiler/cabal.vim
new file mode 100644
index 000000000..02d4d9b8e
--- /dev/null
+++ b/runtime/compiler/cabal.vim
@@ -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
diff --git a/runtime/ftplugin/cabal.vim b/runtime/ftplugin/cabal.vim
index 5ccfa1df7..e7e4ab18a 100644
--- a/runtime/ftplugin/cabal.vim
+++ b/runtime/ftplugin/cabal.vim
@@ -2,12 +2,17 @@
 " Language:    Haskell Cabal Build file
 " Maintainer:  Riley Bruins <[email protected]>
 " 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<'

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1vfmCH-00BWsU-K6%40256bit.org.

Raspunde prin e-mail lui