From 1b895a056432bae28499faf2236dc09f89828535 Mon Sep 17 00:00:00 2001 From: Celso Bonutti Date: Sat, 4 Sep 2021 14:43:54 -0300 Subject: [PATCH] fix(default): smartparens rules for haskell The default haskell-mode rules would result in an extra } appended to the closing pair (#5448). Fix: #5448 Close: #5450 --- modules/config/default/config.el | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/modules/config/default/config.el b/modules/config/default/config.el index e1c90c043..cb29aac30 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -215,7 +215,17 @@ (map! :map markdown-mode-map :ig "*" (general-predicate-dispatch nil (looking-at-p "\\*\\* *") - (cmd! (forward-char 2))))))) + (cmd! (forward-char 2))))) + + ;; Removes haskell-mode trailing braces + (after! smartparens-haskell + (sp-with-modes '(haskell-mode haskell-interactive-mode) + (sp-local-pair "{-" "-}" :actions :rem) + (sp-local-pair "{-#" "#-}" :actions :rem) + (sp-local-pair "{-@" "@-}" :actions :rem) + (sp-local-pair "{-" "-") + (sp-local-pair "{-#" "#-") + (sp-local-pair "{-@" "@-"))))) ;;