vim-patch:9.0.2137: Can't detect angular & mustache filetypes

Problem:  Can't detect angular & mustache filetypes
Solution: Detect *.mustache as Mustache filetype;
          detect *.component.html as html.angular filetype

closes: vim/vim#13594

7bed263c34
This commit is contained in:
ObserverOfTime 2023-11-30 19:00:33 +02:00 committed by Christian Clason
parent 7feed6ccb7
commit 307d5bcc79
2 changed files with 4 additions and 0 deletions

View File

@ -695,6 +695,7 @@ local extension = {
msql = 'msql', msql = 'msql',
mu = 'mupad', mu = 'mupad',
mush = 'mush', mush = 'mush',
mustache = 'mustache',
mysql = 'mysql', mysql = 'mysql',
n1ql = 'n1ql', n1ql = 'n1ql',
nql = 'n1ql', nql = 'n1ql',
@ -1716,6 +1717,7 @@ local pattern = {
['.*/etc/host%.conf'] = 'hostconf', ['.*/etc/host%.conf'] = 'hostconf',
['.*/etc/hosts%.deny'] = 'hostsaccess', ['.*/etc/hosts%.deny'] = 'hostsaccess',
['.*/etc/hosts%.allow'] = 'hostsaccess', ['.*/etc/hosts%.allow'] = 'hostsaccess',
['.*%.component%.html'] = 'html.angular',
['.*%.html%.m4'] = 'htmlm4', ['.*%.html%.m4'] = 'htmlm4',
['.*/%.i3/config'] = 'i3config', ['.*/%.i3/config'] = 'i3config',
['.*/i3/config'] = 'i3config', ['.*/i3/config'] = 'i3config',

View File

@ -309,6 +309,7 @@ func s:GetFilenameChecks() abort
\ 'hostconf': ['/etc/host.conf', 'any/etc/host.conf'], \ 'hostconf': ['/etc/host.conf', 'any/etc/host.conf'],
\ 'hostsaccess': ['/etc/hosts.allow', '/etc/hosts.deny', 'any/etc/hosts.allow', 'any/etc/hosts.deny'], \ 'hostsaccess': ['/etc/hosts.allow', '/etc/hosts.deny', 'any/etc/hosts.allow', 'any/etc/hosts.deny'],
\ 'html': ['file.html', 'file.htm', 'file.cshtml'], \ 'html': ['file.html', 'file.htm', 'file.cshtml'],
\ 'html.angular': ['file.component.html'],
\ 'htmlm4': ['file.html.m4'], \ 'htmlm4': ['file.html.m4'],
\ 'httest': ['file.htt', 'file.htb'], \ 'httest': ['file.htt', 'file.htb'],
\ 'hurl': ['file.hurl'], \ 'hurl': ['file.hurl'],
@ -437,6 +438,7 @@ func s:GetFilenameChecks() abort
\ 'mojo': ['file.mojo', 'file.🔥'], \ 'mojo': ['file.mojo', 'file.🔥'],
\ 'mupad': ['file.mu'], \ 'mupad': ['file.mu'],
\ 'mush': ['file.mush'], \ 'mush': ['file.mush'],
\ 'mustache': ['file.mustache'],
\ 'muttrc': ['Muttngrc', 'Muttrc', '.muttngrc', '.muttngrc-file', '.muttrc', '.muttrc-file', '/.mutt/muttngrc', '/.mutt/muttngrc-file', '/.mutt/muttrc', '/.mutt/muttrc-file', '/.muttng/muttngrc', '/.muttng/muttngrc-file', '/.muttng/muttrc', '/.muttng/muttrc-file', '/etc/Muttrc.d/file', '/etc/Muttrc.d/file.rc', 'Muttngrc-file', 'Muttrc-file', 'any/.mutt/muttngrc', 'any/.mutt/muttngrc-file', 'any/.mutt/muttrc', 'any/.mutt/muttrc-file', 'any/.muttng/muttngrc', 'any/.muttng/muttngrc-file', 'any/.muttng/muttrc', 'any/.muttng/muttrc-file', 'any/etc/Muttrc.d/file', 'muttngrc', 'muttngrc-file', 'muttrc', 'muttrc-file'], \ 'muttrc': ['Muttngrc', 'Muttrc', '.muttngrc', '.muttngrc-file', '.muttrc', '.muttrc-file', '/.mutt/muttngrc', '/.mutt/muttngrc-file', '/.mutt/muttrc', '/.mutt/muttrc-file', '/.muttng/muttngrc', '/.muttng/muttngrc-file', '/.muttng/muttrc', '/.muttng/muttrc-file', '/etc/Muttrc.d/file', '/etc/Muttrc.d/file.rc', 'Muttngrc-file', 'Muttrc-file', 'any/.mutt/muttngrc', 'any/.mutt/muttngrc-file', 'any/.mutt/muttrc', 'any/.mutt/muttrc-file', 'any/.muttng/muttngrc', 'any/.muttng/muttngrc-file', 'any/.muttng/muttrc', 'any/.muttng/muttrc-file', 'any/etc/Muttrc.d/file', 'muttngrc', 'muttngrc-file', 'muttrc', 'muttrc-file'],
\ 'mysql': ['file.mysql'], \ 'mysql': ['file.mysql'],
\ 'n1ql': ['file.n1ql', 'file.nql'], \ 'n1ql': ['file.n1ql', 'file.nql'],