diff options
author | rhcher <2032877541@qq.com> | 2022-01-09 16:49:37 +0800 |
---|---|---|
committer | Gregory Anders <greg@gpanders.com> | 2022-01-13 15:32:20 -0700 |
commit | c38d602b888a95a4b3b7a3b4241ce5b3e434eb35 (patch) | |
tree | 1bf824997150059c030bd21a7744606639dc87ac | |
parent | 7a574e54f2309eb9d267282619f9383413b85d08 (diff) | |
download | rneovim-c38d602b888a95a4b3b7a3b4241ce5b3e434eb35.tar.gz rneovim-c38d602b888a95a4b3b7a3b4241ce5b3e434eb35.tar.bz2 rneovim-c38d602b888a95a4b3b7a3b4241ce5b3e434eb35.zip |
feat(filetype.lua): fix .cc file not detected
-rw-r--r-- | runtime/lua/vim/filetype.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index 83e4a20ef7..3423be40f9 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -119,7 +119,13 @@ local extension = { tcc = "cpp", hxx = "cpp", hpp = "cpp", - cpp = function() + cpp = function(path, bufnr) + if vim.g.cynlib_syntax_for_cc then + return "cynlib" + end + return "cpp" + end, + cc = function(path, bufnr) if vim.g.cynlib_syntax_for_cc then return "cynlib" end |