blob: 129d50ee3a6716d03654718daa33c8f0c3bf55c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
---@type conform.FileFormatterConfig
return {
meta = {
url = "https://github.com/jonschlinkert/markdown-toc",
description = "API and CLI for generating a markdown TOC (table of contents) for a README or any markdown files.",
},
command = "markdown-toc",
stdin = false,
args = function(ctx)
-- use the indentation set in the current buffer, effectively allowing us to
-- use values from .editorconfig
local indent = vim.bo[ctx.buf].expandtab and (" "):rep(vim.bo[ctx.buf].tabstop) or "\t"
return { "--indent=" .. indent, "-i", "$FILENAME" }
end,
}
|