From 1355f90240eabe0ed66cd88bb1dc9e9107c0bf18 Mon Sep 17 00:00:00 2001 From: Snoweuph Date: Wed, 18 Feb 2026 10:57:43 +0100 Subject: [PATCH] languages/markdown: add mdformat (#1396) --- docs/manual/release-notes/rl-0.9.md | 2 ++ modules/plugins/languages/markdown.nix | 10 +++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/manual/release-notes/rl-0.9.md b/docs/manual/release-notes/rl-0.9.md index fee49e80..f42e4228 100644 --- a/docs/manual/release-notes/rl-0.9.md +++ b/docs/manual/release-notes/rl-0.9.md @@ -169,6 +169,8 @@ - Added [Selenen](https://github.com/kampfkarren/selene) for more diagnostics in `languages.lua`. +- Added [`mdformat`](https://mdformat.rtfd.io/) support to `languages.python`. + - Added XML syntax highlighting, LSP support and formatting - Added [tera](https://keats.github.io/tera/) language support (syntax diff --git a/modules/plugins/languages/markdown.nix b/modules/plugins/languages/markdown.nix index a2634e6d..f0cf1aa1 100644 --- a/modules/plugins/languages/markdown.nix +++ b/modules/plugins/languages/markdown.nix @@ -5,7 +5,7 @@ ... }: let inherit (builtins) attrNames; - inherit (lib.meta) getExe; + inherit (lib.meta) getExe getExe'; inherit (lib.modules) mkIf mkMerge; inherit (lib.options) mkEnableOption mkOption; inherit (lib.types) bool enum listOf str nullOr; @@ -55,6 +55,14 @@ prettierd = { command = getExe pkgs.prettierd; }; + mdformat = { + command = getExe' (pkgs.python313Packages.python.withPackages (p: + with p; [ + mdformat + mdformat-gfm + mdformat-frontmatter + ])) "mdformat"; + }; }; defaultDiagnosticsProvider = ["markdownlint-cli2"]; diagnosticsProviders = {