From edfb9704954bc4536c4824ee7b98f98952a731fe Mon Sep 17 00:00:00 2001 From: "Gustavo \"Guz\" L de Mello" Date: Mon, 26 May 2025 10:24:07 -0300 Subject: [PATCH] feat(formatting): markdown formatter --- lua/dot013/plugins/formatting.lua | 7 ++++++- package.nix | 2 ++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/dot013/plugins/formatting.lua b/lua/dot013/plugins/formatting.lua index 9149215..1182cb6 100644 --- a/lua/dot013/plugins/formatting.lua +++ b/lua/dot013/plugins/formatting.lua @@ -36,11 +36,11 @@ return { sh = { "shellharden", "shfmt" }, xml = { "xmllint" }, xhtml = { "xmllint" }, + markdown = { "mdfmt" }, html = { "prettierd", "prettier", stop_after_first = true }, css = { "prettierd", "prettier", stop_after_first = true }, yaml = { "prettierd", "prettier", stop_after_first = true }, - markdown = { "prettierd", "prettier", stop_after_first = true }, -- Golang's formatters used by priority go = function(bufnr) @@ -83,6 +83,11 @@ return { timeout_ms = 500, lsp_format = "fallback", }, + formatters = { + mdfmt = { + command = "mdfmt", + }, + }, }) end, }, diff --git a/package.nix b/package.nix index b7bc534..db966d5 100644 --- a/package.nix +++ b/package.nix @@ -3,6 +3,7 @@ lib, neovim ? pkgs.neovim, ripgrep ? pkgs.ripgrep, + mdfmt ? null, go-grip ? null, yazi ? pkgs.yazi, ... @@ -94,6 +95,7 @@ alejandra jq libxml2 + mdfmt prettierd shellharden shfmt