Project: /_project.yaml Book: /_book.yaml
{% include “_buttons.html” %}
This page covers how to integrate Bazel with IDEs, such as IntelliJ, Android Studio, and CLion (or build your own IDE plugin). It also includes links to installation and plugin details.
IDEs integrate with Bazel in a variety of ways, from features that allow Bazel executions from within the IDE, to awareness of Bazel structures such as syntax highlighting of the BUILD
files.
If you are interested in developing an editor or IDE plugin for Bazel, please join the #ide
channel on the Bazel Slack or start a discussion on GitHub.
Official plugin for IntelliJ, Android Studio, and CLion. The plugin is open source{: .external}.
This is the open source version of the plugin used internally at Google.
Features:
BUILD
files into the IDE with semantic awareness of Bazel targets.BUILD
and .bzl
filesTo install, go to the IDE's plugin browser and search for Bazel
.
To manually install older versions, download the zip files from JetBrains' Plugin Repository and install the zip file from the IDE's plugin browser:
rules_xcodeproj{: .external}, Tulsi{: .external}, and XCHammer{: .external} generate Xcode projects from Bazel BUILD
files.
Official plugin for VS Code.
Features:
.bzl
files during a build (set breakpoints, step through code, inspect variables, and so on)Find the plugin on the Visual Studio marketplace{: .external}. The plugin is open source{: .external}.
See also: Autocomplete for Source Code
Find the language-bazel
package{: .external} on the Atom package manager.
See also: Autocomplete for Source Code
See bazelbuild/vim-bazel
on GitHub{: .external}
See also: Autocomplete for Source Code
See bazelbuild/bazel-emacs-mode
on GitHub{: .external}
See also: Autocomplete for Source Code
Lavender{: .external} is an experimental project for generating Visual Studio projects that use Bazel for building.
Bazel Eclipse Feature{: .external} is a set of plugins for importing Bazel packages into an Eclipse workspace as Eclipse projects.
hedronvision/bazel-compile-commands-extractor
enables autocomplete, smart navigation, quick fixes, and more in a wide variety of extensible editors, including VSCode, Vim, Emacs, Atom, and Sublime. It lets language servers, like clangd and ccls, and other types of tooling, draw upon Bazel's understanding of how cc
and objc
code will be compiled, including how it configures cross-compilation for other platforms.
georgewfraser/java-language-server
- Java Language Server (LSP) with support for Bazel-built projects
Bazel watcher{: .external} is a tool for building Bazel targets when source files change.
Read the IDE support blog post to learn more about the Bazel APIs to use when building an IDE plugin.