docs: Only show 2nd level headings in TOC

This commit is contained in:
hedy
2023-11-19 08:41:42 +08:00
parent c6f9f4573c
commit 4834db0802
2 changed files with 14 additions and 15 deletions

14
.nvim.lua Normal file
View File

@@ -0,0 +1,14 @@
-- https://github.com/hedyhli/markdown-toc.nvim
--
-- outline.nvim README uses markdown-toc to auto-update the ToC.
-- The following config makes only second level headings be included.
local ok, mtoc = pcall(require, 'mtoc')
if ok then
mtoc.update_config({
headings = {
pattern = '^(##)%s+(.+)$',
}
})
end