]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.2.0559: filetype: Kaitai struct files are not recogonized v9.2.0559
authorWu, Zhenyu <wuzhenyu@ustc.edu>
Fri, 29 May 2026 18:25:25 +0000 (18:25 +0000)
committerChristian Brabandt <cb@256bit.org>
Fri, 29 May 2026 18:25:25 +0000 (18:25 +0000)
Problem:  filetype: Kaitai struct files are not recogonized
Solution: Detect *.ksy files as yaml filetype (Wu, Zhenyu)

Reference:
https://doc.kaitai.io/

closes: #20353

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/autoload/dist/ft.vim
src/testdir/test_filetype.vim
src/version.c

index a75d31bb596083e4b10e1b7439770128f19d5cd2..c6fbd07d35ce2f42edba453624e4b720864693b0 100644 (file)
@@ -2336,6 +2336,8 @@ const ft_from_ext = {
   "kts": "kotlin",
   # KDE script
   "ks": "kscript",
+  # Kaitai struct
+  "ksy": "yaml",
   # Kyaml
   "kyaml": "yaml",
   "kyml": "yaml",
index e2350871be8f69304d1309ce30a9c79c2986555a..3e6a538a8299123d9790b77f4e970dfde2621918 100644 (file)
@@ -996,7 +996,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     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', '.mambarc', 'mambarc', 'pixi.lock', 'buf.lock'],
+           '/home/user/.kube/config', '/home/user/.kube/kuberc', '.condarc', 'condarc', '.mambarc', 'mambarc', 'pixi.lock', 'buf.lock', 'file.ksy'],
     yang: ['file.yang'],
     yara: ['file.yara', 'file.yar'],
     yuck: ['file.yuck'],
index 23d96b9e474d4bd6c8f3e2e2c5af000bc39b52d9..f77ed07b9b1088706d898a8456349115ed6b3f97 100644 (file)
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    559,
 /**/
     558,
 /**/