emacs-bazel-mode icon indicating copy to clipboard operation
emacs-bazel-mode copied to clipboard

Open .BUILD files in bazel-build-mode

Open eklitzke opened this issue 5 years ago • 1 comments

My work uses this convention where we put the build files for third-party vendored libs into a single directory that has a bunch of files named things like nameofdep.BUILD. I've seen this convention used in other bazel repos as well, notably this is the same convention that Envoy uses: https://github.com/envoyproxy/envoy/tree/master/bazel/external

The way I've implemented this (by pushing another item to the auto-mode-alist) probably isn't right, it would be better to update the rx expression on the line above. But I don't really grok how to use rx, so if you want to close this PR and update the rx expression that would also make me happy.

eklitzke avatar May 21 '20 14:05 eklitzke

Thanks for the contribution, this makes sense.

To write this as rx expression, you'd probably use something like:

(rx (or "/BUILD" "/BUILD.bazel" ".BUILD") eos)

phst avatar May 21 '20 14:05 phst