
dprint
by jasonkuhrt
Tool configurations
SKILL.md
name: dprint description: Use when working with dprint formatter - configuration, plugins, CLI commands, editor integration, or global setup.
dprint
Fast pluggable code formatter.
Config Resolution
CC Misconception: "dprint is project-local only." Wrong. dprint supports:
- Ancestor lookup - walks UP directory tree for
dprint.json - Global fallback -
~/.config/dprint/dprint.json(orDPRINT_CONFIG_DIR) - Explicit path -
dprint fmt -c /path/to/config.json
| Discovery Mode | Behavior |
|---|---|
--config-discovery=true | Default: ancestor + global |
--config-discovery=global | Global only |
--config-discovery=false | Require explicit -c |
No config found anywhere → dprint errors.
Plugins
Plugins are WASM files loaded via URL in dprint.json:
{
"plugins": [
"https://plugins.dprint.dev/typescript-0.95.13.wasm",
"https://plugins.dprint.dev/json-0.21.1.wasm",
"https://plugins.dprint.dev/markdown-0.20.0.wasm"
]
}
Common plugins:
typescript- TS/JS/JSX/TSXjson- JSON/JSONCmarkdown- Markdowntoml- TOMLg-plane/pretty_yaml- YAMLg-plane/malva- CSS/SCSS/Lessg-plane/pretty_graphql- GraphQL
Plugin config - top-level keys match plugin name:
{
"typescript": { "quoteStyle": "preferSingle", "semiColons": "asi" },
"markdown": { "lineWidth": 100, "textWrap": "maintain" }
}
Update plugins: Check https://plugins.dprint.dev for latest versions.
CLI Commands
dprint fmt # Format files, write to disk
dprint check # Check if files need formatting (CI)
dprint fmt --diff # Show diff without writing
dprint fmt --staged # Format only git staged files
dprint fmt --stdin ts # Format stdin as TypeScript
dprint fmt "src/**/*.ts" # Format specific patterns
dprint init # Create dprint.json
dprint config update # Update plugin versions
dprint clear-cache # Clear plugin cache
dprint lsp # Start language server
Editor Integration
Zed
{
"formatter": {
"external": {
"command": "dprint",
"arguments": ["fmt", "--stdin", "{buffer_path}"]
}
}
}
VS Code
Install "dprint" extension. It uses dprint LSP automatically.
Neovim
Use null-ls or conform.nvim with dprint as formatter.
Dotfiles Pattern
For consistent formatting across all projects:
# 1. Create config in dotfiles
~/<dotfiles>/dprint/dprint.json
# 2. Set global config location (in shell rc)
export DPRINT_CONFIG_DIR="$HOME/<dotfiles>/dprint"
# Alternative: symlink to default location
mkdir -p ~/.config/dprint
ln -s ~/<dotfiles>/dprint/dprint.json ~/.config/dprint/dprint.json
Projects with local dprint.json override global. Projects without use global.
Excludes
{
"excludes": [
"**/node_modules",
"**/*-lock.json",
"**/dist",
"**/build"
]
}
Reference
dprint help # All commands
dprint help fmt # Format command options
dprint output-resolved-config # Debug: show effective config
Score
Total Score
Based on repository quality metrics
SKILL.mdファイルが含まれている
ライセンスが設定されている
100文字以上の説明がある
GitHub Stars 100以上
1ヶ月以内に更新
10回以上フォークされている
オープンIssueが50未満
プログラミング言語が設定されている
1つ以上のタグが設定されている
Reviews
Reviews coming soon



