Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adigitoleo/overview.nvim
[MIRROR] View and navigate a table of contents for markup files
https://github.com/adigitoleo/overview.nvim
floating-window markdown markup neovim
Last synced: 27 days ago
JSON representation
[MIRROR] View and navigate a table of contents for markup files
- Host: GitHub
- URL: https://github.com/adigitoleo/overview.nvim
- Owner: adigitoleo
- License: 0bsd
- Created: 2024-01-29T14:49:35.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2024-05-03T17:51:54.000Z (6 months ago)
- Last Synced: 2024-05-04T17:17:40.582Z (6 months ago)
- Topics: floating-window, markdown, markup, neovim
- Language: Lua
- Homepage: https://sr.ht/~adigitoleo/overview.nvim/
- Size: 4.19 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# overview.nvim
View and navigate a table of contents for markup files.
This [NeoVim](https://neovim.io) plugin, written in Lua, extracts a table of
contents (TOC) from markup buffers and presents it in an unobtrusive floating
window. The floating overview can also be used to navigate the open buffer.
The TOC is updated as the buffer contents change (tree-sitter is not required).
Note that the floating overview window is not focusable with `:wincmd`.
Instead, please set a mapping for `require("overview.nvim").focus`
(see the configuration suggestion below).![overview.nvim demo](overview.webp)
Filetype support:
- [x] `markdown` (no setext headers yet)
- [x] `man` (improvement of `gO` or `:lua require('man').show_toc()`)
- [x] `toml` (also `dosini`)
- [ ] `tex` ([vimtex](https://github.com/lervag/vimtex) provides `vimtex-toc`)
- [x] `help`
- [ ] `asciidoc`
- [ ] `rst` (reStructuredText)
- [ ] `html`
- [ ] `xml`Miscellaneous:
- [x] list of symbols for current buffer (requires an active language server
for the buffer)
- [x] allow a (per-filetype?) configurable filter for the list
- [ ] allow multiline entries (e.g. from texlab LSP)Install the plugin using your preferred plugin manager. Alternatively, NeoVim
can load packages if they are added to your 'packpath'.### Configuration suggestion:
```lua
-- Set up key bindings to toggle/focus the TOC sidebar.
overview = require("overview.nvim")
if overview ~= nil then
vim.keymap.set("n", "gO", overview.toggle, { desc = "Toggle Overview sidebar for current buffer" })
vim.keymap.set("n", "go", overview.focus, { desc = "Toggle focus between Overview sidebar and source buffer" })
end
```Available options are described in `:help overview`.
Please send patches/queries to my [public inbox](https://lists.sr.ht/~adigitoleo/public-inbox).