Markdown Extra
lang.markdown adds editing support for prose-heavy repositories, docs sites,
and README work.
Enable it
Section titled “Enable it”-- ~/.config/blak/lua/blak/user.luareturn { extras = { enabled = { "lang.markdown", }, },}Or enable it with:
:BlakExtras enable lang.markdownWhat it adds
Section titled “What it adds”| Surface | Contribution |
|---|---|
| Treesitter | markdown, markdown_inline |
| Mason | prettier, prettierd, markdownlint |
| LSP | marksman |
| Formatting | prettierd, falling back to prettier, for markdown |
| Linting | markdownlint for markdown |
Configure Marksman
Section titled “Configure Marksman”Marksman is registered as marksman. Add server options there if needed:
return { extras = { enabled = { "lang.markdown" }, }, lsp = { servers = { marksman = { filetypes = { "markdown" }, }, }, },}Configure formatting
Section titled “Configure formatting”The default uses prettierd first and falls back to prettier:
return { extras = { enabled = { "lang.markdown" }, }, format = { formatters_by_ft = { markdown = { "prettierd", "prettier", stop_after_first = true }, }, },}To use only the plain Prettier binary:
return { extras = { enabled = { "lang.markdown" }, }, format = { formatters_by_ft = { markdown = { "prettier" }, }, },}Configure linting
Section titled “Configure linting”The extra maps Markdown files to markdownlint. Keep rules in project config
such as .markdownlint.json, or disable the editor lint hook:
return { extras = { enabled = { "lang.markdown" }, }, lint = { linters_by_ft = { markdown = {}, }, },}Install and verify
Section titled “Install and verify”:BlakToolsInstall:BlakTreesitterInstall:BlakDoctorOpen a Markdown file and check :LspInfo for marksman.