diff options
author | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-11-24 19:34:48 -0500 |
---|---|---|
committer | Jan Edmund Lazo <jan.lazo@mail.utoronto.ca> | 2020-11-24 22:03:36 -0500 |
commit | ec53d43f844149f191ae23300db663436eda6d72 (patch) | |
tree | b0532f4709c51a738c3b9a98bb1dfaf6316248f9 | |
parent | 7caa622afcbbc1f789c24a3f29525759486208da (diff) | |
download | rneovim-ec53d43f844149f191ae23300db663436eda6d72.tar.gz rneovim-ec53d43f844149f191ae23300db663436eda6d72.tar.bz2 rneovim-ec53d43f844149f191ae23300db663436eda6d72.zip |
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)
https://github.com/vim/vim/commit/a09bee322e605c8a076fa23c3d3259495a1129d2
-rw-r--r-- | runtime/filetype.vim | 8 | ||||
-rw-r--r-- | src/nvim/testdir/test_filetype.vim | 4 |
2 files changed, 3 insertions, 9 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 4e54bcaefd..b9d2a43d5d 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -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 diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index ed75bda7a5..52b5884c8b 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -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'], |