Skip to content

feat(lsp): add Marksman language server for Markdown - #42936

Closed
jpds wants to merge 1 commit into
anomalyco:devfrom
jpds:marksman-lsp
Closed

jpds wants to merge 1 commit into
anomalyco:devfrom
jpds:marksman-lsp

Conversation

@jpds

@jpds jpds commented Aug 16, 2026

Copy link
Copy Markdown

Issue for this PR

None.

Type of change

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

What does this PR do?

Adds support for using https://github.com/artempyanykh/marksman as an LSP for Markdown.

How did you verify your code works?

Deployed the Nix flake for this branch and verified by having an LLM create and navigate a fake notes collection.

Screenshots / recordings

If this is a UI change, please include a screenshot or recording.

Checklist

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

If you do not follow this template your PR will be automatically rejected.

@Enough1122

Copy link
Copy Markdown

AI code review — automated review for reference; please use your judgment.

  1. packages/opencode/src/lsp/language.ts — unlike the sibling Taplo change (feat(lsp): add Taplo language server for TOML #42937), this PR adds the server but does not register .md/.markdown in LANGUAGE_EXTENSIONS; if that map participates in deciding which built-in server attaches to a file (as .toml": "toml" just did), Marksman may never be selected despite being registered — please either add the two mappings for consistency or explain why Markdown is exempt.

  2. packages/opencode/src/lsp/server.ts:1988 — spawn(bin, ["server"]) relies on stdio being Marksman's default transport (it is today); passing --stdio explicitly would pin the contract against a future CLI default change — cheap insurance for a long-lived builtin entry.

  3. Nit — packages/web/src/content/docs/lsp.mdx:33 — same follow-up as other manual servers: Marksman ships single static binaries on GitHub releases, so an auto-install path would spare most users the manual step; fine to defer.

Overall: clean addition following the established builtin-server pattern (registration, graceful missing-binary no-op, root markers, alphabetized docs). Item 1 is the one thing to verify before merge. Thanks!

@jpds

jpds commented Aug 21, 2026

Copy link
Copy Markdown
Author

Point 1 isn't relevant - Markdown is already in LANGUAGE_EXTENSIONS.

As a Nix user, 3 and the concept of auto-installing things from the internet gets a "no" from me.

@github-actions

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

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.

2 participants