Skip to content

Commit

Permalink
Merge pull request #548 from LilleAila/markdown-prettier-formatter
Browse files Browse the repository at this point in the history
languages/markdown: add prettierd formatter
  • Loading branch information
NotAShelf authored Jan 11, 2025
2 parents 4df1cc3 + 983a81c commit a5a5aba
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/release-notes/rl-0.8.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
12 changes: 12 additions & 0 deletions modules/plugins/languages/markdown.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit a5a5aba

Please sign in to comment.