Skip to content

Add DABs LSP language client for bundle files#1852

Draft
shreyas-goenka wants to merge 4 commits intomainfrom
dabs-lsp-client
Draft

Add DABs LSP language client for bundle files#1852
shreyas-goenka wants to merge 4 commits intomainfrom
dabs-lsp-client

Conversation

@shreyas-goenka
Copy link
Contributor

@shreyas-goenka shreyas-goenka commented Mar 12, 2026

Summary

Adds a BundleLSPClient that spawns databricks experimental bundle-lsp via stdio, providing autocomplete, go-to-definition, hover, document links, and diagnostics for bundle YAML files. Restarts the LSP when the bundle target changes.

Gated behind experimental flag: users must opt in via databricks.experiments.optInto with "features.bundleLsp".

Error handling: Custom error handler suppresses crash notification popups when the CLI doesn't support the command. No restart storms — immediately gives up on server failure. revealOutputChannelOn set to Never.

Depends on: databricks/cli#4714

Test plan

  • Extension compiles
  • Manual testing with Extension Development Host
  • Tested with real deployed bundle (3 targets)

This pull request was AI-assisted by Isaac.

Introduces a BundleLSPClient that spawns `databricks bundle lsp` via
stdio to provide deployment-aware features for bundle YAML files:

- Document links: Ctrl+click on resource keys to open in workspace
- Hover: Shows resource ID, name, and workspace link

The client connects to the CLI's new hidden LSP server and activates
for all bundle YAML files (databricks.yml, databricks.yaml, etc.).
Stacks with the existing Red Hat YAML extension.

Depends on: databricks/cli#4714

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The CLI moved the LSP server from `databricks bundle lsp` to
`databricks experimental bundle-lsp`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Match all .yml/.yaml files in workspace (not just root configs) so
  the LSP server handles included bundle files
- Pass selected target to LSP server on start
- Restart LSP client when user switches bundle target
- Fix dispose() to return the stop() promise for clean shutdown

Co-authored-by: Isaac
Gate the DABs LSP client behind the "features.bundleLsp" experimental
setting to prevent failures when the CLI doesn't support the command.
Add a custom error handler to suppress crash notification popups and
prevent restart storms when the server binary exits immediately.

Co-authored-by: Isaac
@github-actions
Copy link
Contributor

If integration tests don't run automatically, an authorized user can run them manually by following the instructions below:

Trigger:
go/deco-tests-run/vscode

Inputs:

  • PR number: 1852
  • Commit SHA: 6f5801937c6012774c35e1b532d3fa63a8454dac

Checks will be approved automatically on success.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant