changeset 34915:ef1d8d1eb838 v9.1.0317

patch 9.1.0317: filetype: matplotlibrc files are not recognized Commit: https://github.com/vim/vim/commit/55d4f3c006689945599589a90036923b1752754f Author: Wu, Zhenyu <wuzhenyu@ustc.edu> Date: Sat Apr 13 18:25:38 2024 +0200 patch 9.1.0317: filetype: matplotlibrc files are not recognized Problem: filetype: matplotlibrc files are not recognized Solution: Detect 'matplotlibrc' file as yaml filetype (Wu, Zhenyu) See: https://matplotlib.org/stable/users/explain/customizing.html#the-matplotlibrc-file closes: #14501 Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sat, 13 Apr 2024 18:30:06 +0200
parents 4f97b92f4451
children 2b9f39b87c93
files runtime/filetype.vim src/testdir/test_filetype.vim src/version.c
diffstat 3 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -425,8 +425,8 @@ au BufNewFile,BufRead .clang-format		set
 " Clang-tidy
 au BufNewFile,BufRead .clang-tidy		setf yaml
 
-" Matplotlib style
-au BufNewFile,BufRead *.mplstyle		setf yaml
+" Matplotlib
+au BufNewFile,BufRead *.mplstyle,matplotlibrc	setf yaml
 
 " Clean
 au BufNewFile,BufRead *.dcl,*.icl		setf clean
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -836,7 +836,7 @@ def s:GetFilenameChecks(): dict<list<str
     xsd: ['file.xsd'],
     xslt: ['file.xsl', 'file.xslt'],
     yacc: ['file.yy', 'file.yxx', 'file.y++'],
-    yaml: ['file.yaml', 'file.yml', 'file.eyaml', 'any/.bundle/config', '.clangd', '.clang-format', '.clang-tidy', 'file.mplstyle', 'yarn.lock'],
+    yaml: ['file.yaml', 'file.yml', 'file.eyaml', 'any/.bundle/config', '.clangd', '.clang-format', '.clang-tidy', 'file.mplstyle', 'matplotlibrc', 'yarn.lock'],
     yang: ['file.yang'],
     yuck: ['file.yuck'],
     z8a: ['file.z8a'],
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    317,
+/**/
     316,
 /**/
     315,