All Projects → lakshayg → vim-bazel

lakshayg / vim-bazel

Licence: other
Trigger bazel from vim and load errors into the quickfix list

Programming Languages

Vim Script
2826 projects

Projects that are alternatives of or similar to vim-bazel

rules dart
Dart rules for Bazel
Stars: ✭ 35 (+133.33%)
Mutual labels:  bazel
bazel-eclipse
This repo holds two IDE projects. One is the Eclipse Feature for developing Bazel projects in Eclipse. The Bazel Eclipse Feature supports importing, building, and testing Java projects that are built using the Bazel build system. The other is the Bazel Java Language Server, which is a build integration for IDEs such as VS Code.
Stars: ✭ 104 (+593.33%)
Mutual labels:  bazel
Grazel
A tool to migrate Android projects from Gradle to Bazel incrementally and automatically
Stars: ✭ 222 (+1380%)
Mutual labels:  bazel
Tensorflow-binaries
Tensorflow GNU/Linux, MacOS binaries compiled with SSE4.1, SSE4.2 and AVX
Stars: ✭ 14 (-6.67%)
Mutual labels:  bazel
rules sass
Sass rules for Bazel
Stars: ✭ 47 (+213.33%)
Mutual labels:  bazel
android-build-eval
This project includes Uber-agnostic auto-generated project(s) with a comparable complexity to existing Uber Production mobile apps. These are buildable on Buck, Bazel and Gradle- therefore enable build time benchmarking.
Stars: ✭ 82 (+446.67%)
Mutual labels:  bazel
bazel-latex
Bazel build system rules for LaTeX
Stars: ✭ 67 (+346.67%)
Mutual labels:  bazel
bazel-integration-testing
Framework for integration tests that call Bazel
Stars: ✭ 33 (+120%)
Mutual labels:  bazel
rules gitops
This repository contains rules for continuous, GitOps driven Kubernetes deployments.
Stars: ✭ 112 (+646.67%)
Mutual labels:  bazel
wollemi
No description or website provided.
Stars: ✭ 25 (+66.67%)
Mutual labels:  bazel
monogon
The Monogon Monorepo. May contain traces of peanuts and a ✨pure Go Linux userland✨
Stars: ✭ 54 (+260%)
Mutual labels:  bazel
bazel-compile-commands-extractor
Goal: Enable awesome tooling for Bazel users of the C language family.
Stars: ✭ 295 (+1866.67%)
Mutual labels:  bazel
bazel-nx-example
⚡ Example monorepo for Nest + Angular built with Bazel
Stars: ✭ 41 (+173.33%)
Mutual labels:  bazel
rebazel
🍃 tool for expediting bazel build workflows
Stars: ✭ 22 (+46.67%)
Mutual labels:  bazel
rules ruby
Ruby Rules for Bazel. It is, perhaps, production-ready. This project builds atop the work of Yugui, whose original rules can be found at https://github.com/yugui/rules_ruby. Please be aware there is an active fork of this project maintained by Coinbase at https://github.com/coinbase/rules_ruby.
Stars: ✭ 85 (+466.67%)
Mutual labels:  bazel
rules ocaml
OCaml build rules for Bazel
Stars: ✭ 38 (+153.33%)
Mutual labels:  bazel
rules appengine
AppEngine rules for Bazel
Stars: ✭ 28 (+86.67%)
Mutual labels:  bazel
eclipse
Eclipse For Bazel (deprecated, see https://github.com/salesforce/bazel-eclipse instead)
Stars: ✭ 31 (+106.67%)
Mutual labels:  bazel
rules java
Java rules for Bazel
Stars: ✭ 44 (+193.33%)
Mutual labels:  bazel
bazel-website
Website for Bazel, a fast, scalable, multi-language and extensible build system
Stars: ✭ 16 (+6.67%)
Mutual labels:  bazel

vim-bazel

This plugin allows invoking bazel from vim

Commands

:Bazel {command} [arguments...]

This is identical to calling :!bazel {command} [arguments...] except when the command is "build" or "test", in which case, it provides some niceties

  • Errors from the compiler are loaded into the quickfix list
  • Test failure logs are loaded into the quickfix list
  • Parses errors due to missing dependencies in bazel target definitions
  • If no targets are specified, it calls bazel for the current file
  • If the current file is a BUILD file, calls the command for all the targets in the BUILD file

Some other general improvements:

  • Adds bazel-bin and bazel- to the path so gf and other related command work seamlessly
  • Provides the :Bld command to jump to BUILD files

Note: It is currently tuned for C++ development in the sense that the errorformat is set to recognize error messages from gcc/clang

Command completion

To enable completion of targets in bazel commands, vim-bazel tries to determine the location of the bazel bash completion script. If target completion does not work, set g:bazel_bash_completion_path to the path of the bazel bash completion script on your system. To locate the script on your system see: https://bazel.build/install/completion

let g:bazel_bash_completion_path = "/usr/local/etc/bash_completion.d/bazel-complete.bash"

Asynchronous builds

vim-bazel can be used with async plugins to run builds in the background. This can be done by setting g:bazel_make_command. Here are some examples on how to set this up with various plugins:

tpope/vim-dispatch        let g:bazel_make_command = "Make"
skywind3000/asyncrun.vim  let g:bazel_make_command = "AsyncRun -program=make"
hauleth/asyncdo.vim       let g:bazel_make_command = "AsyncDo bazel"

Might do in the future

  • Unit tests
  • Support for languages besides C++

License

Copyright (c) Lakshay Garg. Distributed under the same terms as Vim itself. See :help license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].