From 07c93c74109273e2b03b6e87b92e645053c5fe87 Mon Sep 17 00:00:00 2001 From: jasmine Date: Wed, 14 Aug 2024 20:20:10 +0800 Subject: [PATCH] feat: stylish-haskell --- config/plugins/editor/easy-align.nix | 5 +++++ config/plugins/lsp/conform.nix | 12 ++---------- 2 files changed, 7 insertions(+), 10 deletions(-) create mode 100644 config/plugins/editor/easy-align.nix diff --git a/config/plugins/editor/easy-align.nix b/config/plugins/editor/easy-align.nix new file mode 100644 index 0000000..d8147ea --- /dev/null +++ b/config/plugins/editor/easy-align.nix @@ -0,0 +1,5 @@ +{ ... }: + +{ + +} diff --git a/config/plugins/lsp/conform.nix b/config/plugins/lsp/conform.nix index 324a99f..0e11ddb 100644 --- a/config/plugins/lsp/conform.nix +++ b/config/plugins/lsp/conform.nix @@ -14,21 +14,13 @@ formattersByFt = { c = ["clang-format"]; nix = ["alejandra"]; + haskell = ["stylish-haskell"]; }; }; # Install our formatters. extraPackages = with pkgs; [ alejandra + stylish-haskell ]; - - 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, - })"; }