Skip to content

[R&D] Architecture Research: Multi-Flavor Markdown Support #157

@YousefHadder

Description

@YousefHadder

1. Current State

markdown-plus.nvim is currently architected around GitHub Flavored Markdown (GFM). The logic for parsing, formatting, and handling syntax is tightly coupled to GFM rules. While this serves a large portion of users, it creates significant limitations for those working in other ecosystems.

2. Problem Statement

As the plugin grows, we are encountering friction due to this single-flavor design:

  • Missing Syntax: Users of Obsidian, Typora, and other tools cannot use extended syntax features (e.g., ==highlight==, ++underline++, [[WikiLinks]]).
  • Context Failures: Users of Quarto and LaTeX encounter bugs where the GFM-centric parser misinterprets valid syntax (e.g., pipes | inside math blocks being treated as table separators).
  • Rigidity: There is no clean way to "switch modes" based on the project or file type.

3. Goal of this Research

The goal of this issue is to research and design a robust architecture that supports polymorphic markdown behavior. We aim to move from a "Hardcoded Logic" model to a "Capability-Based" model (likely an Adapter/Strategy pattern).

This is NOT an implementation plan yet. This issue serves as a central hub to:

  1. Identify all architectural challenges.
  2. Gather requirements for different flavors (Obsidian, Quarto, CommonMark, etc.).
  3. Discuss design patterns (Adapters, Registry, Context Detection).
  4. Formulate a roadmap for the eventual refactor.

We will use the comments below to document specific research areas, open questions, and design considerations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions