From e3f15d5424caac762dcd384083d94920e86e676d Mon Sep 17 00:00:00 2001 From: Samuel Huang Date: Thu, 18 Sep 2025 22:41:27 -0400 Subject: [PATCH] vim-patch:9.1.1775: filetype: Mamba configuration files are not recognized #35829 Problem: filetype: Mamba configuration files are not recognized Solution: Detect .mambarc and mambarc as yaml filetype (Samuel Huang). References: - https://mamba.readthedocs.io/en/latest/user_guide/configuration.html closes: vim/vim#18338 https://github.com/vim/vim/commit/21a21eafeccb7f40a7af80a8ff600b513e70d188 --- runtime/lua/vim/filetype.lua | 2 ++ test/old/testdir/test_filetype.vim | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index 50c6b4d31d..dc1865f96e 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -1953,6 +1953,8 @@ local filename = { matplotlibrc = 'yaml', ['.condarc'] = 'yaml', condarc = 'yaml', + ['.mambarc'] = 'yaml', + mambarc = 'yaml', zathurarc = 'zathurarc', ['/etc/zprofile'] = 'zsh', ['.zlogin'] = 'zsh', diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index dee5c13842..5800451dd3 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -932,7 +932,7 @@ func s:GetFilenameChecks() abort \ 'xslt': ['file.xsl', 'file.xslt'], \ 'yacc': ['file.yy', 'file.yxx', 'file.y++'], \ 'yaml': ['file.yaml', 'file.yml', 'file.eyaml', 'file.kyaml', 'file.kyml', 'any/.bundle/config', '.clangd', '.clang-format', '.clang-tidy', 'file.mplstyle', 'matplotlibrc', 'yarn.lock', - \ '/home/user/.kube/config', '/home/user/.kube/kuberc', '.condarc', 'condarc', 'pixi.lock'], + \ '/home/user/.kube/config', '/home/user/.kube/kuberc', '.condarc', 'condarc', '.mambarc', 'mambarc', 'pixi.lock'], \ 'yang': ['file.yang'], \ 'yuck': ['file.yuck'], \ 'z8a': ['file.z8a'],