Skip to content

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

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

feat(lsp): add Marksman language server for Markdown#42936
jpds wants to merge 1 commit into
anomalyco:devfrom
jpds:marksman-lsp

Conversation

@jpds

@jpdsjpds 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.

Sign up for freeto 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.

2 participants

@jpds@Enough1122