vim-patch:9.1.2100: filetype: tiltfiles are not recognized (#37477)

Problem:  filetype: tiltfiles are not recognized
Solution: Detect Tiltfiles.* and *.tiltfiles as tiltfile  filetype.
          (Luis Davim)

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

fixes:  vim/vim#19214
closes: vim/vim#19218

ff0e5d994c

Co-authored-by: Luis Davim <luis.davim@gmail.com>
This commit is contained in:
zeertzjq
2026-01-21 07:34:51 +08:00
committed by GitHub
parent 68e0b1bd01
commit 87276db7f9
2 changed files with 6 additions and 0 deletions

View File

@@ -1299,6 +1299,8 @@ local extension = {
tfvars = 'terraform-vars',
thrift = 'thrift',
tig = 'tiger',
Tiltfile = 'tiltfile',
tiltfile = 'tiltfile',
tla = 'tla',
tli = 'tli',
toml = 'toml',
@@ -1935,6 +1937,8 @@ local filename = {
['tidy.conf'] = 'tidy',
tidyrc = 'tidy',
['.tidyrc'] = 'tidy',
Tiltfile = 'tiltfile',
tiltfile = 'tiltfile',
['.tmux.conf'] = 'tmux',
['Cargo.lock'] = 'toml',
['/.cargo/config'] = 'toml',
@@ -2757,6 +2761,7 @@ local pattern = {
['termcap'] = starsetf(function(_path, _bufnr)
return require('vim.filetype.detect').printcap('term')
end),
['^Tiltfile%.'] = starsetf('tiltfile'),
['%.t%.html$'] = 'tilde',
['%.vhdl_[0-9]'] = starsetf('vhdl'),
['vimrc'] = starsetf('vim'),

View File

@@ -885,6 +885,7 @@ func s:GetFilenameChecks() abort
\ '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'],