All Projects → bazelbuild → vim-bazel

bazelbuild / vim-bazel

Licence: Apache-2.0 license
Vim support for Bazel

Programming Languages

Vim Script
2826 projects
C++
36643 projects - #6 most used programming language
Starlark
911 projects
java
68154 projects - #9 most used programming language
c
50402 projects - #5 most used programming language

Labels

Projects that are alternatives of or similar to vim-bazel

Tensorflow-binaries
Tensorflow GNU/Linux, MacOS binaries compiled with SSE4.1, SSE4.2 and AVX
Stars: ✭ 14 (-88.14%)
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 (-30.51%)
Mutual labels:  bazel
rules java
Java rules for Bazel
Stars: ✭ 44 (-62.71%)
Mutual labels:  bazel
witness
An API controllable webcam project
Stars: ✭ 13 (-88.98%)
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 (-11.86%)
Mutual labels:  bazel
bazel-website
Website for Bazel, a fast, scalable, multi-language and extensible build system
Stars: ✭ 16 (-86.44%)
Mutual labels:  bazel
rules dart
Dart rules for Bazel
Stars: ✭ 35 (-70.34%)
Mutual labels:  bazel
vim-bazel
Trigger bazel from vim and load errors into the quickfix list
Stars: ✭ 15 (-87.29%)
Mutual labels:  bazel
rules appengine
AppEngine rules for Bazel
Stars: ✭ 28 (-76.27%)
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 (-27.97%)
Mutual labels:  bazel
bazel-compile-commands-extractor
Goal: Enable awesome tooling for Bazel users of the C language family.
Stars: ✭ 295 (+150%)
Mutual labels:  bazel
rules gitops
This repository contains rules for continuous, GitOps driven Kubernetes deployments.
Stars: ✭ 112 (-5.08%)
Mutual labels:  bazel
wollemi
No description or website provided.
Stars: ✭ 25 (-78.81%)
Mutual labels:  bazel
monogon
The Monogon Monorepo. May contain traces of peanuts and a ✨pure Go Linux userland✨
Stars: ✭ 54 (-54.24%)
Mutual labels:  bazel
bazel-integration-testing
Framework for integration tests that call Bazel
Stars: ✭ 33 (-72.03%)
Mutual labels:  bazel
rebazel
🍃 tool for expediting bazel build workflows
Stars: ✭ 22 (-81.36%)
Mutual labels:  bazel
bazel-nx-example
⚡ Example monorepo for Nest + Angular built with Bazel
Stars: ✭ 41 (-65.25%)
Mutual labels:  bazel
sbt-bazel
Easily convert SBT projects to Bazel workspaces
Stars: ✭ 55 (-53.39%)
Mutual labels:  bazel
eclipse
Eclipse For Bazel (deprecated, see https://github.com/salesforce/bazel-eclipse instead)
Stars: ✭ 31 (-73.73%)
Mutual labels:  bazel
Grazel
A tool to migrate Android projects from Gradle to Bazel incrementally and automatically
Stars: ✭ 222 (+88.14%)
Mutual labels:  bazel

Vim Bazel

vim-bazel is a plugin for invoking bazel and interacting with bazel artifacts.

If you're looking for the Syntax and Filetype settings, that lives in vim-ft-bzl and has been integrated directly into the core-Vim syntax and filetype configuration.

Vim-bazel is currently in early development (see Development status).

For details, see the executable documentation in the vroom/ directory or the helpfiles in the doc/ directory. The helpfiles are also available via :help bazel if bazel is installed (and helptags have been generated).

DISCLAIMER: This is not an official Google product.

Commands

Use :Bazel {command} [argument...] to invoke bazel.

Usage example

:Bazel build //some/package:sometarget
INFO: Found 1 target...
Target //pkg/api:go_default_library up-to-date:
  bazel-bin/pkg/api/go_default_library.a
INFO: Elapsed time: 19.443s, Critical Path: 13.79s

Press ENTER or type command to continue

Installation

This example uses vim-plug, whose plugin-adding command is Plug.

.vimrc:

" Add maktaba and bazel to the runtimepath.
" (The latter must be installed before it can be used.)
Plug 'google/vim-maktaba'
Plug 'bazelbuild/vim-bazel'

Start vim and run

:PlugInstall

Development status

Travis Build Status

Major missing features:

  • Import build errors into vim (#1, see note below)
  • Asynchronous build support (#2)

See the full list of open issues at https://github.com/bazelbuild/vim-bazel/issues.

NOTE: If you're eager for some basic form of jump-to-error support and comfortable making some local modifications to the plugin to customize, you can try patching #11. Follow up on #1 if you're interested in getting maintainable jump-to-file functionality incorporated into the plugin.

FAQ

:Bazel vs. X

Why not just use :!bazel?

The :Bazel command is currently a thin wrapper around :!bazel that supports tab completion. Upcoming improvements will offer many more features that vim's built-in shell support won't be able to offer.

Why not just use :make?

It doesn't add significant benefits for bazel usage in practice.

You can configure vim's built-in :make command to invoke "bazel build" with :set makeprg=bazel\ build. The key benefit of vim's :make command is that it can import errors from the build tool as entries in vim's quickfix list, but limitations in vim's errorformat setting make it tricky or impossible to actually cleanly parse bazel's output for a given build.

It also doesn't add any benefit related to other bazel functionality like "test" and "query" commands.

How does it compare to dispatch.vim?

dispatch.vim's :Make command has the same limitations as :make, above, just with some asynchronous execution strategies.

You can use

:Start -wait=always bazel {command}

to shell out to bazel via dispatch.vim, which works just like :!bazel (mentioned above) but with dispatch.vim's asynchronous execution. Doesn't block vim while executing long builds, but doesn't offer tab completion.

How does it compare to Neomake?

Neomake doesn't seem to add significant benefits for bazel usage in practice.

Like :make, it doesn't support bazel's specific functionality very well and the quickfix support is tricky or impossible to configure properly.

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].