Skip to content

Conversation

@COLDTURNIP
Copy link

@COLDTURNIP COLDTURNIP commented Feb 11, 2026

Summary

The LSP server config loader currently hardcodes .json filenames, so JSONC-only configs (e.g. opencode.jsonc, oh-my-opencode.jsonc) are not discovered. Reuses the existing detectConfigFile() helper (already used by the main plugin config loader) inside src/tools/lsp/server-config-loader.ts:getConfigPaths() so LSP config discovery prefers .jsonc and falls back to .json.

Changes

  • Code: LSP config path discovery uses detectConfigFile() for project/user/opencode config files

  • Tests: regression coverage for JSONC-only filename lookup and .jsonc precedence

  • Docs: clarify that .jsonc priority applies to LSP tool config discovery too

Testing

  • Regression tests in src/tools/lsp/server-config-loader.test.ts

Related Issues

#1763


Summary by cubic

Fixes LSP server config discovery to load .jsonc files and prefer them over .json. Prevents missing configs when projects use JSONC-only files and keeps LSP discovery consistent with the main config loader.

  • Bug Fixes
    • getConfigPaths() now uses detectConfigFile() for project, user, and opencode configs, with .jsonc precedence.
    • Expanded tests to cover JSONC-only discovery and .jsonc-over-.json precedence across user/project/opencode, including getMergedServers.
    • Updated README and configuration docs to list .jsonc paths, platform-specific precedence, and removal steps.

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

@github-actions
Copy link
Contributor

github-actions bot commented Feb 11, 2026

All contributors have signed the CLA. Thank you! ✅
Posted by the CLA Assistant Lite bot.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 4 files

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

Auto-approved: Documentation-only changes adding .jsonc support with comprehensive tests. All changes are additive (backward compatible), tests verify new functionality works correctly. No logic regressions possible

Signed-off-by: Raphanus Lo <coldturnip@gmail.com>
@COLDTURNIP COLDTURNIP force-pushed the fix/load_lsp_from_jsonc branch from 391c8f7 to f80b72c Compare February 11, 2026 14:54
@COLDTURNIP
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

github-actions bot added a commit that referenced this pull request Feb 11, 2026
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