From a850b15e1968476e0f609a9d699cdf24fd13e3a2 Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sat, 13 Aug 2022 10:26:12 +0200 Subject: vim-patch:9.0.0195: metafun files are not recogized (#19746) Problem: Metafun files are not recogized. Solution: Add filetype detection patterns. https://github.com/vim/vim/commit/9032b9ceb6073288d75386dbcbd9d1982fa24080 --- runtime/filetype.vim | 1 + runtime/lua/vim/filetype.lua | 15 +++++++++++++++ 2 files changed, 16 insertions(+) (limited to 'runtime') diff --git a/runtime/filetype.vim b/runtime/filetype.vim index e32374863f..f744714aa2 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -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 diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index e9e81caec0..3cfc4e288a 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -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', -- cgit