commit e3f15d5424caac762dcd384083d94920e86e676d
parent c2c33249a732ad4df3de1c825bdedc950112500d
Author: Samuel Huang <sghuang19@gmail.com>
Date: Thu, 18 Sep 2025 22:41:27 -0400
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
Diffstat:
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git 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
@@ -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'],