Skip to content

Commit

Permalink
patch 9.1.0110: filetype: add 'Config.in' filetype detection
Browse files Browse the repository at this point in the history
The 'Config.in' file type is for Buildroot configuration files.
Buildroot Config.in files use the same Kconfig backend as the Linux
kernel's Kconfig files.

Buildroot also has other filename variants that follow "Config.in.*",
they are used to distinguish multiple Config.in files in the same
directory.

See https://buildroot.org/downloads/manual/manual.html#_literal_config_in_literal_file

closes: #14038

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
  • Loading branch information
blmaier authored and chrisbra committed Feb 14, 2024
1 parent 1da0e85 commit 5f20f05
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions runtime/filetype.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,7 @@ au BufNewFile,BufRead *.kt,*.ktm,*.kts setf kotlin
au BufNewFile,BufRead *.ks setf kscript

" Kconfig
au BufNewFile,BufRead Kconfig,Kconfig.debug setf kconfig
au BufNewFile,BufRead Kconfig,Kconfig.debug,Config.in setf kconfig

" Lace (ISE)
au BufNewFile,BufRead *.ace,*.ACE setf lace
Expand Down Expand Up @@ -2780,7 +2780,7 @@ au! BufNewFile,BufRead *jarg*
au BufNewFile,BufRead *.properties_??_??_* call s:StarSetf('jproperties')

" Kconfig
au BufNewFile,BufRead Kconfig.* call s:StarSetf('kconfig')
au BufNewFile,BufRead Kconfig.*,Config.in.* call s:StarSetf('kconfig')

" Lilo: Linux loader
au BufNewFile,BufRead lilo.conf* call s:StarSetf('lilo')
Expand Down
2 changes: 1 addition & 1 deletion src/testdir/test_filetype.vim
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ def s:GetFilenameChecks(): dict<list<string>>
jsp: ['file.jsp'],
julia: ['file.jl'],
just: ['justfile', 'Justfile', '.justfile', 'config.just'],
kconfig: ['Kconfig', 'Kconfig.debug', 'Kconfig.file'],
kconfig: ['Kconfig', 'Kconfig.debug', 'Kconfig.file', 'Config.in', 'Config.in.host'],
kdl: ['file.kdl'],
kivy: ['file.kv'],
kix: ['file.kix'],
Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
110,
/**/
109,
/**/
Expand Down

0 comments on commit 5f20f05

Please sign in to comment.