{"id":45872359,"url":"https://github.com/jolars/panache","last_synced_at":"2026-06-07T23:01:17.977Z","repository":{"id":313020333,"uuid":"1049639719","full_name":"jolars/panache","owner":"jolars","description":"Language server, formatter, and linter for Markdown, Quarto, and R Markdown","archived":false,"fork":false,"pushed_at":"2026-06-02T20:37:10.000Z","size":10802,"stargazers_count":161,"open_issues_count":8,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-06-02T21:25:59.477Z","etag":null,"topics":["commonmark","formatter","language-server","linter","markdown","pandoc","quarto","rmarkdown"],"latest_commit_sha":null,"homepage":"http://panache.bz","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jolars.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"jolars"}},"created_at":"2025-09-03T09:23:26.000Z","updated_at":"2026-06-02T21:01:32.000Z","dependencies_parsed_at":"2025-09-19T09:11:51.017Z","dependency_job_id":"f6633dab-da31-40e5-a1ad-6caa22b27fc1","html_url":"https://github.com/jolars/panache","commit_stats":null,"previous_names":["jolars/quartofmt","jolars/panache"],"tags_count":121,"template":false,"template_full_name":null,"purl":"pkg:github/jolars/panache","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jolars%2Fpanache","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jolars%2Fpanache/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jolars%2Fpanache/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jolars%2Fpanache/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jolars","download_url":"https://codeload.github.com/jolars/panache/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jolars%2Fpanache/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34041089,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commonmark","formatter","language-server","linter","markdown","pandoc","quarto","rmarkdown"],"created_at":"2026-02-27T10:45:49.061Z","updated_at":"2026-06-07T23:01:17.970Z","avatar_url":"https://github.com/jolars.png","language":"Rust","funding_links":["https://github.com/sponsors/jolars"],"categories":["Libraries/Packages/Scripts"],"sub_categories":["Miscellaneous"],"readme":"# Panache \u003cimg src='https://raw.githubusercontent.com/jolars/panache/refs/heads/main/images/logo.png' align=\"right\" width=\"139\" /\u003e\n\n[![Build and\nTest](https://github.com/jolars/panache/actions/workflows/build-and-test.yml/badge.svg)](https://github.com/jolars/panache/actions/workflows/build-and-test.yml)\n[![Crates.io](https://img.shields.io/crates/v/panache.svg?logo=rust)](https://crates.io/crates/panache)\n[![Open\nVSX](https://img.shields.io/open-vsx/v/jolars/panache?logo=vsix)](https://open-vsx.org/extension/jolars/panache)\n[![VS\nCode](https://vsmarketplacebadges.dev/version-short/jolars.panache.svg?logo=vsix)](https://marketplace.visualstudio.com/items?itemName=jolars.panache)\n[![PyPI\nversion](https://badge.fury.io/py/panache-cli.svg?icon=si%3Apython)](https://badge.fury.io/py/panache-cli)\n[![npm\nversion](https://badge.fury.io/js/@panache-cli%2Fpanache.svg?icon=si%3Anpm)](https://badge.fury.io/js/@panache-cli%2Fpanache)\n[![codecov](https://codecov.io/gh/jolars/panache/graph/badge.svg?token=uaBVOBfILv)](https://codecov.io/gh/jolars/panache)\n\nA language server, formatter, and linter for Markdown, Quarto, and R Markdown,\nbuilt in Rust with a lossless CST parser and support for external formatters and\nlinters on code blocks.\n\n## Installation\n\n### Homebrew\n\nPanache is available from Homebrew on macOS and Linux:\n\n```bash\nbrew install panache\n```\n\n### From crates.io\n\nIf you have Rust installed, the easiest way is likely to install from\n[crates.io](https://crates.io/crates/panache):\n\n```bash\ncargo install panache\n```\n\n### Pre-built Binaries\n\nAlternatively, you can install pre-built binary packages from the [releases\npage](https://github.com/jolars/panache/releases) for Linux, macOS, and Windows.\nFor Linux, packages are available for generic distributions (tarballs) as well\nas Debian/Ubuntu (`.deb`) and Fedora/RHEL/openSUSE (`.rpm`).\n\nIf you prefer a one-liner installer that picks the right release artifact for\nyour platform, you can use the installer scripts below. These scripts are\nfetched directly from this repository and then download the latest matching\nPanache CLI release asset for your platform, installing to a user-local\ndirectory by default. If you prefer, download and inspect the script before\nrunning it.\n\nFor macOS and Linux:\n\n```sh\ncurl --proto '=https' --tlsv1.2 -LsSf \\\n    https://raw.githubusercontent.com/jolars/panache/refs/heads/main/scripts/panache-installer.sh | sh\n```\n\nFor Windows PowerShell:\n\n```powershell\npowershell -NoProfile -ExecutionPolicy Bypass -Command \"irm https://raw.githubusercontent.com/jolars/panache/refs/heads/main/scripts/panache-installer.ps1 | iex\"\n```\n\n### Arch Linux\n\nThere are also two recipies available for Arch Linux in the AUR:\n[panache](https://aur.archlinux.org/packages/panache/) and\n[panache-bin](https://aur.archlinux.org/packages/panache-bin/). The first builds\nfrom source for your system, the second uses precompiled binaries attatched to\nGH releases. Install either using `yay` or your favorite AUR helper:\n\n```bash\nyay -S panache\nyay -S panache-bin\n```\n\n### NixOS\n\nPanache is available in NixOS via the `panache` package in `nixpkgs`. To add it\nto your system configuration, include it in the `environment.systemPackages`:\n\n```nix\n{ pkgs, ... }:\n\n{\n  environment.systemPackages = [\n    pkgs.panache\n  ];\n}\n```\n\n### From PyPI (via uv or pipx)\n\nInstall with [uv](https://docs.astral.sh/uv/) or [pipx](https://pipx.pypa.io/):\n\n```bash\n# One-shot run, no install:\nuvx --from panache-cli panache format path/to/file.qmd\n\n# Persistent install:\nuv tool install panache-cli\n# or\npipx install panache-cli\n```\n\n### From NPM (via npmx)\n\nInstall with [npx](https://www.npmjs.com/package/npx) or\n[npmx](https://www.npmjs.com/package/npmx):\n\n```bash\n# One-shot run, no install:\nnpx @panache-cli/panache format path/to/file.qmd\n\n# Persistent install:\nnpm install -g @panache-cli/panache\n```\n\n### VS Code Extension\n\nIf you are running VS Code or an editor that supports VS Code extensions (like\nPositron), you can install the [Panache\nextension](https://marketplace.visualstudio.com/items?itemName=jolars.panache)\nfrom the VS Code Marketplace or the [Open VSX\nextension](https://open-vsx.org/extension/jolars/panache), which will\nautomatically also install the `panache` CLI and start the language server when\nediting supported files.\n\n### Development Version\n\nTo install the latest development version, you can run\n\n```bash\ncargo install --git https://github.com/jolars/panache.git panache\n```\n\nThis presumes you have a working and up-to-date Rust toolchain (stable, 2024\nedition) installed. You also need to have `cargo` in your `PATH` if you want to\nuse the `panache` command directly after installation.\n\n## Usage\n\nPanache provides a single CLI interface for formatting, linting, and running the\nLSP server.\n\n### Formatting\n\nTo format a file in place, simply run:\n\n```bash\npanache format document.qmd\n```\n\nYou can also format from stdin by piping content into `panache format`:\n\n```bash\ncat \u003cfile\u003e | panache format\n```\n\n`panache format` supports glob patterns and recursive directory formatting:\n\n```bash\npanache format **/*.{qmd,md}\n```\n\nYou can use Panache as a linter via the `--check` flag to check if files are\nalready formatted without making changes:\n\n```bash\npanache format --check document.qmd\n```\n\n#### External Code Formatters\n\nPanache supports external formatters for code blocks. For example, you can\nconfigure it to run `air` on R code blocks and `ruff` on Python code blocks:\n\n```toml\n[formatters]\nr = \"air\"\npython = \"ruff\"\njavascript = \"prettier\"\ntypescript = \"prettier\" # Reuse same formatter\n```\n\nYou can setup custom formatters or modify built-in presets with additional\narguments:\n\n```toml\n[formatters]\npython = [\"isort\", \"black\"]\njavascript = \"foobar\"\n\n[formatters.isort]\nargs = [\"--profile=black\"]\n\n[formatters.myformatters]\ncmd = \"foobar\"\nargs = [\"--print-width=100\"]\nstdin = true\n```\n\n### Linting\n\nPanache also features a linter that can report formatting issues and optionally\nauto-fix them. To run the linter, use:\n\n```bash\npanache lint document.qmd\n```\n\nAs with `panache format`, you can use glob patterns and recursive formatting:\n\n```bash\npanache lint **/*.{qmd,md}\n```\n\n#### External Linters\n\nAs with formatting, Panache supports external linters for code blocks. These are\nconfigured in the `[linters]` section of the configuration, but due to the\ncomplexity of linting, including dealing with auto-fixing, external linters\ncannot be customized and only support presets and at the moment only support R\nvia the `jarl` linter:\n\n```toml\n# Enable R linting\n[linters]\nr = \"jarl\" # R linter with JSON output\n```\n\n### Language Server\n\nPanache implements the language server protocol (LSP) to provide editor features\nlike formatting, diagnostics, code actions, and more. See [the language server\ndocumentation](https://panache.bz/guide/lsp) for guides on how to connect\nPanache to your editor and configure LSP features.\n\nThe list of LSP features supported by Panache includes, among others:\n\n- Document formatting (full document, incremental and range)\n- Diagnostics with quick fixes\n- Code actions for refactoring\n  - Convert between loose/compact lists\n  - Convert between inline/reference footnotes\n- Document symbols/outline\n- Folding ranges\n- Go to definition for references and footnotes\n- Quaro and Bookdown project awareness\n\n## Configuration\n\nPanache looks for a configuration in:\n\n1. `.panache.toml` or `panache.toml` in current directory or parent directories\n2. `$XDG_CONFIG_HOME/panache/config.toml` (usually\n   `~/.config/panache/config.toml`)\n\n### Example\n\n```toml\n# Markdown flavor and line width\nflavor = \"quarto\"\nline-width = 80\nline-ending = \"auto\"\n\n# Formatting style\n[format]\nwrap = \"reflow\"\n\n# External code formatters (opt-in)\n[formatters]\npython = [\"isort\", \"black\"] # Sequential formatting\nr = \"air\"                   # Built-in preset\njavascript = \"prettier\"     # Reusable definitions\ntypescript = \"prettier\"\nyaml = \"yamlfmt\"            # Formats both code blocks AND frontmatter\n\n# Customize formatters\n[formatters.prettier]\nprepend-args = [\"--print-width=100\"]\n\n# External code linters\n[linters]\nr = \"jarl\"      # Enable R linting\npython = \"ruff\"\n```\n\nSee [examples/panache.toml](./examples/panache.toml) for a complete\nconfiguration reference.\n\n## Integrations\n\n### GitHub Actions\n\nFor CI, use the dedicated GitHub Action:\n\n```yaml\n- uses: jolars/panache-action@v1\n```\n\nSee the [Integrations documentation](https://panache.bz/guide/integrations) for\nconfiguration options.\n\n### Pre-commit Hooks\n\nPanache integrates with [pre-commit](https://pre-commit.com/) to automatically\nformat and lint your files before committing.\n\n**Installation:**\n\nFirst, install pre-commit if you haven't already:\n\n```bash\npip install pre-commit\n# or\nbrew install pre-commit\n```\n\nThen add Panache to your `.pre-commit-config.yaml`:\n\n```yaml\nrepos:\n  - repo: https://github.com/jolars/panache-pre-commit\n    rev: v2.43.1 # Use the latest version\n    hooks:\n      - id: panache-format # Format files\n      - id: panache-lint # Lint and auto-fix issues\n```\n\n\u003e **Note:** The hooks live in\n\u003e [`jolars/panache-pre-commit`](https://github.com/jolars/panache-pre-commit), a\n\u003e thin shim repo. This avoids `pre-commit autoupdate` resolving to unrelated\n\u003e sub-package tags from this monorepo (e.g. `panache-code-*`). If you currently\n\u003e point at `https://github.com/jolars/panache`, update the `repo:` URL and run\n\u003e `pre-commit autoupdate`.\n\nInstall the hooks:\n\n```bash\npre-commit install\n```\n\nPanache will now automatically run on your staged `.qmd`, `.md`, and `.Rmd`\nfiles before each commit.\n\nSee [examples/pre-commit-config.yaml](examples/pre-commit-config.yaml) for more\nconfiguration options.\n\n## Motivation\n\nI wanted a formatter that understands Quarto and Pandoc syntax. I have tried to\nuse Prettier as well as mdformat, but both fail to handle some of the particular\nsyntax used in Quarto documents, such as fenced divs and some of the table\nsyntax.\n\nFor a side-by-side overview of how Panache compares to Prettier, Pandoc, rumdl,\nmdformat, mado, markdownlint, markdownlint-cli2, and marksman, see the\n[comparison page](https://panache.bz/guide/comparison). For benchmarks against\nthe same set of tools, see the [performance\npage](https://panache.bz/guide/performance).\n\n## Design Goals and Scope\n\n- Full LSP implementation with formatting, diagnostics, code actions, and more\n- Standalone CLI for both formatting and linting\n- Support for Quarto, Pandoc, and R Markdown syntax\n- Lossless CST-based parsing\n- Idempotent formatting\n- Semi-opinionated defaults with configurable style options for common\n  formatting decisions\n- Support for running external formatters and linters on code blocks, with\n  built-in presets for popular languages and tools\n\n## Acknowledgements\n\nThe development of Panache has simplified considerably thanks to the extensive\ndocumentation, well-structured code, and testing infrastructure provided by\nPandoc. We also owe significant debt to the rust-analyzer project, on which\nPanche is heavily inspired.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjolars%2Fpanache","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjolars%2Fpanache","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjolars%2Fpanache/lists"}