diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index 3c07aa09..2e0dcf6d 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -52,3 +52,4 @@ - Remove `vim.notes.obsidian.setupOpts.dir`, which was set by default. Fixes issue with setting the workspace directory. - Add `vim.snippets.luasnip.setupOpts`, which was previously missing. +- Add `"prettierd"` as a formatter option in `vim.languages.markdown.format.type`. 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 = {