commit 1b0dedb81c1252f1324edce11a353f76b1cad92c
parent df96276b19c07f7a4c8687cf867a337f4c85b7e0
Author: Christian Clason <c.clason@uni-graz.at>
Date: Fri, 18 Apr 2025 18:35:20 +0200
vim-patch:9.1.1321: filetype: MS ixx and mpp files are not recognized
Problem: filetype: MS ixx and mpp files are not recognized
Solution: detect *.mpp and *.ixx files as c++ filetype
(Hampus Avekvist)
closes: vim/vim#17155
https://github.com/vim/vim/commit/aee34ef23e08a944f87d6bb4f972c56ba88dc6dd
Co-authored-by: Hampus Avekvist <hampus.avekvist@hey.com>
Diffstat:
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
@@ -345,6 +345,8 @@ local extension = {
tcc = 'cpp',
hxx = 'cpp',
hpp = 'cpp',
+ ixx = 'cpp',
+ mpp = 'cpp',
ccm = 'cpp',
cppm = 'cpp',
cxxm = 'cpp',
diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim
@@ -188,7 +188,7 @@ func s:GetFilenameChecks() abort
\ 'cook': ['file.cook'],
\ 'corn': ['file.corn'],
\ 'cpon': ['file.cpon'],
- \ 'cpp': ['file.cxx', 'file.c++', 'file.hh', 'file.hxx', 'file.hpp', 'file.ipp', 'file.moc', 'file.tcc', 'file.inl', 'file.tlh', 'file.cppm', 'file.ccm', 'file.cxxm', 'file.c++m'],
+ \ 'cpp': ['file.cxx', 'file.c++', 'file.hh', 'file.hxx', 'file.hpp', 'file.ipp', 'file.ixx', 'file.moc', 'file.tcc', 'file.inl', 'file.tlh', 'file.cppm', 'file.ccm', 'file.cxxm', 'file.c++m', 'file.mpp'],
\ 'cqlang': ['file.cql'],
\ 'crm': ['file.crm'],
\ 'crontab': ['crontab', 'crontab.file', '/etc/cron.d/file', 'any/etc/cron.d/file'],