vim-patch:9.2.0027: filetype: yara files are not recognized

Problem:  filetype: yara files are not recognized
Solution: Detect *.yara and *.yar files as yara filetype
          (Thomas Dupuy).

Reference:
- https://github.com/VirusTotal/yara
- https://github.com/VirusTotal/yara-x

closes: vim/vim#19460

7d93ae57f0

Co-authored-by: Thomas Dupuy <thom4s.d@gmail.com>
This commit is contained in:
zeertzjq
2026-02-20 09:16:41 +08:00
parent 8c22ba8b79
commit c78e276881
2 changed files with 3 additions and 0 deletions

View File

@@ -1433,6 +1433,8 @@ local extension = {
kyml = 'yaml',
grc = detect_line1('<%?xml', 'xml', 'yaml'),
yang = 'yang',
yara = 'yara',
yar = 'yara',
yuck = 'yuck',
z8a = 'z8a',
zig = 'zig',

View File

@@ -984,6 +984,7 @@ func s:GetFilenameChecks() abort
\ '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', '.mambarc', 'mambarc', 'pixi.lock'],
\ 'yang': ['file.yang'],
\ 'yara': ['file.yara', 'file.yar'],
\ 'yuck': ['file.yuck'],
\ 'z8a': ['file.z8a'],
\ 'zathurarc': ['zathurarc'],