1
0
forked from aniani/vim

patch 9.1.0302: filetype: blueprint files are not recognized

Problem:  filetype: blueprint files are not recognized
Solution: Detect '*.bp' files as blueprint files, add
          a minimal filetype plugin (Bruno Belanyi)

See: https://source.android.com/docs/setup/build

closes: #14488

Signed-off-by: Bruno BELANYI <bruno@belanyi.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
Bruno BELANYI
2024-04-10 22:28:28 +02:00
committed by Christian Brabandt
parent 04e5363b82
commit 6be7ef5bc7
4 changed files with 20 additions and 0 deletions

View File

@@ -2998,6 +2998,9 @@ au BufNewFile,BufRead *.txt
" Blueprint markup files " Blueprint markup files
au BufNewFile,BufRead *.blp setf blueprint au BufNewFile,BufRead *.blp setf blueprint
" Blueprint build system file
au BufNewFile,BufRead *.bp setf bp
" Use the filetype detect plugins. They may overrule any of the previously " Use the filetype detect plugins. They may overrule any of the previously
" detected filetypes. " detected filetypes.
runtime! ftdetect/*.vim runtime! ftdetect/*.vim

14
runtime/ftplugin/bp.vim Normal file
View File

@@ -0,0 +1,14 @@
" Blueprint build system filetype plugin file
" Language: Blueprint
" Maintainer: Bruno BELANYI <bruno.vim@belanyi.fr>
" Latest Revision: 2024-04-10
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
setlocal comments=b:#
setlocal commentstring=#\ %s
let b:undo_ftplugin = "setlocal comments< commentstring<"

View File

@@ -126,6 +126,7 @@ def s:GetFilenameChecks(): dict<list<string>>
blade: ['file.blade.php'], blade: ['file.blade.php'],
blank: ['file.bl'], blank: ['file.bl'],
blueprint: ['file.blp'], blueprint: ['file.blp'],
bp: ['Android.bp'],
bsdl: ['file.bsd', 'file.bsdl'], bsdl: ['file.bsd', 'file.bsdl'],
bst: ['file.bst'], bst: ['file.bst'],
bzl: ['file.bazel', 'file.bzl', 'WORKSPACE', 'WORKSPACE.bzlmod'], bzl: ['file.bazel', 'file.bzl', 'WORKSPACE', 'WORKSPACE.bzlmod'],

View File

@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] = static int included_patches[] =
{ /* Add new patch number below this line */ { /* Add new patch number below this line */
/**/
302,
/**/ /**/
301, 301,
/**/ /**/