From: Bram Moolenaar Date: Tue, 24 Nov 2020 19:13:26 +0000 (+0100) Subject: patch 8.2.2041: haskell filetype not optimally recognized X-Git-Tag: v8.2.2041 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a09bee322e605c8a076fa23c3d3259495a1129d2;p=vim patch 8.2.2041: haskell filetype not optimally recognized Problem: Haskell filetype not optimally recognized. Solution: Recognize all *.hsc files as Haskell. (Marcin Szamotulski, closes #7354) --- diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 35b73f929..3073c9a6b 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -697,15 +697,9 @@ au BufNewFile,BufRead *.haml setf haml " Hamster Classic | Playground files au BufNewFile,BufRead *.hsm setf hamster -au BufNewFile,BufRead *.hsc - \ if match(join(getline(1,10), "\n"), '\%(^\|\n\)\s*\%({-#\_s*LANGUAGE\>\|\\)') != -1 | - \ setf haskell | - \ else | - \ setf hamster | - \ endif " Haskell -au BufNewFile,BufRead *.hs,*.hs-boot setf haskell +au BufNewFile,BufRead *.hs,*.hsc,*.hs-boot setf haskell au BufNewFile,BufRead *.lhs setf lhaskell au BufNewFile,BufRead *.chs setf chaskell au BufNewFile,BufRead cabal.project setf cabalproject diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index f3f622eb4..15ba59ae9 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -204,8 +204,8 @@ let s:filename_checks = { \ 'gsp': ['file.gsp'], \ 'gtkrc': ['.gtkrc', 'gtkrc', '.gtkrc-file', 'gtkrc-file'], \ 'haml': ['file.haml'], - \ 'hamster': ['file.hsc', 'file.hsm'], - \ 'haskell': ['file.hs', 'file.hs-boot'], + \ 'hamster': ['file.hsm'], + \ 'haskell': ['file.hs', 'file.hsc', 'file.hs-boot'], \ 'haste': ['file.ht'], \ 'hastepreproc': ['file.htpp'], \ 'hb': ['file.hb'], diff --git a/src/version.c b/src/version.c index 19757ca05..ab2300bd4 100644 --- a/src/version.c +++ b/src/version.c @@ -750,6 +750,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 2041, /**/ 2040, /**/