]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0240: filetype: some python tools config files are not recognized v9.1.0240
authorWu, Zhenyu <wuzhenyu@ustc.edu>
Sun, 31 Mar 2024 17:12:36 +0000 (19:12 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 31 Mar 2024 17:12:36 +0000 (19:12 +0200)
Problem:  filetype: some python tools config files are not recognized
Solution: Detect config files for setuptools, pudb, coverage as dosini
          (Wu, Zhenyu)

closes: #14361

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 01c91bf22daffaa15f383ccf829c5277714b4b55..5af8ff6e84110ac9ab30f1606b6538773798b1f5 100644 (file)
@@ -1039,6 +1039,9 @@ au BufNewFile,BufRead *.4gl,*.4gh,*.m4gl  setf fgl
 " .INI file for MSDOS
 au BufNewFile,BufRead *.ini,*.INI              setf dosini
 
+" Many python tools use dosini as their config, such as setuptools, pudb, coverage
+au BufNewFile,BufRead setup.cfg,pudb.cfg,.coveragerc   setf dosini
+
 " SysV Inittab
 au BufNewFile,BufRead inittab                  setf inittab
 
index 470bdfd843f0b7cfbe65d1a38d7641ef32e706ae..2107776027d79a0c162d1805594710c6a03d038d 100644 (file)
@@ -210,7 +210,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     dnsmasq: ['/etc/dnsmasq.conf', '/etc/dnsmasq.d/file', 'any/etc/dnsmasq.conf', 'any/etc/dnsmasq.d/file'],
     dockerfile: ['Containerfile', 'Dockerfile', 'dockerfile', 'file.Dockerfile', 'file.dockerfile', 'Dockerfile.debian', 'Containerfile.something'],
     dosbatch: ['file.bat'],
-    dosini: ['/etc/yum.conf', 'file.ini', 'npmrc', '.npmrc', 'php.ini', 'php.ini-5', 'php.ini-file', '/etc/yum.repos.d/file', 'any/etc/yum.conf', 'any/etc/yum.repos.d/file', 'file.wrap', 'file.vbp', 'ja2.ini', 'JA2.INI'],
+    dosini: ['/etc/yum.conf', 'file.ini', 'npmrc', '.npmrc', 'php.ini', 'php.ini-5', 'php.ini-file', '/etc/yum.repos.d/file', 'any/etc/yum.conf', 'any/etc/yum.repos.d/file', 'file.wrap', 'file.vbp', 'ja2.ini', 'JA2.INI', 'setup.cfg', 'pudb.cfg', '.coveragerc'],
     dot: ['file.dot', 'file.gv'],
     dracula: ['file.drac', 'file.drc', 'filelvs', 'filelpe', 'drac.file', 'lpe', 'lvs', 'some-lpe', 'some-lvs'],
     dtd: ['file.dtd'],
index e05ab84cbce29ce5095998f7815997c1f352ea8a..c03de87d96d9779a6cfbb7c310a2f8a219d72cb3 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    240,
 /**/
     239,
 /**/