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 vim/vim#7354)
a09bee322e
This commit is contained in:
Jan Edmund Lazo
2020-11-24 19:34:48 -05:00
parent 7caa622afc
commit ec53d43f84
2 changed files with 3 additions and 9 deletions

View File

@@ -693,15 +693,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

View File

@@ -200,8 +200,8 @@ let s:filename_checks = {
\ 'gsp': ['file.gsp'],
\ 'gtkrc': ['.gtkrc', 'gtkrc'],
\ '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'],