]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.2100: filetype: tiltfiles are not recognized v9.1.2100
authorLuis Davim <luis.davim@gmail.com>
Tue, 20 Jan 2026 19:40:35 +0000 (19:40 +0000)
committerChristian Brabandt <cb@256bit.org>
Tue, 20 Jan 2026 19:40:35 +0000 (19:40 +0000)
Problem:  filetype: tiltfiles are not recognized
Solution: Detect Tiltfiles.* and *.tiltfiles as tiltfile  filetype.
          (Luis Davim)

Reference:
- https://docs.tilt.dev/api.html

fixes:  #19214
closes: #19218

Signed-off-by: Luis Davim <luis.davim@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/autoload/dist/ft.vim
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 3f3fe971a51aa87d042eeb2aadb347d1b79a21f0..0d3b1e7ebf6d1add8d5d1bfed493e09cf2c868d9 100644 (file)
@@ -3,7 +3,7 @@ vim9script
 # Vim functions for file type detection
 #
 # Maintainer:          The Vim Project <https://github.com/vim/vim>
-# Last Change:         2026 Jan 11
+# Last Change:         2026 Jan 20
 # Former Maintainer:   Bram Moolenaar <Bram@vim.org>
 
 # These functions are moved here from runtime/filetype.vim to make startup
@@ -3033,6 +3033,9 @@ const ft_from_ext = {
   "blp": "blueprint",
   # Blueprint build system file
   "bp": "bp",
+  # Tiltfile
+  "Tiltfile": "tiltfile",
+  "tiltfile": "tiltfile"
 }
 # Key: file name (the final path component, excluding the drive and root)
 # Value: filetype
@@ -3319,6 +3322,9 @@ const ft_from_name = {
   # TF (TinyFugue) mud client
   ".tfrc": "tf",
   "tfrc": "tf",
+  # Tilefile
+  "Tiltfile": "tiltfile",
+  "tiltfile": "tiltfile",
   # Trustees
   "trustees.conf": "trustees",
   # Vagrant (uses Ruby syntax)
index da5340a320f934441ead4cc3db5cf0c085dd77b1..bfdf46e1a83e846d65ff64ce3eb7e269cabedbd8 100644 (file)
@@ -1,7 +1,7 @@
 " Vim support file to detect file types
 "
 " Maintainer:          The Vim Project <https://github.com/vim/vim>
-" Last Change:         2026 Jan 11
+" Last Change:         2026 Jan 20
 " Former Maintainer:   Bram Moolenaar <Bram@vim.org>
 
 " If the filetype can be detected from extension or file name(the final path component),
@@ -1548,6 +1548,9 @@ au BufNewFile,BufRead .tcshrc*    call dist#ft#SetFileTypeShell("tcsh")
 " csh scripts ending in a star
 au BufNewFile,BufRead .login*,.cshrc*  call dist#ft#CSH()
 
+" Tiltfile
+au BufNewFile,BufRead Tiltfile.*       call s:StarSetf('tiltfile')
+
 " tmux configuration with arbitrary extension
 au BufNewFile,BufRead {.,}tmux*.conf*          call s:StarSetf('tmux')
 
index 625a4f90ad75957e6dc4c7c191d131ae2d96f33c..a082b4fb9fd36928eadcf644bd08997519c196f3 100644 (file)
@@ -888,6 +888,7 @@ def s:GetFilenameChecks(): dict<list<string>>
     tidy: ['.tidyrc', 'tidyrc', 'tidy.conf'],
     tiger: ['file.tig'],
     tilde: ['file.t.html'],
+    tiltfile: ['Tiltfile', 'tiltfile', 'file.Tiltfile', 'file.tiltfile', 'Tiltfile.debian'],
     tla: ['file.tla'],
     tli: ['file.tli'],
     tmux: ['tmuxfile.conf', '.tmuxfile.conf', '.tmux-file.conf', '.tmux.conf', 'tmux-file.conf', 'tmux.conf', 'tmux.conf.local'],
index 71388c23edbeddd837eb6558c1ad3eb6f276c3b2..61720c93610ef17e22b476eb4e995a97bc763f01 100644 (file)
@@ -734,6 +734,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2100,
 /**/
     2099,
 /**/