Skip to content

[FEATURE]: Add markdown preview toggle in file viewer sidebar #14187

Closed as not planned

Description

@southpolesteve

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

When viewing markdown files (.md, .mdx) in the file viewer sidebar, users currently see raw markdown with syntax highlighting. It would be helpful to have an option to render the markdown as formatted content.

Right now md files are effectively state for my non-coding use cases and I would like to view them formatted.

TLDR: Help me uninstall Obsidian

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Feb 18, 2026
  2. JonasGao commented on Feb 25, 2026

    @JonasGao

    If preview with a outline will be better better 😁

  3. briangruntable commented on Feb 28, 2026

    @briangruntable

    Agree with this. Currently using obsidian just to read it

  4. JonasGao commented on Feb 28, 2026

    @JonasGao

    @briangruntable @southpolesteve If you are also using OpenCode remotely, such as OpenCode web. You can give my newly created OpenMKView a try.

    The project is still in the development stage, but the basic functions have all been completed. For now, it hasn't been packaged (released) yet. You may need use 'npm run dev' or package manually yourself.

    https://github.com/dev-zapi/openmkview

    Image
  5. fengzhi09 commented on Mar 25, 2026

    @fengzhi09

    mermaid 展示也需要

  6. Kiruno-lz commented on Apr 20, 2026

    @Kiruno-lz

    Agree with this

    Without markdown rendering, it will really be hard to read.

    Especially when there are a lot of md files that need to be reviewed.

    At present, trae is used to review and commit, hoping to fully support it on opencode.

  7. removed
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    webRelates to opencode on web / desktop
    on May 3, 2026
  8. Rafik-Belkadi-Reccap commented on May 20, 2026

    @Rafik-Belkadi-Reccap

    Up, still reviewing raw markdown, painful

  9. codehuang-copilot commented on Jun 3, 2026

    @codehuang-copilot

    +1, this is exactly the issue I hit. Opened a duplicate (#30549) before finding this and have already closed it. Would love native Markdown rendering in the Desktop file viewer — README/AGENTS.md/docs/changelogs are part of the daily coding flow and switching to Obsidian/VS Code just to read them breaks the workflow.

  10. mlucascardoso commented on Jun 13, 2026

    @mlucascardoso

    Hi! We took a stab at this in our fork and would love feedback on whether the direction fits upstream — happy to open a PR if so.

    What we built:

    • A segmented Preview / Source toggle on markdown file tabs (.md/.mdx/.markdown) in the file viewer — visually following the mockup suggested earlier in this thread. Defaults to Source, so existing behavior is unchanged.
    • Preview renders through the app's existing Markdown component (marked + shiki pipeline), so highlighting, KaTeX, sanitization and copy buttons all come for free.
    • Bonus: ```mermaid fences render as actual diagrams — lazy-loaded client-side after DOMPurify, with invalid/still-streaming sources gracefully keeping the highlighted code. Works in chat messages too.
    • Diagrams support ctrl/cmd+scroll zoom (anchored at the cursor), drag-to-pan when zoomed, double-click to reset. No new dependency besides lazy-loaded mermaid itself.
    • Two small dark-theme fixes to the segmented control fell out of this (indicator contrast + selected icon color).

    Dark — Source / Preview:

    Light — Preview / Zoomed diagram (ctrl+scroll):

    Branch with the 6 commits: https://github.com/mlucascardoso/opencode/tree/markdown-mermaid

    Does this approach look right to you all? If so we'll rebase onto dev and open a PR.

  11. github-actions commented on Aug 12, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  12. papue commented on Oct 4, 2026

    @papue

    +1, it's really painful ...

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions