Skip to content

Conversation

@processtrader
Copy link
Contributor

@processtrader processtrader commented Jan 5, 2026

Summary

This PR fixes the yaml-ls language server which was failing to initialize due to incorrect executable paths and restrictive root detection.

Changes

YAML LSP (yaml-ls)

  • Provisioning Strategy: Switched from hardcoded JS paths to bun x yaml-language-server --stdio. This ensures the server works reliably by using the package manager to resolve the binary, avoiding "file not found" errors caused by version-specific path changes in node_modules.
  • Root Detection: Added support for common YAML project files (.yamllint, kustomization.yaml, docker-compose.yaml) to correctly identify workspace roots in non-Node.js projects.
  • Default Configuration: Enabled completion, hover, validation, and schemaStore by default in the server initialization options.

Verification

  • Verified that yaml-ls now correctly identifies syntax errors and provides schema-based diagnostics.
  • Verified that the server spawns correctly using bun x.
image

Issue: #7842

With the changes, meaning, LSP working:

image

Latest OpenCode 1.1.14:

image

Adding again a new key, with the fix applied:

image image

@github-actions
Copy link
Contributor

github-actions bot commented Jan 5, 2026

The following comment was made by an LLM, it may be inaccurate:

Duplicate Check Results

No duplicate PRs found.

All searches returned only PR #6986 (the current PR), indicating that there are no other open or recently-merged PRs addressing:

  • yaml-ls initialization issues
  • Bootstrap environment fixes
  • ESM/require compatibility problems
  • Language server provisioning strategy
  • YAML root detection

This appears to be the first PR tackling these yaml-ls and environment stability issues.

@processtrader processtrader force-pushed the fix-yaml-ls-and-bootstrap branch 2 times, most recently from 71a5237 to b514df7 Compare January 11, 2026 18:52
@github-actions
Copy link
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@processtrader
Copy link
Contributor Author

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

Issue #7842

@processtrader processtrader force-pushed the fix-yaml-ls-and-bootstrap branch from b514df7 to e1d22ad Compare January 21, 2026 20:39
@processtrader
Copy link
Contributor Author

@rekram1-node any chance to consider this as valid/useful? thanks!

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant