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
This commit is contained in:
Celso Bonutti 2021-09-04 14:43:54 -03:00 committed by Henrik Lissner
parent d8285d9d4c
commit 1b895a0564

View file

@ -215,7 +215,17 @@
(map! :map markdown-mode-map (map! :map markdown-mode-map
:ig "*" (general-predicate-dispatch nil :ig "*" (general-predicate-dispatch nil
(looking-at-p "\\*\\* *") (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 "{-@" "@-")))))
;; ;;