Use fourmolu as Haskell formatter and fixer
This commit is contained in:
parent
8cb88ec054
commit
02c752a943
|
@ -43,6 +43,20 @@ require("formatter").setup({
|
||||||
require("formatter.filetypes.rust").rustfmt,
|
require("formatter.filetypes.rust").rustfmt,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
haskell = {
|
||||||
|
function()
|
||||||
|
-- Full specification of configurations is down below and in Vim help
|
||||||
|
-- files
|
||||||
|
return {
|
||||||
|
exe = "fourmolu",
|
||||||
|
args = {
|
||||||
|
util.escape_path(util.get_current_buffer_file_path()),
|
||||||
|
},
|
||||||
|
stdin = true,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
-- Use the special "*" filetype for defining formatter configurations on
|
-- Use the special "*" filetype for defining formatter configurations on
|
||||||
-- any filetype
|
-- any filetype
|
||||||
["*"] = {
|
["*"] = {
|
||||||
|
|
|
@ -24,6 +24,7 @@ vim.g.ale_fixers = {
|
||||||
markdown = { "prettier", "pandoc" },
|
markdown = { "prettier", "pandoc" },
|
||||||
python = { "yapf" },
|
python = { "yapf" },
|
||||||
pascal = { "ptop" },
|
pascal = { "ptop" },
|
||||||
|
haskell = { "fourmolu" },
|
||||||
}
|
}
|
||||||
|
|
||||||
vim.keymap.set("n", "<leader>lf", ":ALEFix<CR>")
|
vim.keymap.set("n", "<leader>lf", ":ALEFix<CR>")
|
||||||
|
|
Loading…
Reference in New Issue