diff options
author | Christian Clason <c.clason@uni-graz.at> | 2024-03-31 19:53:05 +0200 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2024-04-01 12:01:47 +0200 |
commit | 19ee281809b37d6de34125e60c568c7c3133ebad (patch) | |
tree | 0f5221ce68706fee6743ca5caaddbdb69bd6b78c | |
parent | de1a54dfe1f18a855d32124786181a91be157aca (diff) | |
download | rneovim-19ee281809b37d6de34125e60c568c7c3133ebad.tar.gz rneovim-19ee281809b37d6de34125e60c568c7c3133ebad.tar.bz2 rneovim-19ee281809b37d6de34125e60c568c7c3133ebad.zip |
vim-patch:9.1.0248: filetype: yarn lock files are not recognized
Problem: filetype: yarn lock files are not recognized
Solution: Detect 'yarn.lock' files as yaml
(Wu, Zhenyu)
closes: vim/vim#14369
https://github.com/vim/vim/commit/3b497aa2470ff613fed79569bc8589dae8dc3190
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
-rw-r--r-- | runtime/lua/vim/filetype.lua | 1 | ||||
-rw-r--r-- | test/old/testdir/test_filetype.vim | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index f3aae468c7..ff56bfbac0 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -1570,6 +1570,7 @@ local filename = { ['.clangd'] = 'yaml', ['.clang-format'] = 'yaml', ['.clang-tidy'] = 'yaml', + ['yarn.lock'] = 'yaml', ['/etc/zprofile'] = 'zsh', ['.zlogin'] = 'zsh', ['.zlogout'] = 'zsh', diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index 5aa68d3e57..ca0ba92eac 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -742,7 +742,7 @@ func s:GetFilenameChecks() abort \ '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'], + \ 'yaml': ['file.yaml', 'file.yml', 'file.eyaml', 'any/.bundle/config', '.clangd', '.clang-format', '.clang-tidy', 'file.mplstyle', 'yarn.lock'], \ 'yang': ['file.yang'], \ 'yuck': ['file.yuck'], \ 'z8a': ['file.z8a'], |