Patch 8.2.2032

5 views
Skip to first unread message

Bram Moolenaar

unread,
Nov 22, 2020, 9:56:49 AM11/22/20
to vim...@googlegroups.com

Patch 8.2.2032
Problem: Cabalconfig and cabalproject filetypes not recognized.
Solution: Detect more cabal files. (Marcin Szamotulski, closes #7339)
Files: runtime/filetype.vim, src/testdir/test_filetype.vim


*** ../vim-8.2.2031/runtime/filetype.vim 2020-11-18 12:12:35.167525175 +0100
--- runtime/filetype.vim 2020-11-22 15:44:28.682710552 +0100
***************
*** 696,707 ****
au BufNewFile,BufRead *.haml setf haml

" Hamster Classic | Playground files
! au BufNewFile,BufRead *.hsc,*.hsm setf hamster

" Haskell
au BufNewFile,BufRead *.hs,*.hs-boot setf haskell
au BufNewFile,BufRead *.lhs setf lhaskell
au BufNewFile,BufRead *.chs setf chaskell

" Haste
au BufNewFile,BufRead *.ht setf haste
--- 696,717 ----
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 *.lhs setf lhaskell
au BufNewFile,BufRead *.chs setf chaskell
+ au BufNewFile,BufRead cabal.project setf cabalproject
+ au BufNewFile,BufRead cabal.project.* setf cabalproject
+ au BufNewFile,BufRead $HOME/.cabal/config setf cabalconfig
+ au BufNewFile,BufRead cabal.config setf cabalconfig

" Haste
au BufNewFile,BufRead *.ht setf haste
***************
*** 1507,1515 ****
au BufNewFile,BufRead catalog setf catalog

" Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
! " Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts
" NOTE: Patterns ending in a star are further down, these have lower priority.
! au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD call dist#ft#SetFileTypeSH("bash")
au BufNewFile,BufRead .kshrc,*.ksh call dist#ft#SetFileTypeSH("ksh")
au BufNewFile,BufRead */etc/profile,.profile,*.sh,*.env call dist#ft#SetFileTypeSH(getline(1))

--- 1517,1526 ----
au BufNewFile,BufRead catalog setf catalog

" Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
! " Gentoo ebuilds, Arch Linux PKGBUILDs and Alpine Linux APKBUILDs are actually
! " bash scripts.
" NOTE: Patterns ending in a star are further down, these have lower priority.
! au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD,APKBUILD call dist#ft#SetFileTypeSH("bash")
au BufNewFile,BufRead .kshrc,*.ksh call dist#ft#SetFileTypeSH("ksh")
au BufNewFile,BufRead */etc/profile,.profile,*.sh,*.env call dist#ft#SetFileTypeSH(getline(1))

***************
*** 2164,2170 ****
au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')

" Shell scripts ending in a star
! au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,,PKGBUILD* call dist#ft#SetFileTypeSH("bash")
au BufNewFile,BufRead .kshrc* call dist#ft#SetFileTypeSH("ksh")
au BufNewFile,BufRead .profile* call dist#ft#SetFileTypeSH(getline(1))

--- 2175,2181 ----
au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')

" Shell scripts ending in a star
! au BufNewFile,BufRead .bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,PKGBUILD*,APKBUILD* call dist#ft#SetFileTypeSH("bash")
au BufNewFile,BufRead .kshrc* call dist#ft#SetFileTypeSH("ksh")
au BufNewFile,BufRead .profile* call dist#ft#SetFileTypeSH(getline(1))

*** ../vim-8.2.2031/src/testdir/test_filetype.vim 2020-11-18 12:12:35.171525154 +0100
--- src/testdir/test_filetype.vim 2020-11-22 15:44:36.090684727 +0100
***************
*** 87,92 ****
--- 87,94 ----
\ 'bzr': ['bzr_log.any', 'bzr_log.file'],
\ 'c': ['enlightenment/file.cfg', 'file.qc', 'file.c', 'some-enlightenment/file.cfg'],
\ 'cabal': ['file.cabal'],
+ \ 'cabalconfig': ['cabal.config'],
+ \ 'cabalproject': ['cabal.project', 'cabal.project.local'],
\ 'calendar': ['calendar', '/.calendar/file', '/share/calendar/any/calendar.file', '/share/calendar/calendar.file', 'any/share/calendar/any/calendar.file', 'any/share/calendar/calendar.file'],
\ 'catalog': ['catalog', 'sgml.catalogfile', 'sgml.catalog', 'sgml.catalog-file'],
\ 'cdl': ['file.cdl'],
*** ../vim-8.2.2031/src/version.c 2020-11-22 14:23:57.063233468 +0100
--- src/version.c 2020-11-22 15:44:16.678752404 +0100
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2032,
/**/
Reply all
Reply to author
Forward
0 new messages