1
0
forked from aniani/vim

patch 9.0.1455: C++ 20 modules are not recognized

Problem:    C++ 20 modules are not recognized.
Solution:   Add patterns to recognize C++ 20 modules as "cpp". (Ben Jackson,
            closes #12261)
This commit is contained in:
Ben Jackson
2023-04-15 18:17:17 +01:00
committed by Bram Moolenaar
parent 7e5fe38efc
commit 732d69e191
3 changed files with 7 additions and 1 deletions

View File

@@ -338,6 +338,10 @@ if has("fname_case")
au BufNewFile,BufRead *.C,*.H setf cpp
endif
" C++ 20 modules (clang)
" https://clang.llvm.org/docs/StandardCPlusPlusModules.html#file-name-requirement
au BufNewFile,BufRead *.cppm,*.ccm,*.cxxm,*.c++m setf cpp
" .h files can be C, Ch C++, ObjC or ObjC++.
" Set c_syntax_for_h if you want C, ch_syntax_for_h if you want Ch. ObjC is
" detected automatically.