patch 9.1.0302: filetype: blueprint files are not recognized Commit: https://github.com/vim/vim/commit/6be7ef5bc734ce6045d6f919f1a8559a3fa7f2fd Author: Bruno BELANYI <br...@belanyi.fr> Date: Wed Apr 10 22:28:28 2024 +0200
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 <br...@belanyi.fr> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/runtime/filetype.vim b/runtime/filetype.vim index 14f633a2a..99ac2028e 100644 --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -2998,6 +2998,9 @@ au BufNewFile,BufRead *.txt " Blueprint markup files 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 " detected filetypes. runtime! ftdetect/*.vim diff --git a/runtime/ftplugin/bp.vim b/runtime/ftplugin/bp.vim new file mode 100644 index 000000000..cb925cb0e --- /dev/null +++ b/runtime/ftplugin/bp.vim @@ -0,0 +1,14 @@ +" Blueprint build system filetype plugin file +" Language: Blueprint +" Maintainer: Bruno BELANYI <bruno....@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<" diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim index 0af6e63d8..ddcd243dd 100644 --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -126,6 +126,7 @@ def s:GetFilenameChecks(): dict<list<string>> blade: ['file.blade.php'], blank: ['file.bl'], blueprint: ['file.blp'], + bp: ['Android.bp'], bsdl: ['file.bsd', 'file.bsdl'], bst: ['file.bst'], bzl: ['file.bazel', 'file.bzl', 'WORKSPACE', 'WORKSPACE.bzlmod'], diff --git a/src/version.c b/src/version.c index 2f049c942..5fb7b1f82 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 302, /**/ 301, /**/ -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/E1rueoY-002o47-Rr%40256bit.org.