markdownlint-lsp
v0.9.2
Published
A Language Server Protocol (LSP) implementation for markdownlint
Maintainers
Readme
markdownlint-lsp
✨ This project was entirely vibe coded! ✨
No formal planning was harmed in the making of this LSP server. Pure vibes only.
A Language Server Protocol (LSP) implementation for markdownlint, providing real-time linting for Markdown files in any editor that supports LSP.
Installation
# Global installation
npm install -g markdownlint-lsp
# Or install locally for development
npm install markdownlint-lspThis package uses pnpm as its package manager.
Usage
The LSP server can be started directly:
markdownlint-lsp-server --stdioMost LSP-compatible editors will automatically detect and use the server via the package.json bin entry. The server communicates over stdio and follows the standard LSP protocol.
Configuration
The server supports hierarchical configuration loading, searching from the file being linted up to the workspace root. Configuration files are discovered in the following precedence order:
CLI2-style Configuration
.markdownlint-cli2.jsonc.markdownlint-cli2.yaml/.markdownlint-cli2.yml.markdownlint-cli2.cjs/.markdownlint-cli2.mjspackage.json(withmarkdownlint-cli2key, workspace root only)
Standard markdownlint Configuration
.markdownlint.jsonc.markdownlint.json.markdownlint.yaml/.markdownlint.yml.markdownlint.cjs/.markdownlint.mjs
RC-style Configuration
.markdownlintrc.markdownlint/config
Ignore Patterns
The .markdownlintignore file is also supported for ignoring specific files or directories, following standard .gitignore semantics. Bare directory names (e.g., dist) will recursively ignore everything under that directory.
Example Configuration
{
"extends": "default",
"rules": {
"MD013": false
},
"ignores": ["dist", "coverage"]
}Features
- Real-time linting: Immediate feedback as you edit Markdown files
- Hierarchical configuration: Configuration files are loaded from the document directory up to the workspace root
- Multiple formats: Supports JSON, YAML, and JavaScript configuration files
- File watching: Automatically re-validates all open documents when configuration files change
- Full markdownlint compatibility: Uses the markdownlint library under the hood
- RC-style configuration: Follows npm rc package standards for
.markdownlintrcfiles
License
This project is licensed under the MIT License.
