Skip to content

Require Biome project opt-in for built-in LSP - #11

Open
cosmosjeon wants to merge 2 commits into
code-yeongyu:mainfrom
cosmosjeon:lazycodex/avoid-biome-auto-lsp
Open

Require Biome project opt-in for built-in LSP#11
cosmosjeon wants to merge 2 commits into
code-yeongyu:mainfrom
cosmosjeon:lazycodex/avoid-biome-auto-lsp

Conversation

@cosmosjeon

@cosmosjeon cosmosjeon commented Jun 13, 2026

Copy link
Copy Markdown

Summary

  • Gate the built-in Biome LSP server behind project opt-in when resolving by file path.
  • Treat biome.json, biome.jsonc, or a package.json dependency on @biomejs/biome as opt-in.
  • Preserve explicit project/user LSP config behavior and existing pathless resolver behavior.
  • Pass file or directory paths from diagnostics call sites so the resolver can avoid starting Biome in unrelated workspaces.

Validation

  • npx vitest --run test/server-resolution.test.ts
  • npm test
  • npm run check
  • Manual MCP CLI QA: no-config /tmp/.../style.css returned No LSP server configured for extension: .css, with no @biomejs/biome or biome lsp process before/after.
  • Manual MCP CLI QA: biome.json fixture returned No diagnostics found, and no Biome process remained after cleanup.

Notes

  • Tag: lazycodex-generated
  • This fixes the source MCP package LazyCodex vendors for its LSP integration.

Summary by cubic

Require explicit Biome project opt-in for the built-in LSP when resolving by file or directory paths. Prevents starting Biome in unrelated workspaces; pathless resolution and explicit project/user LSP config remain unchanged.

  • Bug Fixes
    • Gate built-in Biome on biome.json, biome.jsonc, or @biomejs/biome in package.json (any dependency field).
    • Pass file/dir paths to the resolver and filter available servers so Biome is excluded unless opted in.
    • Add tests covering no-opt-in, biome.json/biome.jsonc, and @biomejs/biome dependency cases.

Written for commit f3b0dc7. Summary will update on new commits.

Review in cubic

@cosmosjeon
cosmosjeon requested a review from code-yeongyu as a code owner June 13, 2026 02:03
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