Skip to content

Commit 55d4f3c

Browse files
Freed-Wuchrisbra
authored andcommitted
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>
1 parent ce06493 commit 55d4f3c

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

runtime/filetype.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -425,8 +425,8 @@ au BufNewFile,BufRead .clang-format setf yaml
425425
" Clang-tidy
426426
au BufNewFile,BufRead .clang-tidy setf yaml
427427

428-
" Matplotlib style
429-
au BufNewFile,BufRead *.mplstyle setf yaml
428+
" Matplotlib
429+
au BufNewFile,BufRead *.mplstyle,matplotlibrc setf yaml
430430

431431
" Clean
432432
au BufNewFile,BufRead *.dcl,*.icl setf clean

src/testdir/test_filetype.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ def s:GetFilenameChecks(): dict<list<string>>
836836
xsd: ['file.xsd'],
837837
xslt: ['file.xsl', 'file.xslt'],
838838
yacc: ['file.yy', 'file.yxx', 'file.y++'],
839-
yaml: ['file.yaml', 'file.yml', 'file.eyaml', 'any/.bundle/config', '.clangd', '.clang-format', '.clang-tidy', 'file.mplstyle', 'yarn.lock'],
839+
yaml: ['file.yaml', 'file.yml', 'file.eyaml', 'any/.bundle/config', '.clangd', '.clang-format', '.clang-tidy', 'file.mplstyle', 'matplotlibrc', 'yarn.lock'],
840840
yang: ['file.yang'],
841841
yuck: ['file.yuck'],
842842
z8a: ['file.z8a'],

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ static char *(features[]) =
704704

705705
static int included_patches[] =
706706
{ /* Add new patch number below this line */
707+
/**/
708+
317,
707709
/**/
708710
316,
709711
/**/

0 commit comments

Comments
 (0)