BUILD file support
IntelliJ with Bazel

BUILD file support

BUILD file / Starlark language support is bundled with the bazel plugin.


  • Syntax highlighting of BUILD files and ‘.bzl’ Starlark extensions.
  • IDE navigation support:
    • Find usages of a build target.
    • Find usages of functions defined in Starlark extensions.
    • Navigate to a referenced target, including those outside your project.
    • Navigate to external files referenced by BUILD labels (e.g. java classes, other resources).
    • Relevant BUILD labels are included when finding usages of non-BUILD files and directories.
    • Links to external documentation for built-in symbols.
  • Refactoring support:
    • Rename support for BUILD targets, function parameters, local variables, etc.
    • BUILD references are updated when renaming/moving directories, files, java classes.
  • Code completion for:
    • Labels (targets, files, package paths, qualified class names, etc.).
    • Bazel rule names, attributes, and other built-in symbols.
    • Symbols in scope (local variables, symbols imported via a ‘load’ statement, function parameters, etc.).
  • Glob resolution:
    • Expand globs via the ‘Goto reference’ action, showing the files referenced by a glob.
    • Glob references included in the ‘find usages’ action.
  • Other IDE features:
    • Error and warning annotations, with quick-fix suggestions.
    • File structure view.
    • Customizable color scheme.
  • Buildifier file formatting integration.

Example screenshots

Find usages of BUILD targets and Starlark functions



Navigate before

Navigate after

Customizable syntax highlighting



Auto-complete target labels, file paths, built-in names

Autocomplete file paths

Autocomplete Bazel targets

Autocomplete rule names