aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorToby Vincent <tobyv@tobyvin.dev>2024-04-26 19:01:46 -0500
committerToby Vincent <tobyv@tobyvin.dev>2024-04-26 19:01:46 -0500
commitd19cd82a209ed501daa3d57042504fa2fd932262 (patch)
tree958c4138ee3614252bd23127533cc93c7de533e1
parent5304b0f9c009bf4a3407cda2a9df4c831e6c1377 (diff)
feat(nvim): use typstyle for formatting typst
-rw-r--r--nvim/.config/nvim/lua/plugins/conform.lua11
1 files changed, 9 insertions, 2 deletions
diff --git a/nvim/.config/nvim/lua/plugins/conform.lua b/nvim/.config/nvim/lua/plugins/conform.lua
index 25d9c10..3b7f04c 100644
--- a/nvim/.config/nvim/lua/plugins/conform.lua
+++ b/nvim/.config/nvim/lua/plugins/conform.lua
@@ -20,8 +20,7 @@ local M = {
scss = { "prettier" },
sh = { "shfmt" },
tex = { "latexindent" },
- -- HACK: unable to get typst-lsp to do formatting
- typst = { "typstfmt" },
+ typst = { "typstyle" },
["*"] = { "injected", "trim_whitespace", "trim_newlines" },
},
formatters = {
@@ -56,6 +55,14 @@ local M = {
end,
stdin = false,
},
+ typstyle = {
+ meta = {
+ url = "https://github.com/Enter-tainer/typstyle",
+ description = "Beautiful and reliable typst code formatter",
+ },
+ command = "typstyle",
+ stdin = true,
+ },
},
},
}