vim-patch:9.0.0427: Drupal theme files are not recognized (#20138)

Problem:    Drupal theme files are not recognized.
Solution:   Use php filetype for Drupl theme files.  Remove trailing spaces.
            (Rodrigo Aguilera, closes vim/vim#11096)
8995c4cd4e
This commit is contained in:
Christian Clason
2022-09-09 18:48:12 +02:00
committed by GitHub
parent ad2d6a624b
commit 9b0e1256e2
3 changed files with 12 additions and 10 deletions

View File

@@ -1399,7 +1399,8 @@ au BufNewFile,BufRead *.pod setf pod
" Also Phtml (was used for PHP 2 in the past).
" Also .ctp for Cake template file.
" Also .phpt for php tests.
au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp,*.phpt setf php
" Also .theme for Drupal theme files.
au BufNewFile,BufRead *.php,*.php\d,*.phtml,*.ctp,*.phpt,*.theme setf php
" PHP config
au BufNewFile,BufRead php.ini-* setf dosini

View File

@@ -746,6 +746,7 @@ local extension = {
php = 'php',
phpt = 'php',
phtml = 'php',
theme = 'php',
pike = 'pike',
pmod = 'pike',
rcp = 'pilrc',

View File

@@ -409,7 +409,7 @@ let s:filename_checks = {
\ 'perl': ['file.plx', 'file.al', 'file.psgi', 'gitolite.rc', '.gitolite.rc', 'example.gitolite.rc'],
\ 'pf': ['pf.conf'],
\ 'pfmain': ['main.cf'],
\ 'php': ['file.php', 'file.php9', 'file.phtml', 'file.ctp', 'file.phpt'],
\ 'php': ['file.php', 'file.php9', 'file.phtml', 'file.ctp', 'file.phpt', 'file.theme'],
\ 'pike': ['file.pike', 'file.pmod'],
\ 'pilrc': ['file.rcp'],
\ 'pine': ['.pinerc', 'pinerc', '.pinercex', 'pinercex'],