vim-patch:9.0.0195: metafun files are not recogized (#19746)

Problem:    Metafun files are not recogized.
Solution:   Add filetype detection patterns.
9032b9ceb6
This commit is contained in:
Christian Clason
2022-08-13 10:26:12 +02:00
committed by GitHub
parent 1de62b9ea1
commit a850b15e19
3 changed files with 17 additions and 1 deletions

View File

@@ -1161,6 +1161,7 @@ au BufNewFile,BufRead *.mf setf mf
" MetaPost
au BufNewFile,BufRead *.mp setf mp
au BufNewFile,BufRead *.mpxl,*.mpiv,*.mpvi let b:mp_metafun = 1 | setf mp
" MGL
au BufNewFile,BufRead *.mgl setf mgl

View File

@@ -668,6 +668,21 @@ local extension = {
moo = 'moo',
moon = 'moonscript',
mp = 'mp',
mpiv = function(path, bufnr)
return 'mp', function(b)
vim.b[b].mp_metafun = 1
end
end,
mpvi = function(path, bufnr)
return 'mp', function(b)
vim.b[b].mp_metafun = 1
end
end,
mpxl = function(path, bufnr)
return 'mp', function(b)
vim.b[b].mp_metafun = 1
end
end,
mof = 'msidl',
odl = 'msidl',
msql = 'msql',

View File

@@ -360,7 +360,7 @@ let s:filename_checks = {
\ 'monk': ['file.isc', 'file.monk', 'file.ssc', 'file.tsc'],
\ 'moo': ['file.moo'],
\ 'moonscript': ['file.moon'],
\ 'mp': ['file.mp'],
\ 'mp': ['file.mp', 'file.mpxl', 'file.mpiv', 'file.mpvi'],
\ 'mplayerconf': ['mplayer.conf', '/.mplayer/config', 'any/.mplayer/config'],
\ 'mrxvtrc': ['mrxvtrc', '.mrxvtrc'],
\ 'msidl': ['file.odl', 'file.mof'],