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: #19460

Signed-off-by: Thomas Dupuy <thom4s.d@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Thomas Dupuy
2026-02-19 16:12:06 +00:00
committed by Christian Brabandt
parent e9e4e30ee4
commit 7d93ae57f0
3 changed files with 7 additions and 1 deletions
+4 -1
View File
@@ -3,7 +3,7 @@ vim9script
# Vim functions for file type detection
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2026 Feb 18
# Last Change: 2026 Feb 19
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
# These functions are moved here from runtime/filetype.vim to make startup
@@ -3017,6 +3017,9 @@ const ft_from_ext = {
"raml": "raml",
# YANG
"yang": "yang",
# YARA, YARA-X
"yara": "yara",
"yar": "yara",
# Yuck
"yuck": "yuck",
# Zimbu
+1
View File
@@ -987,6 +987,7 @@ def s:GetFilenameChecks(): dict<list<string>>
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'],
+2
View File
@@ -734,6 +734,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
27,
/**/
26,
/**/