commit 4f305fba14ec8c1919ed793b6e09e15ca54a8c1d
parent eeeb6c80d8f32efee8d13ec4a56a7d487a28eba0
Author: Christian Clason <c.clason@uni-graz.at>
Date: Wed, 12 Oct 2022 15:23:42 +0200
vim-patch:9.0.0731: clang-tidy configuration files are not recognized (#20620)
Problem: clang-tidy configuration files are not recognized.
Solution: Recognize clang-tidy files as yaml. (closes vim/vim#11350)
https://github.com/vim/vim/commit/af40f9af335e0c8b167eac31ceace45b6a2e0565
Diffstat:
3 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
@@ -370,6 +370,9 @@ au BufNewFile,BufRead *.ch call dist#ft#FTchange()
" ChordPro
au BufNewFile,BufRead *.chopro,*.crd,*.cho,*.crdpro,*.chordpro setf chordpro
+" Clang-tidy
+au BufNewFile,BufRead .clang-tidy setf yaml
+
" Clean
au BufNewFile,BufRead *.dcl,*.icl setf clean
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
@@ -1666,6 +1666,7 @@ local filename = {
fglrxrc = 'xml',
['/etc/blkid.tab'] = 'xml',
['/etc/blkid.tab.old'] = 'xml',
+ ['.clang-tidy'] = 'yaml',
['/etc/zprofile'] = 'zsh',
['.zlogin'] = 'zsh',
['.zlogout'] = 'zsh',
diff --git a/src/nvim/testdir/test_filetype.vim b/src/nvim/testdir/test_filetype.vim
@@ -641,7 +641,7 @@ let s:filename_checks = {
\ 'xsd': ['file.xsd'],
\ 'xslt': ['file.xsl', 'file.xslt'],
\ 'yacc': ['file.yy', 'file.yxx', 'file.y++'],
- \ 'yaml': ['file.yaml', 'file.yml'],
+ \ 'yaml': ['file.yaml', 'file.yml', '.clang-tidy'],
\ 'yang': ['file.yang'],
\ 'z8a': ['file.z8a'],
\ 'zig': ['file.zig'],