diff options
author | Christian Clason <c.clason@uni-graz.at> | 2022-10-12 15:23:42 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-12 15:23:42 +0200 |
commit | 4f305fba14ec8c1919ed793b6e09e15ca54a8c1d (patch) | |
tree | ddc3985acb61633d29b0155cb8e05b98db549733 | |
parent | eeeb6c80d8f32efee8d13ec4a56a7d487a28eba0 (diff) | |
download | rneovim-4f305fba14ec8c1919ed793b6e09e15ca54a8c1d.tar.gz rneovim-4f305fba14ec8c1919ed793b6e09e15ca54a8c1d.tar.bz2 rneovim-4f305fba14ec8c1919ed793b6e09e15ca54a8c1d.zip |
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
-rw-r--r-- | runtime/filetype.vim | 3 | ||||
-rw-r--r-- | runtime/lua/vim/filetype.lua | 1 | ||||
-rw-r--r-- | src/nvim/testdir/test_filetype.vim | 2 |
3 files changed, 5 insertions, 1 deletions
diff --git a/runtime/filetype.vim b/runtime/filetype.vim index b6673c1762..8abec398db 100644 --- 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 index e204fe8ae2..ea39f66393 100644 --- 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 index d123d469a6..b637f1a16f 100644 --- 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'], |