From 6e98b894b73e77067ebc607baef3913441609396 Mon Sep 17 00:00:00 2001 From: LilleAila Date: Sat, 11 Jan 2025 12:48:41 +0100 Subject: [PATCH 1/2] languages/markdown: add prettierd formatter --- modules/plugins/languages/markdown.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/plugins/languages/markdown.nix b/modules/plugins/languages/markdown.nix index ab184835..ac098a1c 100644 --- a/modules/plugins/languages/markdown.nix +++ b/modules/plugins/languages/markdown.nix @@ -46,6 +46,18 @@ ) ''; }; + prettierd = { + package = pkgs.prettierd; + nullConfig = '' + table.insert( + ls_sources, + null_ls.builtins.formatting.prettierd.with({ + filetypes = ${expToLua (concatLists [cfg.format.extraFiletypes ["markdown"]])}, + command = "${cfg.format.package}/bin/prettierd", + }) + ) + ''; + }; }; in { options.vim.languages.markdown = { From 983a81c96c1a30119b01977163270273e8c1395f Mon Sep 17 00:00:00 2001 From: LilleAila Date: Sat, 11 Jan 2025 15:32:35 +0100 Subject: [PATCH 2/2] languages/markdown: add prettierd to changelog --- docs/release-notes/rl-0.8.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index c65defeb..62e83a0e 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -51,3 +51,4 @@ - Remove `vim.notes.obsidian.setupOpts.dir`, which was set by default. Fixes issue with setting the workspace directory. +- Add `"prettierd"` as a formatter option in `vim.languages.markdown.format.type`.