]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.1934: filetype: not all starlark files are recognized v9.1.1934
authorBruno Belanyi <bruno@belanyi.fr>
Fri, 28 Nov 2025 20:48:55 +0000 (20:48 +0000)
committerChristian Brabandt <cb@256bit.org>
Fri, 28 Nov 2025 20:48:55 +0000 (20:48 +0000)
Problem:  filetype: not all starlark files are recognized
Solution: Detect *.sky files as starlark filetype (Bruno Belanyi)

References:
- https://docs.bazel.build/versions/0.17.1/skylark/spec.html

closes: #18807

Signed-off-by: Bruno Belanyi <bruno@belanyi.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/autoload/dist/ft.vim
src/testdir/test_filetype.vim
src/version.c

index 2ab128a218b1daaa5fe8c3f645f493fa258c462d..f05b6912b32724ece8c094c53d1cf3ebfc0d0c07 100644 (file)
@@ -3,7 +3,7 @@ vim9script
 # Vim functions for file type detection
 #
 # Maintainer:          The Vim Project <https://github.com/vim/vim>
-# Last Change:         2025 Nov 11
+# Last Change:         2025 Nov 28
 # Former Maintainer:   Bram Moolenaar <Bram@vim.org>
 
 # These functions are moved here from runtime/filetype.vim to make startup
@@ -2705,6 +2705,7 @@ const ft_from_ext = {
   "nut": "squirrel",
   # Starlark
   "ipd": "starlark",
+  "sky": "starlark",
   "star": "starlark",
   "starlark": "starlark",
   # OpenVPN configuration
index 9bb0ef15cfbead20f08a7849df3afd6b7a830e5d..f98ecb3ed895e6eaa1ee665751851a12ee7e4035 100644 (file)
@@ -769,7 +769,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     sshconfig: ['ssh_config', '/.ssh/config', '/etc/ssh/ssh_config.d/file.conf', 'any/etc/ssh/ssh_config.d/file.conf', 'any/.ssh/config', 'any/.ssh/file.conf'],
     sshdconfig: ['sshd_config', '/etc/ssh/sshd_config.d/file.conf', 'any/etc/ssh/sshd_config.d/file.conf'],
     st: ['file.st'],
-    starlark: ['file.ipd', 'file.star', 'file.starlark'],
+    starlark: ['file.ipd', 'file.sky', 'file.star', 'file.starlark'],
     stata: ['file.ado', 'file.do', 'file.imata', 'file.mata'],
     stp: ['file.stp'],
     stylus: ['a.styl', 'file.stylus'],
index 27e71d493bc0a0e5f52e1093ca9411ffb1db4fc7..1d10f93e6c3e6d37431173cc57e871417a3c2367 100644 (file)
@@ -729,6 +729,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1934,
 /**/
     1933,
 /**/