vim-patch:9.2.0235: filetype: wks files are not recognized (#38451)

Problem:  filetype: wks files are not recognized.
Solution: Detect *.wks, *.wks.in and *.wks.inc as wks filetype,
          include a filetype and syntax plugin (Anakin Childerhose)

The OpenEmbedded Image Creation tool, `wic` uses wic kickstarter files
to define image partition and bootloader layouts.
wks files can end with .wks, .wks.in for templated wks files, and
.wks.inc for including in other .wks files.

The autocmd for *.wks.inc needs to come before *.inc in
runtime/ftdetect.vim

Reference:
https://docs.yoctoproject.org/ref-manual/kickstart.html#openembedded-kickstart-wks-reference
https://git.openembedded.org/openembedded-core/tree/scripts/lib/wic/canned-wks

closes: vim/vim#19796

8c116bbe79
This commit is contained in:
Anakin Childerhose
2026-03-23 19:40:03 -04:00
committed by GitHub
parent 416e542992
commit 1de1c08210
4 changed files with 47 additions and 0 deletions

View File

@@ -1380,6 +1380,7 @@ local extension = {
wgsl = 'wgsl',
wbt = 'winbatch',
wit = 'wit',
wks = 'wks',
wml = 'wml',
wsf = 'wsh',
wsc = 'wsh',
@@ -2781,6 +2782,8 @@ local pattern = {
['%.t%.html$'] = 'tilde',
['%.vhdl_[0-9]'] = starsetf('vhdl'),
['vimrc'] = starsetf('vim'),
['%.wks%.in$'] = 'wks',
['%.wks%.inc$'] = 'wks',
['/Xresources/'] = starsetf('xdefaults'),
['/app%-defaults/'] = starsetf('xdefaults'),
['^Xresources'] = starsetf('xdefaults'),