summaryrefslogtreecommitdiffstats
path: root/nvim/lua/plugins/conform/init.lua
diff options
context:
space:
mode:
authorcoast <coasteen@proton.me>2026-10-13 05:03:11 +0330
committercoast <coasteen@proton.me>2026-10-13 05:03:11 +0330
commit8c5c2d270fd0f3bbc276e3b1cc28fc1dfae3fa59 (patch)
treea18e4d6016c4df3ca97e017b9f9d351398e950da /nvim/lua/plugins/conform/init.lua
downloadcoast-newdot-8c5c2d270fd0f3bbc276e3b1cc28fc1dfae3fa59.tar.gz
coast-newdot-8c5c2d270fd0f3bbc276e3b1cc28fc1dfae3fa59.tar.bz2
coast-newdot-8c5c2d270fd0f3bbc276e3b1cc28fc1dfae3fa59.tar.xz
coast-newdot-8c5c2d270fd0f3bbc276e3b1cc28fc1dfae3fa59.tar.zst
init
Diffstat (limited to 'nvim/lua/plugins/conform/init.lua')
-rw-r--r--nvim/lua/plugins/conform/init.lua17
1 files changed, 17 insertions, 0 deletions
diff --git a/nvim/lua/plugins/conform/init.lua b/nvim/lua/plugins/conform/init.lua
new file mode 100644
index 0000000..374ed55
--- /dev/null
+++ b/nvim/lua/plugins/conform/init.lua
@@ -0,0 +1,17 @@
+require("conform").setup({
+ formatters_by_ft = {
+ haskell = { "ormolu" },
+ },
+ formatters = {
+ ormolu = {
+ command = "ormolu",
+ args = { "--stdin-input-file", "$FILENAME" },
+ stdin = true,
+ },
+ },
+ format_on_save = { timeout_ms = 2000, lsp_format = "never" },
+})
+
+vim.keymap.set({ "n", "v" }, "<leader>f", function()
+ require("conform").format({ async = true, lsp_format = "never" })
+end)