summaryrefslogtreecommitdiffstats
path: root/home-configuration/config/nvim/lua/plugins/conform/init.lua
blob: 374ed5518fe084322a66a9fc796fe625b94ac824 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)