SkillAgentSearch skills...

Mpls

Markdown Preview Language Server

Install / Use

/learn @mhersson/Mpls
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Markdown Preview Language Server

License Go Report Card GitHub release

Built using GLSP and Goldmark, and heavily inspired by mdpls

Overview

Markdown Preview Language Server (mpls) is a language server designed to enhance your Markdown editing experience. With live preview in the browser, mpls allows you to see your Markdown content rendered in real-time. Whether you're writing documentation or creating notes, mpls provides a seamless and interactive environment.

Built with terminal editors in mind, such as (Neo)vim and Helix, which do not have built-in Markdown rendering, mpls bridges the gap by providing a live preview feature that works alongside these editors. Additionally, mpls is compatible with any editor that supports the Language Server Protocol (LSP), making it a versatile tool for Markdown editing across various platforms. For users of Visual Studio Code and Zed, there are also dedicated extensions available at mpls-vscode-client and mpls for Zed,

demo

Features

  • Live Preview: Instantly see your Markdown changes reflected in the browser.
  • Project Awareness: Multi-file support with workspace/project awareness. Switch between markdown files in your editor and the preview updates automatically. Note: Automatic preview updates on editor focus change require the editor to send custom LSP notifications. This works in Neovim and Emacs (see configuration examples below), but is not currently supported in Helix as it cannot send custom events to LSP servers.
  • Interactive Link Navigation: Click on markdown links in the preview to open the linked file in your editor. Navigate your documentation seamlessly between browser and editor.
  • Flexible Preview Modes:
    • Single-page mode (default): All files update in the same browser window, perfect for focused editing.
    • Multi-tab mode (--tabs): Each file opens in its own browser tab for side-by-side viewing.
  • Presentation Mode: Automatically transform your markdown into a slideshow presentation, or use explicit markers for full control over slide boundaries and layout.

Built with Goldmark

mpls is built using Goldmark, a Markdown parser written in Go. Goldmark is known for its extensibility and performance, making it an ideal choice for mpls.

Goldmark extensions

mpls utilizes several of Goldmark's extensions to enhance the Markdown rendering experience:

Always enabled

  • Github Flavored Markdown: Goldmark's built in GFM extension ensures Table, Strikethrough, Linkify and TaskList elements are displayed correctly.
  • Math Rendering: The katex extension enables the rendering of LaTeX-style mathematical expressions using KaTeX. Please note that the KaTeX extension requires cgo and will only be included if mpls is built with CGO_ENABLED=1. This option is not enabled for the prebuilt binaries.
  • Metadata: The meta extension parses metadata in YAML format.
  • Syntax highlighting: The highlighting extension adds syntax-highlighting to the fenced code blocks.
  • GitHub-style Alerts: Built-in support for [!NOTE], [!TIP], [!IMPORTANT], [!WARNING], and [!CAUTION] blockquotes, rendered as styled alert boxes.

Optional

  • Emoji: The emoji extension enables emoji support.
  • Footnotes: The footnote extension enables footnotes.
  • Wikilinks rendering: The wikilink extension enables parsing and rendering of [[wiki]] -style links. (Note: image preview does not work for wikilinks)

If you want a new Goldmark extension added to mpls please look here.

Mermaid

mpls supports the display of diagrams and flowcharts by integrating Mermaid.js, a powerful JavaScript library for generating diagrams from text definitions.

PlantUML

mpls supports PlantUML, a powerful tool for creating UML diagrams from plain text descriptions. This integration allows you to easily embed PlantUML code in your markdown files. Diagrams are rendered upon saving and only if the UML code has changed.

[!NOTE]

External HTTP calls are made only when UML code is present in the markdown and has changed, as well as when a file is opened. For users concerned about security, you can host a PlantUML server locally and specify the --plantuml-server flag to ensure that no external calls are made.

Install

[!TIP]

For Neovim users: mpls can be installed with mason.nvim

:MasonInstall mpls

Homebrew (macOS and Linux)

The easiest way to install and keep mpls updated:

brew tap mhersson/formulas
brew install mpls

To update to the latest version:

brew upgrade mpls

Go Install

If you already have go installed you can just run:

go install github.com/mhersson/mpls@latest

Prebuilt Binaries

Download one of the prebuilt release binaries from the Releases page.

  1. Download the appropriate tar.gz file for your operating system.

  2. Extract the contents of the tar.gz file. You can do this using the following command in your terminal:

    tar -xzf mpls_<version>_linux_amd64.tar.gz
    

    (Replace <version> with the actual version of the release.)

  3. Copy the extracted binary to a directory that is in your system's PATH. For example:

    sudo cp mpls /usr/local/bin/
    
<details> <summary>Build From Source</summary>

If you otherwise prefer to build manually from source, if you want the KaTeX math extension, or if no prebuilt binaries are available for your architecture, follow these steps:

  1. Clone the repository:

    git clone https://github.com/mhersson/mpls.git
    cd mpls
    
  2. Build the project:

    You can build the project using the following command:

    To include the math extension, you need to set CGO_ENABLED=1 before running this command:

    make build
    

    This command will compile the source code and create an executable.

  3. Install the executable:

    You have two options to install the executable:

    • Option 1: Copy the executable to your PATH:

      After building, you can manually copy the executable to a directory that is in your system's PATH. For example:

      sudo cp mpls /usr/local/bin/
      
    • Option 2: Use make install if you are using GOPATH:

      If the GOPATH is in your PATH, you can run:

      make install
      

      This will install the executable to your $GOPATH/bin directory.

</details>

Verify the installation:

After installation, you can verify that mpls is installed correctly by running:

mpls --version

This should display the version of the mpls executable.

Command-Line Options

The following options can be used when starting mpls:

| Flag | Description | | ------------------------ | -------------------------------------------------------------------------------- | | --browser | Specify web browser to use for the preview. (1) | | --code-style | Sets the style for syntax highlighting in fenced code blocks. (2) | | --dark-mode | DEPRECATED: Use --theme dark instead. Will be removed in a future release. | | --enable-emoji | Enable emoji support | | --enable-footnotes | Enable footnotes | | --enable-wikilinks | Enable rendering of [[wiki]] -style links | | --full-sync | Sync the entire document for every change being made. (3) | | --help | Displays help information about the available options. | | --list-themes | List all available themes and exit | | --no-auto | Don't open preview automatically | | --plantuml-disable-tls | Disable encryption on requests to the PlantUML server | | --plantuml-path | Specify the base path for the PlantUML server | | --plantuml-server | Specify the host for the PlantUML server | | --port | Set a fixed port for the preview server | | --tabs | Enable multi-tab preview mode. Each file opens in its own browser tab. (4) | | --theme | Set the preview theme (light, dark, or any of the provided themes). (5) | | --version

View on GitHub
GitHub Stars196
CategoryDevelopment
Updated2d ago
Forks4

Languages

Go

Security Score

95/100

Audited on Apr 6, 2026

No findings