mirror of
https://github.com/neovim/neovim.git
synced 2025-09-19 17:58:18 +00:00
Merge pull request #19242 from smjonas/vim-9.0.0042
vim-patch:9.0.{0041,0042}: filetype patterns
This commit is contained in:
@@ -2388,7 +2388,7 @@ au BufNewFile,BufRead *fvwm2rc*
|
||||
au BufNewFile,BufRead */tmp/lltmp* call s:StarSetf('gedcom')
|
||||
|
||||
" Git
|
||||
au BufNewFile,BufRead */.gitconfig.d/*,/etc/gitconfig.d/* call s:StarSetf('gitconfig')
|
||||
au BufNewFile,BufRead */.gitconfig.d/*,*/etc/gitconfig.d/* call s:StarSetf('gitconfig')
|
||||
|
||||
" Gitolite
|
||||
au BufNewFile,BufRead */gitolite-admin/conf/* call s:StarSetf('gitolite')
|
||||
@@ -2453,7 +2453,7 @@ au BufNewFile,BufRead neomuttrc*,Neomuttrc* call s:StarSetf('neomuttrc')
|
||||
au BufNewFile,BufRead tmac.* call s:StarSetf('nroff')
|
||||
|
||||
" OpenBSD hostname.if
|
||||
au BufNewFile,BufRead /etc/hostname.* call s:StarSetf('config')
|
||||
au BufNewFile,BufRead */etc/hostname.* call s:StarSetf('config')
|
||||
|
||||
" Pam conf
|
||||
au BufNewFile,BufRead */etc/pam.d/* call s:StarSetf('pamconf')
|
||||
|
@@ -1257,7 +1257,7 @@ local filename = {
|
||||
['.*/named/db%..*'] = starsetf('bindzone'),
|
||||
['cabal%.project%..*'] = starsetf('cabalproject'),
|
||||
['sgml%.catalog.*'] = starsetf('catalog'),
|
||||
['/etc/hostname%..*'] = starsetf('config'),
|
||||
['.*/etc/hostname%..*'] = starsetf('config'),
|
||||
['.*/etc/cron%.d/.*'] = starsetf('crontab'),
|
||||
['crontab%..*'] = starsetf('crontab'),
|
||||
WORKSPACE = 'bzl',
|
||||
@@ -1766,7 +1766,7 @@ local pattern = {
|
||||
return require('vim.filetype.detect').fvwm(path)
|
||||
end),
|
||||
['.*/tmp/lltmp.*'] = starsetf('gedcom'),
|
||||
['/etc/gitconfig%.d/.*'] = starsetf('gitconfig'),
|
||||
['.*/etc/gitconfig%.d/.*'] = starsetf('gitconfig'),
|
||||
['.*/gitolite%-admin/conf/.*'] = starsetf('gitolite'),
|
||||
['tmac%..*'] = starsetf('nroff'),
|
||||
['.*/%.gitconfig%.d/.*'] = starsetf('gitconfig'),
|
||||
|
@@ -1323,6 +1323,7 @@ local patterns_hashbang = {
|
||||
['fish\\>'] = { 'fish', { vim_regex = true } },
|
||||
['gforth\\>'] = { 'forth', { vim_regex = true } },
|
||||
['icon\\>'] = { 'icon', { vim_regex = true } },
|
||||
guile = 'scheme',
|
||||
}
|
||||
|
||||
---@private
|
||||
|
@@ -206,6 +206,10 @@ if s:line1 =~# "^#!"
|
||||
elseif s:name =~# 'icon\>'
|
||||
set ft=icon
|
||||
|
||||
" Guile
|
||||
elseif s:name =~# 'guile'
|
||||
set ft=scheme
|
||||
|
||||
endif
|
||||
unlet s:name
|
||||
|
||||
|
Reference in New Issue
Block a user