From ba583f820655d3d7cf4c85854c0359c54d49ae5a Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Wed, 29 Jun 2022 16:21:04 +0200 Subject: [PATCH] vim-patch:9.0.0005: hare files are not recognized (#19151) Problem: Hare files are not recognized. Solution: Add a filetype pattern. (Hugo Osvaldo Barrera, closes vim/vim#10630) https://github.com/vim/vim/commit/040674129f3382822eeb7b590380efa5228124a8 --- runtime/filetype.vim | 3 +++ runtime/lua/vim/filetype.lua | 1 + src/nvim/testdir/test_filetype.vim | 1 + 3 files changed, 5 insertions(+) diff --git a/runtime/filetype.vim b/runtime/filetype.vim index ed17002733..5ec49deb71 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -785,6 +785,9 @@ au BufNewFile,BufRead *.hsm setf hamster " Handlebars au BufNewFile,BufRead *.hbs setf handlebars +" Hare +au BufNewFile,BufRead *.ha setf hare + " Haskell au BufNewFile,BufRead *.hs,*.hsc,*.hs-boot,*.hsig setf haskell au BufNewFile,BufRead *.lhs setf lhaskell diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index 73605413ee..c3bdfea6c7 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -435,6 +435,7 @@ local extension = { haml = 'haml', hsm = 'hamster', hbs = 'handlebars', + ha = 'hare', ['hs-boot'] = 'haskell', hsig = 'haskell', hsc = 'haskell', diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim index 3c05045dd3..a1228a07b5 100644 --- a/src/nvim/testdir/test_filetype.vim +++ b/src/nvim/testdir/test_filetype.vim @@ -234,6 +234,7 @@ let s:filename_checks = { \ 'haml': ['file.haml'], \ 'hamster': ['file.hsm'], \ 'handlebars': ['file.hbs'], + \ 'hare': ['file.ha'], \ 'haskell': ['file.hs', 'file.hsc', 'file.hs-boot', 'file.hsig'], \ 'haste': ['file.ht'], \ 'hastepreproc': ['file.htpp'],