Starlark Language Server
The Starlark Language Server component provides intellisense features for
*.bzl and related files.
A different feature set is provided for
The language server is configured automatically, no specific configuration is required. To increase logging level, add
--log_level=info to the
You can enable/disable various codelens actions via the settings if you find them overly intrusive.
Codelens actions are the little links that appear above rule declarations:
//example/routeguide:routeguide_protothe codelens with the full label will copy the bazel label to the clipboard.
bazel build LABELin an integrated terminal.
bazel test LABELin an integrated terminal.
bazel run LABELin an integrated terminal.
debugwill launch a debug session with
bazel build LABEL --experimental_skylark_debug.
codesearchwill open up the codesearch webview that will search within the bazel query defined by
browsewill open a browser tab in the Bezel UI at the corresponding rule.
Hover over any builtin rule/function/provider/attribute to get inline documentation:
Hover over any custom starlark rule to get inline documentation:
Hover documentation for custom/third-party rules is a subscription feature.
Hover over flags in a
.bazelrc file to get flag documentation:
Click on the provided link to go to the bazel docs, or perform a codesearch for the flag in https://cs.opensource.google/bazel/bazel.
Signature help (aka "Parameter Hints") are available for rules and starlark functions:
Type to get autocompletion for builtin rules:
Autocompletion for custom and third-party starlark rules (ones defined in .bzl files within your repo, or an external repository) is a subscription feature.
ctrl+space within the context of a rule/function to get completion
suggestions without typing.
"" in a load statement to get autocompletion of available load symbols:
Completion for load symbols is a subscription feature.
Completion for flags is provided within
F12 in a bazel label (string literal) to jump to the definition of the label:
F12 over a rule name to jump the file where the symbol is declared:
Jump-to-definition for custom/third-party rules is a subscription feature.
bsv.bzl.goToLabel command (mac:
⌘+;; just below the familiar
accelerator) to pop open an input box. Enter the bazel label to navigate to and
Syntax highlighting is provided for