Markdown linters and formatters
rumdl
Issues
Prettier
- coding/quality/linting.md
- Default Lazyvim markdown formatter
- also formats markdown code
- Plugins
hukkin/mdformat
- GitHub
- Python
- Supports plugins
- For proper GFM support, don't use Mason until
mdformat-gfm gets bundled in Mason is
installed and install the
mdformatandmdformat-gfm-gitsystem-wise
Install:
sudo pacman -S mdformat
pamac install mdformat-gfm-git
Issues:
- No Options to disable/enable rules
- FR: Configure default language for fenced code blocks
- mdformat reformats --- to _______, destroying slide seperators
- Installng mdformat-frontmatter will only fix this for the frontmatter, but not for slide seperators
DavidAnson/markdownlint-cli2
- GitHub
- NodeJS, based on the NodeJS DavidAnson/markdownlint library
- AUR package: markdownlint-cli2
- David Ansons Blog: Why markdownlint-cli2 ?
- Default linter installed by LayzVim markdown extra
- Configuration
- Looks for a config file in the current directory and all parent directories until one is found, but doesn't merge
them like
markdownlint-clidoes - Inline disabling of rules
- Looks for a config file in the current directory and all parent directories until one is found, but doesn't merge
them like
- pre-commit support
Igorshubovych/markdownlint-cli
- GitHub
- NodeJS, based on the NodeJS DavidAnson/markdownlint library
- AUR package: markdownlint-cli
- Configuration
- Config files: markdownlint-cli looks for these files in the
current directory:
.markdownlint.jsonc.markdownlint.json.markdownlint.yaml.markdownlint.yml- or for the file
.markdownlintrcin the current or all parent folders and merges them (markdownlint-cli2 doesn't merge them)- Beware:
.markdownlintrcneeds to be valid JSON (or INI), comments in the JSON file will lead tomarkdownlintsilently ignoring it!!
- Beware:
- config format
- Rules
- Config files: markdownlint-cli looks for these files in the
current directory:
- pre-commit support
Other linters / formatters
- markdown-toc API and CLI for generating a markdown TOC (table of contents) for a README or any markdown files
Stale:
- Kunde21/markdownfmt
- Last release 2023
- shurcooL/markdownfmt
- Last release 2014
- tidy-markdown
- Last release 2016
- moorereason/mdfmt
- Last commit 2018
- markdownlint/markdownlint
- Ruby, last git tag 2023-10