diff --git a/.config/helix/languages.toml b/.config/helix/languages.toml index 9f380e01..11e36603 100644 --- a/.config/helix/languages.toml +++ b/.config/helix/languages.toml @@ -79,7 +79,8 @@ file-types = [ ] # language-servers = ["ltex-ls-plus", "marksman", "scls"] language-servers = ["harper-ls", "marksman", "scls"] -formatter = { command = "dprint", args = ["fmt", "--stdin", "md"] } +formatter = { command = "/home/fic/.config/helix/scripts/format_markdown.fish", args = [] } +# formatter = { command = "dprint", args = ["fmt", "--stdin", "md"] } # depends on aerc auto-format = false diff --git a/.config/helix/scripts/format_markdown.fish b/.config/helix/scripts/format_markdown.fish index e69de29b..0d2e9ca6 100755 --- a/.config/helix/scripts/format_markdown.fish +++ b/.config/helix/scripts/format_markdown.fish @@ -0,0 +1,5 @@ +#!/bin/fish + +cat | markdown-toc --bullets - --no-firsth1 - | dprint fmt --stdin md + +# set -l input (cat)