diff --git a/config/plugins/lsp/conform.nix b/config/plugins/lsp/conform.nix index e006439..324a99f 100644 --- a/config/plugins/lsp/conform.nix +++ b/config/plugins/lsp/conform.nix @@ -21,4 +21,14 @@ extraPackages = with pkgs; [ alejandra ]; + + extraConfigLua = "require('conform').setup({ + format_on_save = function(bufnr) + -- Disable autoformat on certain filetypes + local ignore_filetypes = { 'haskell', } + if vim.tbl_contains(ignore_filetypes, vim.bo[bufnr].filetype) then + return + end + end, + })"; }