A beautiful terminal-based markdown preview for Neovim with live rendering, syntax highlighting, and no browser required.
- 🎨 Beautiful Themes - GitHub Dark, Monokai, Nord, Orng (cycle with
T) - 📊 Full Markdown Support - Tables, inline formatting, code blocks
- 🎯 Live Preview - Auto-updates as you type
- 🔤 Syntax Highlighting - Tree-sitter powered code blocks
- 👀 Conceal Mode - Hide formatting markers (toggle with
C) - 🚀 Streaming Demo - Watch content appear in real-time
- 💻 Terminal Native - No browser, works in tmux/ssh
- Neovim >= 0.9.0
- Bun >= 1.0.0
{
'roerohan/mark.nvim',
ft = 'markdown',
build = 'cd typescript && bun install && bun run build',
config = function()
require('mark').setup()
end,
}use {
'roerohan/mark.nvim',
ft = 'markdown',
run = 'cd typescript && bun install && bun run build',
config = function()
require('mark').setup()
end,
}:MarkPreview " Start preview
:MarkPreviewStop " Stop preview
:MarkPreviewToggle " Toggle preview| Key | Action |
|---|---|
T |
Cycle themes (GitHub → Monokai → Nord → Orng) |
C |
Toggle conceal mode |
R |
Reload file |
S |
Start streaming demo |
E |
Toggle endless streaming |
X |
Stop streaming |
[ / ] |
Adjust streaming speed |
? |
Show help |
ESC |
Exit preview |
<leader>mp " Toggle preview (default mapping)
<C-w>w " Switch between editor and previewrequire('mark').setup({
split_position = 'right', -- 'right', 'left', 'top', 'bottom'
split_size = 50, -- Percentage (1-100)
auto_start = false, -- Auto-start on markdown files
theme = 'GitHub Dark', -- 'GitHub Dark', 'Monokai', 'Nord', 'Orng'
mappings = {
toggle_preview = '<leader>mp',
},
})Set your preferred default theme:
require('mark').setup({
theme = 'Orng', -- Start with orng theme
})Available themes:
'GitHub Dark'- Clean and familiar (default)'Monokai'- Classic and vibrant'Nord'- Beautiful Nordic palette'Orng'- Warm orange accents
You can still cycle themes in the preview with the T key!
# Navigate to plugin directory
cd ~/.local/share/nvim/lazy/mark.nvim # or your plugin path
# Open test file
nvim tests/demo.md
# In Neovim
:MarkPreviewThen try:
- Press
Tto cycle through themes - Press
Cto toggle conceal mode - Press
?for help - Edit the file and watch it update live
✅ Headings (H1-H6) with colors
✅ Bold, italic, inline code
✅ Tables with automatic alignment
✅ Code blocks with syntax highlighting
✅ Lists (ordered and unordered)
✅ Blockquotes
✅ Horizontal rules
✅ Links
✅ Unicode and emoji 🎉
Preview not showing?
:lua require('mark.commands').debug_info()Check build:
ls typescript/dist/main.js # Should exist
cd typescript && bun run build # Rebuild if neededOld preview showing?
" Reload plugin
:lua package.loaded['mark.commands'] = nil
:lua require('mark').setup()Neovim (Lua) ←→ Terminal ←→ OpenTUI App (TypeScript)
│ │
├─ Commands ├─ MarkdownRenderable
├─ Window management ├─ 4 Themes
└─ Auto-save ├─ File watching
└─ Keyboard handling
GitHub Dark - Clean and familiar
Monokai - Classic and vibrant
Nord - Beautiful Nordic palette
Orng - Warm orange accents with excellent contrast
Switch between them instantly with T key!
cd typescript
# Build
npm run build
# Watch mode
npm run dev
# Test
./test.shContributions welcome! Please:
- Fork the repo
- Create a feature branch
- Submit a PR
Built with:
