commit 8c112a823535eeb32f4490b2fff33d1cc36de004
parent be7d8ff0e44a5364adee1c6313cdd375267a26f3
Author: zeertzjq <zeertzjq@outlook.com>
Date: Fri, 12 Apr 2024 17:21:37 +0800
vim-patch:9.1.0307: filetype: texdoc config files is not recognized
Problem: filetype: texdoc config files is not recognized
Solution: Detect 'texdoc.cnf' as conf filetype
(Wu, Zhenyu)
See: https://github.com/TeX-Live/texdoc/blob/master/texdoc.cnf
closes: vim/vim#14507
https://github.com/vim/vim/commit/7fdbd1bb58192650bec067a0f224c1fa971c6782
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Diffstat:
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua
@@ -1302,6 +1302,7 @@ local filename = {
['csh.login'] = detect.csh,
['csh.logout'] = detect.csh,
['auto.master'] = 'conf',
+ ['texdoc.cnf'] = 'conf',
['.x11vncrc'] = 'conf',
['configure.in'] = 'config',
['configure.ac'] = 'config',
diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim
@@ -163,7 +163,7 @@ func s:GetFilenameChecks() abort
\ 'cobol': ['file.cbl', 'file.cob', 'file.lib'],
\ 'coco': ['file.atg'],
\ 'conaryrecipe': ['file.recipe'],
- \ 'conf': ['auto.master', 'file.conf', '.x11vncrc'],
+ \ 'conf': ['auto.master', 'file.conf', 'texdoc.cnf', '.x11vncrc'],
\ 'config': ['configure.in', 'configure.ac', '/etc/hostname.file', 'any/etc/hostname.file'],
\ 'confini': ['/etc/pacman.conf', 'any/etc/pacman.conf', 'mpv.conf', 'any/.aws/config', 'any/.aws/credentials', 'file.nmconnection'],
\ 'context': ['tex/context/any/file.tex', 'file.mkii', 'file.mkiv', 'file.mkvi', 'file.mkxl', 'file.mklx'],