https://github.com/tttol/md-outline.nvim
This is a NeoVim plugin that displays the outline of markdown file neovim
https://github.com/tttol/md-outline.nvim
Last synced: 4 months ago
JSON representation
This is a NeoVim plugin that displays the outline of markdown file neovim
- Host: GitHub
- URL: https://github.com/tttol/md-outline.nvim
- Owner: tttol
- License: mit
- Created: 2025-10-30T22:15:36.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-11-10T21:45:25.000Z (6 months ago)
- Last Synced: 2025-11-29T09:58:37.353Z (5 months ago)
- Language: Lua
- Size: 110 MB
- Stars: 4
- Watchers: 0
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-neovim-sorted - tttol/md-outline.nvim
- awesome-neovim - tttol/md-outline.nvim - Automatically displays an outline for Markdown files. (Programming Languages Support / Markdown and LaTeX)
README
# md-outline.nvim
A Neovim plugin that displays a live outline of your markdown files in a split window.

## Features
- **Automatic outline management**: Opens automatically when entering markdown files, closes when leaving
- **Real-time updates**: Outline content updates as you edit the file
- **Current heading highlight**: Highlights the heading corresponding to your cursor position
- **Auto-sync on buffer switch**: Automatically updates the outline when switching between markdown files

## Installation(example for [lazy.nvim](https://github.com/folke/lazy.nvim))
Simple installation
```lua:.~/.config/nvim/plugins/md-outline.lua
return {
'tttol/md-outline.nvim',
}
```
To configure options
```lua:.~/.config/nvim/plugins/md-outline.lua
return {
'tttol/md-outline.nvim',
config = function()
require('md-outline').setup({
auto_open = false -- default: true
})
end
}
```
## Usage
### Basic Commands
- `:MdoOpen` - Open the markdown outline in a split window
- `:MdoClose` - Close the outline window
### Configuration
```lua
require('md-outline').setup({
auto_open = true -- Automatically open outline for markdown files (default: true)
})
```
#### Options
- `auto_open` (boolean, default: `true`): Enable/disable automatic outline opening when entering markdown files
## How It Works
When you open a markdown file:
1. The outline window opens automatically on the right side (if `auto_open` is enabled)
2. All headings (`#`, `##`, `###`, etc.) are extracted and displayed with proper indentation
3. As you move your cursor, the current heading is highlighted in the outline
4. When you edit the file, the outline updates in real-time
5. When you switch to a non-markdown file, the outline closes automatically
## License
MIT