vim-patch:9.0.1455: C++ 20 modules are not recognized (#23124)

Problem:    C++ 20 modules are not recognized.
Solution:   Add patterns to recognize C++ 20 modules as "cpp". (Ben Jackson,
            closes vim/vim#12261)

732d69e191

Co-authored-by: Ben Jackson <puremourning@gmail.com>
This commit is contained in:
Christian Clason 2023-04-16 10:59:04 +02:00 committed by GitHub
parent 42e55ba009
commit d9e9dc3a06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -257,6 +257,10 @@ local extension = {
tcc = 'cpp',
hxx = 'cpp',
hpp = 'cpp',
ccm = 'cpp',
cppm = 'cpp',
cxxm = 'cpp',
['c++m'] = 'cpp',
cpp = function(path, bufnr)
return vim.g.cynlib_syntax_for_cpp and 'cynlib' or 'cpp'
end,

View File

@ -129,7 +129,7 @@ let s:filename_checks = {
\ 'context': ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 'file.mkvi', 'file.mkxl', 'file.mklx'],
\ 'cook': ['file.cook'],
\ 'cpon': ['file.cpon'],
\ 'cpp': ['file.cxx', 'file.c++', 'file.hh', 'file.hxx', 'file.hpp', 'file.ipp', 'file.moc', 'file.tcc', 'file.inl', 'file.tlh'],
\ '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'],
\ 'cqlang': ['file.cql'],
\ 'crm': ['file.crm'],
\ 'crontab': ['crontab', 'crontab.file', '/etc/cron.d/file', 'any/etc/cron.d/file'],