summaryrefslogtreecommitdiff
path: root/runtime
diff options
context:
space:
mode:
authorBen Jackson <puremourning@gmail.com>2023-04-15 18:17:17 +0100
committerBram Moolenaar <Bram@vim.org>2023-04-15 18:17:17 +0100
commit732d69e1918b28ad0fe16eb9bc5a776c7958122b (patch)
tree7f9885d2c3fb7bc902700a5b68d4e46c49cbf96b /runtime
parent7e5fe38efc105721400048a2ffdeddbe1b9c0650 (diff)
downloadvim-git-732d69e1918b28ad0fe16eb9bc5a776c7958122b.tar.gz
patch 9.0.1455: C++ 20 modules are not recognizedv9.0.1455
Problem: C++ 20 modules are not recognized. Solution: Add patterns to recognize C++ 20 modules as "cpp". (Ben Jackson, closes #12261)
Diffstat (limited to 'runtime')
-rw-r--r--runtime/filetype.vim4
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 56df5d6b4..b5262d1e9 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -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.