-
-
Notifications
You must be signed in to change notification settings - Fork 760
fix(lsp): biome project watcher #8058
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 53f5714 The changes in this PR will be included in the next version bump. This PR includes changesets to release 13 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThis PR introduces a changeset documenting two LSP improvements. It fixes an issue where the Biome Language Server would enable its project file watcher regardless of whether project rules were configured. The changes add file system watchers for nested Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.changeset/brave-tires-tap.md (1)
7-7: Drop the extra commaReads more smoothly without the comma before “if”.
-Now the watching of nested configuration files and nested ignore files is delegated to the editor, if their LSP spec supports it. +Now the watching of nested configuration files and nested ignore files is delegated to the editor if their LSP spec supports it.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
.changeset/brave-tires-tap.md(1 hunks)crates/biome_lsp/src/server.rs(3 hunks)crates/biome_lsp/src/session.rs(1 hunks)
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/../biome_lsp/src/server.tests.rs : Keep end-to-end LSP tests in ../biome_lsp/src/server.tests.rs
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/watcher.tests.rs : Place watcher tests related to workspace methods in src/workspace/watcher.tests.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace/watcher.tests.rs : Place watcher tests related to workspace methods in src/workspace/watcher.tests.rs
Applied to files:
crates/biome_lsp/src/session.rscrates/biome_lsp/src/server.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/src/workspace_watcher.rs : WorkspaceWatcher should synchronize workspace state with the filesystem and be active only in daemon mode (not used by the CLI)
Applied to files:
crates/biome_lsp/src/session.rscrates/biome_lsp/src/server.rs
📚 Learning: 2025-10-15T09:25:05.698Z
Learnt from: CR
Repo: biomejs/biome PR: 0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/../biome_lsp/src/server.tests.rs : Keep end-to-end LSP tests in ../biome_lsp/src/server.tests.rs
Applied to files:
crates/biome_lsp/src/server.rs
🪛 LanguageTool
.changeset/brave-tires-tap.md
[typographical] ~7-~7: Usually, there’s no comma before “if”.
Context: ... ignore files is delegated to the editor, if their LSP spec supports it.
(IF_NO_COMMA)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: Test (depot-windows-2022-16)
- GitHub Check: Test Node.js API
- GitHub Check: Lint project (depot-windows-2022)
🔇 Additional comments (1)
crates/biome_lsp/src/session.rs (1)
708-712: Watcher flag matches the scan kindThanks for only flipping the watcher on when we truly have a project scan; my laptop fans and I approve.
Summary
The Biome language server already uses the LSP to monitor nested configuration files.
This PR adds ignore files too, and in turn enables the Biome project watcher only if
ScanKindis::Project.Test Plan
Unfortunately, I couldn't create a test because we can't simulate file system changes after we created the server. However I did manual testing and I could see the diagnostics correctly updated when:
Docs