-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmarkdown-toc.lua
More file actions
40 lines (38 loc) · 1 KB
/
Copy pathmarkdown-toc.lua
File metadata and controls
40 lines (38 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
local M = {
"FoamScience/markdown-toc.nvim",
ft = { "markdown", "rmd" },
branch = "no-nvim-clutter",
dependencies = {
"nvim-treesitter/nvim-treesitter", -- for efficient parsing
"folke/snacks.nvim",
--"nvim-telescope/telescope.nvim", -- for picker UI
},
build = ":TSInstall markdown",
}
M.config = function()
require("mtoc").setup({
debug = false,
picker = {
preferred = "snacks",
},
headings = {
before_toc = false,
min_depth = 1,
max_depth = 4,
},
fences = {
start_text = { "mtoc-start", "mtoc-old-start" },
end_text = { "mtoc-end", "mtoc-old-end" },
},
auto_update = {
enabled = true,
events = { "BufWritePre" },
pattern = "*.{md,mdown,mkd,mkdn,markdown,mdwn}",
suppress_pollution = true,
},
toc_list = {
numbered = false,
},
})
end
return M