A Neovim plugin for mo, a Markdown viewer that opens .md files in a browser with live-reload.
Add files, manage groups, and control the mo server without leaving Neovim. Supports multi-file selection via snacks.nvim, Telescope, or fzf-lua.
- mo >= 1.3.0 (installed and in PATH)
- Neovim >= 0.10
- (Optional) snacks.nvim, telescope.nvim, or fzf-lua for
:MoPick
{
"okm321/mo.nvim",
ft = { "markdown" },
opts = {},
}require("mo").setup({
port = 6275, -- mo server port
no_open = false, -- don't auto-open browser
auto_add = false, -- auto-add markdown files on BufEnter
target = nil, -- default target group
})| Command | Description |
|---|---|
:MoAdd [target] |
Add current file to mo (optional: target group) |
:MoAddDir [path] [target] |
Add all Markdown files in a directory |
:MoAddDiff [target] |
Add Markdown files changed in git (staged / unstaged / untracked) |
:MoPick [target] |
Pick files to add via snacks.nvim / Telescope / fzf-lua |
:MoStatus |
Show server status in a floating window |
:MoWatch [patterns...] |
Watch glob patterns (e.g., :MoWatch **/*.md -t docs) |
:MoRestart |
Restart the mo server |
:MoShutdown |
Shut down the mo server |
:MoClear |
Clear the mo session |
:MoPick opens a file picker listing all Markdown files in the current directory. It auto-detects installed pickers (priority: snacks.nvim > Telescope > fzf-lua).
<Tab>to toggle selection on individual files<CR>to add selected files to mo<C-a>to select all (snacks.nvim / Telescope)
:MoPick " Add to default group
:MoPick design " Add to "design" groupvim.keymap.set("n", "<leader>mo", "<cmd>MoAdd<cr>", { desc = "Add to mo" })
vim.keymap.set("n", "<leader>mp", "<cmd>MoPick<cr>", { desc = "Pick files for mo" })
vim.keymap.set("n", "<leader>ms", "<cmd>MoStatus<cr>", { desc = "mo status" })MIT — See LICENSE
This plugin wraps mo also licensed under MIT.