mirror of
https://github.com/cameron-martin/bazel-lsp.git
synced 2025-07-07 17:45:00 +00:00
A language server implementation for Bazel
![]() This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [protobuf](https://redirect.github.com/protocolbuffers/protobuf) | bazel_dep | minor | `29.3` -> `29.5` | --- ### Release Notes <details> <summary>protocolbuffers/protobuf (protobuf)</summary> ### [`v29.5`](https://redirect.github.com/protocolbuffers/protobuf/releases/tag/v29.5): Protocol Buffers v29.5 ### Announcements - [Protobuf News](https://protobuf.dev/news/) may include additional announcements or pre-announcements for upcoming changes. ### C++ - Remove fast-path check for non-clang compilers in MessageCreator. ([#​21612](https://redirect.github.com/protocolbuffers/protobuf/issues/21612)) ( |
||
---|---|---|
.github/workflows | ||
.vscode | ||
bazel | ||
fixtures | ||
prost | ||
src | ||
.bazelrc | ||
.bazelversion | ||
.gitattributes | ||
.gitignore | ||
BUILD | ||
Cargo.lock | ||
Cargo.toml | ||
CHANGELOG.md | ||
LICENSE | ||
MODULE.bazel | ||
MODULE.bazel.lock | ||
README.md | ||
renovate.json | ||
WORKSPACE |
Bazel LSP
This is a LSP for bazel, based on starlark-rust.
Features
- Go to definition for identifiers & labels
- Autocomplete for identifiers & labels
- Auto-import (currently only for open files)
Usage
Installation
Download a release from github releases and move it to somewhere on your $PATH
.
Alternatively, it can be installed from source by cloning this repo and building with Bazel:
bazel build //:bazel-lsp -c opt
VSCode
Ensure you have the Bazel extension installed, and add the following config to your user settings.json
:
{
"bazel.lsp.command": "bazel-lsp"
}
Restart vscode for this to take effect.
Logging
Logging can be enabled using the RUST_LOG
environment variable. For more info on the syntax of this environment variable, see the tracing_subscriber
docs.
This can be set in vscode by setting the bazel.lsp.env
configuration option:
{
"bazel.lsp.env": { "RUST_LOG": "info" },
}