Skip to content

feat(opencode): biome LSP sensible defaults and LSP server message visibility#17709

Open
trollkotze wants to merge 8 commits intoanomalyco:devfrom
trollkotze:feat/biome-lsp-default-inline-cfg
Open

feat(opencode): biome LSP sensible defaults and LSP server message visibility#17709
trollkotze wants to merge 8 commits intoanomalyco:devfrom
trollkotze:feat/biome-lsp-default-inline-cfg

Conversation

@trollkotze
Copy link

@trollkotze trollkotze commented Mar 16, 2026

Issue for this PR

Closes #17656

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The PR offers configuration options for built-in, active by default LSPs (like biome) through opencode.json(c).

Since Biome LSP is active by default, even for projects that don't have biome configured by themselves, its default rules should be configurable on a global OpenCode level (i.e. through the global opencode.json(c)), and have more relaxed default rules for such projects which were not configured for biome and were likely not built for obeying to biome's sometimes overly strict default standards. (Same goes for other LSPs that may be active by default and where turning them off is just an inconvenient little extra step, but I haven't defined a default config for those, because they didn't annoy me like biome).

LSP configuration errors should also be clearer to see and debug. So I added that to the existing LSP status indicator as well as a dropdown, showing the last info and error messages when clicking on them, and also adding an orange light for LSP warnings that are not errors.

Such LSP messages (that are not diagnostics messages, i.e. probably mostly configuration errors or warnings) are now also being logged, including a verbose debug log (when logLevel === "debug" to quickly be able to spot and fix LSP config issues.

Biome LSP now sends a default inlineConfig when the project has no biome.json/biome.jsonc. Currently that only disables annoying complaints about Array.prototype.forEach callbacks returning a value, which is very common. But probably there are more rules that could/should be more relaxed by default.

That configuration stuff also brought some existing potential race conditions to the surface that could happen during LSP initializations when passing a config, that should be mitigated pretty okay now.

The OpenCode config schema now accepts overrides for built-in LSP servers, without also specifying the binary, so users can more easily globally customize Biome workspace settings in opencode.json without providing a full command override and also without putting a biome.json everywhere.

How did you verify your code works?

I tried it out a little bit. I also followed the implementation process (of course "vibe-coded") very closely and had to debug that race condition more by hand. Here is the shared opencode sssion: https://opncd.ai/share/EQ2Xb6xA

Screenshots / recordings

image

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

I hope this time your PR guideline compliance bot can recognize that I checked all the requirements.
There was a closing "]" missing.

Hmm... okay, maybe the spaces inside the [ ] were the problem. Let's see.

Yes, bro, I have tested my changes locally.
No, I have not included unrelated changes in this PR.

@github-actions github-actions bot added the needs:compliance This means the issue will auto-close after 2 hours. label Mar 16, 2026
@github-actions
Copy link
Contributor

Hey! Your PR title Feat/biome lsp default inline cfg doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions github-actions bot added needs:title and removed needs:compliance This means the issue will auto-close after 2 hours. labels Mar 16, 2026
@github-actions
Copy link
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@trollkotze trollkotze changed the title Feat/biome lsp default inline cfg feat(opencode): biome LSP sensible defaults and LSP server message visibility Mar 16, 2026
@trollkotze trollkotze force-pushed the feat/biome-lsp-default-inline-cfg branch 2 times, most recently from a7f90d8 to 6cdd374 Compare March 16, 2026 06:54
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.

[FEATURE]: Biome LSP sensible defaults and LSP server message visibility

1 participant