See https://github.com/bazelbuild/vim-ft-bzl/blob/master/ftdetect/bzl.vim The standard Python syntax highlighting works well. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/2088
-- Commit Summary --
* Bazel build config files are based on Python
-- File Changes --
M data/filetype_extensions.conf (2)
-- Patch Links --
https://github.com/geany/geany/pull/2088.patch https://github.com/geany/geany/pull/2088.diff
frlan commented on this pull request.
@@ -53,7 +53,7 @@ Pascal=*.pas;*.pp;*.inc;*.dpr;*.dpk;
Perl=*.pl;*.perl;*.pm;*.agi;*.pod; PHP=*.php;*.php3;*.php4;*.php5;*.phtml; Po=*.po;*.pot; -Python=*.py;*.pyw;SConstruct;SConscript;wscript; +Python=*.py;*.pyw;SConstruct;SConscript;wscript;*.bzl;BUILD;*.BUILD;BUILD.*;WORKSPACE;
Hmmm.. Not sure about WORKSPACE and BUILD. They do look quiet generic to me.
StephenWassell commented on this pull request.
@@ -53,7 +53,7 @@ Pascal=*.pas;*.pp;*.inc;*.dpr;*.dpk;
Perl=*.pl;*.perl;*.pm;*.agi;*.pod; PHP=*.php;*.php3;*.php4;*.php5;*.phtml; Po=*.po;*.pot; -Python=*.py;*.pyw;SConstruct;SConscript;wscript; +Python=*.py;*.pyw;SConstruct;SConscript;wscript;*.bzl;BUILD;*.BUILD;BUILD.*;WORKSPACE;
True, but that's what Bazel calls them. There's no conflict with existing types in the file. It's documented here: https://docs.bazel.build/versions/master/build-ref.html#packages_targets
elextr commented on this pull request.
@@ -53,7 +53,7 @@ Pascal=*.pas;*.pp;*.inc;*.dpr;*.dpk;
Perl=*.pl;*.perl;*.pm;*.agi;*.pod; PHP=*.php;*.php3;*.php4;*.php5;*.phtml; Po=*.po;*.pot; -Python=*.py;*.pyw;SConstruct;SConscript;wscript; +Python=*.py;*.pyw;SConstruct;SConscript;wscript;*.bzl;BUILD;*.BUILD;BUILD.*;WORKSPACE;
The link above says `BUILD` and `BUILD.bazel` so why `*.BUILD` or `BUILD.*`?
Unfortunately designers of software builders have no imaginations, a quick google shows at least one other builder uses `BUILD` and Ant has `build.xml` and meson `meson.build` etc So reserving the MINIMUM is important.
StephenWassell commented on this pull request.
@@ -53,7 +53,7 @@ Pascal=*.pas;*.pp;*.inc;*.dpr;*.dpk;
Perl=*.pl;*.perl;*.pm;*.agi;*.pod; PHP=*.php;*.php3;*.php4;*.php5;*.phtml; Po=*.po;*.pot; -Python=*.py;*.pyw;SConstruct;SConscript;wscript; +Python=*.py;*.pyw;SConstruct;SConscript;wscript;*.bzl;BUILD;*.BUILD;BUILD.*;WORKSPACE;
I copied that list from the official vim plugin for Bazel. Are the definitions in this file case sensitive?
The main vim source inclues Bazel support now: https://github.com/vim/vim/blob/master/runtime/filetype.vim
It specifies "*.bzl,WORKSPACE,BUILD.bazel", plus "BUILD" if has("fname_case") - I'll need to check exactly what that means.
elextr commented on this pull request.
@@ -53,7 +53,7 @@ Pascal=*.pas;*.pp;*.inc;*.dpr;*.dpk;
Perl=*.pl;*.perl;*.pm;*.agi;*.pod; PHP=*.php;*.php3;*.php4;*.php5;*.phtml; Po=*.po;*.pot; -Python=*.py;*.pyw;SConstruct;SConscript;wscript; +Python=*.py;*.pyw;SConstruct;SConscript;wscript;*.bzl;BUILD;*.BUILD;BUILD.*;WORKSPACE;
Where does filetype.vim contain `*.BUILD` and `BUILD.*` ? It has `*.bzl`, `BUILD`, `WORKSPACE` and `BUILD.bazel` which matches the bazel documentation.
As @b4n said `BUILD` and `WORKSPACE` are very general, but well, you are the first to ask for them, so no other Geany users seem to need them (or at least they havn't bothered to contribute) and so should be allowed. But please don't claim all of `*.BUILD` and `BUILD.*` when they are not mentioned in the bazel documentation.
elextr commented on this pull request.
@@ -53,7 +53,7 @@ Pascal=*.pas;*.pp;*.inc;*.dpr;*.dpk;
Perl=*.pl;*.perl;*.pm;*.agi;*.pod; PHP=*.php;*.php3;*.php4;*.php5;*.phtml; Po=*.po;*.pot; -Python=*.py;*.pyw;SConstruct;SConscript;wscript; +Python=*.py;*.pyw;SConstruct;SConscript;wscript;*.bzl;BUILD;*.BUILD;BUILD.*;WORKSPACE;
PS, the globs in filetypes.extensions are case sensitive, but not all filesystems are case sensitive, so for Ant `BUILD.XML` may be just as acceptable as `build.xml` on such a filesystem.
StephenWassell commented on this pull request.
@@ -53,7 +53,7 @@ Pascal=*.pas;*.pp;*.inc;*.dpr;*.dpk;
Perl=*.pl;*.perl;*.pm;*.agi;*.pod; PHP=*.php;*.php3;*.php4;*.php5;*.phtml; Po=*.po;*.pot; -Python=*.py;*.pyw;SConstruct;SConscript;wscript; +Python=*.py;*.pyw;SConstruct;SConscript;wscript;*.bzl;BUILD;*.BUILD;BUILD.*;WORKSPACE;
Yes, I got those from the vim plugin but that's now merged into vim so I'll update this pull request with those extensions: *.bzl;WORKSPACE;BUILD.bazel;BUILD
@StephenWassell pushed 1 commit.
71d938611e55a7f9c6ecd6d20b1861ea1241b0d4 update Bazel extensions to match https://github.com/vim/vim/blob/master/runtime/filetype.vim
@StephenWassell is this still relevant or can we close this?
I no longer use Geany so if nobody else is interested you're welcome to close.
Closed #2088.
github-comments@lists.geany.org