1
0
forked from aniani/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)
This commit is contained in:
Bram Moolenaar
2020-11-24 20:13:26 +01:00
parent c9f8b849b6
commit a09bee322e
3 changed files with 5 additions and 9 deletions

View File

@@ -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\>\|\<module\>\)') != -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