Commit: runtime(cabal): Update compiler, ftplugin, syntax, add indent script

0 views
Skip to first unread message

Christian Brabandt

unread,
4:45 PM (5 hours ago) 4:45 PM
to vim...@googlegroups.com
runtime(cabal): Update compiler, ftplugin, syntax, add indent script

Commit: https://github.com/vim/vim/commit/91023adc67e13158ae1462485a400de787f7aefe
Author: Mateo Gjika <10477759...@users.noreply.github.com>
Date: Fri Jun 26 20:29:50 2026 +0000

runtime(cabal): Update compiler, ftplugin, syntax, add indent script

closes: https://github.com/vim/vim/issues/20623

Signed-off-by: Mateo Gjika <10477759...@users.noreply.github.com>
Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/.github/MAINTAINERS b/.github/MAINTAINERS
index 10f8ecbac..f2200c4ac 100644
--- a/.github/MAINTAINERS
+++ b/.github/MAINTAINERS
@@ -370,6 +370,7 @@ runtime/indent/basic.vim @dkearns
runtime/indent/beancount.vim @nathangrigg
runtime/indent/bpftrace.vim @sgruszka
runtime/indent/bst.vim @tpope
+runtime/indent/cabal.vim @mateoxh
runtime/indent/cdl.vim @dkearns
runtime/indent/chatito.vim @ObserverOfTime
runtime/indent/clojure.vim @axvr
diff --git a/runtime/compiler/cabal.vim b/runtime/compiler/cabal.vim
index 02d4d9b8e..3590e93e3 100644
--- a/runtime/compiler/cabal.vim
+++ b/runtime/compiler/cabal.vim
@@ -33,7 +33,8 @@ CompilerSet errorformat=
\%E%f:%l:%c:\ %trror:%m,
\%E%f:%l:%c:\ %trror:,
\%Z\ %\+\|%.%#,
- \%C%m
+ \%C%m,
+ \%-G%.%#

let &cpo = s:save_cpo
unlet s:save_cpo
diff --git a/runtime/ftplugin/cabal.vim b/runtime/ftplugin/cabal.vim
index e7e4ab18a..91b929893 100644
--- a/runtime/ftplugin/cabal.vim
+++ b/runtime/ftplugin/cabal.vim
@@ -3,16 +3,16 @@
" Maintainer: Riley Bruins <rib...@gmail.com>
" Last Change: 2024 Jul 06
" 2026 Jan 13 by Vim project: set compiler #19152
+" 2026 Jun 26 by Vim project: set expandtab #20623

if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = 1

-compiler cabal
-
-let b:undo_ftplugin = 'compiler make'
+setlocal expandtab
+setlocal comments=:-- commentstring=--\ %s

-setl comments=:-- commentstring=--\ %s
+compiler cabal

-let b:undo_ftplugin .= '| setl com< cms<'
+let b:undo_ftplugin = 'compiler make | setlocal com< cms< et<'
diff --git a/runtime/indent/cabal.vim b/runtime/indent/cabal.vim
new file mode 100644
index 000000000..3faaa6def
--- /dev/null
+++ b/runtime/indent/cabal.vim
@@ -0,0 +1,100 @@
+" Vim indent file
+" Language: Haskell Cabal Build file
+" Maintainer: Mateo Gjika <@mateoxh>
+
+if exists('b:did_indent')
+ finish
+endif
+
+let b:did_indent = 1
+
+setlocal indentexpr=GetCabalIndent()
+setlocal indentkeys=!^F,o,O,e,0=elif,<:>
+
+let b:undo_indent = 'setlocal inde< indk<'
+
+let s:save_cpo = &cpo
+set cpo&vim
+
+function! GetCabalIndent() abort
+ let categories = '
Reply all
Reply to author
Forward
0 new messages