From 1e1e6150d82a2c51be721c551cb85b8d0409cc24 Mon Sep 17 00:00:00 2001 From: Liam Hupfer Date: Wed, 27 Sep 2023 00:18:32 -0500 Subject: [PATCH] fix(data): correct XML closing tag insertion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `nxml-slash-auto-complete-flag` inserts the rest of the closing tag when `")` for `sp--html-modes`, so two `>` are inserted for closing tags. Apply the upstream developer’s suggested fix. Fix: https://github.com/doomemacs/doomemacs/issues/6331 Ref: https://github.com/Fuco1/smartparens/issues/397 --- modules/lang/data/config.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modules/lang/data/config.el b/modules/lang/data/config.el index d0777a910..f46042a09 100644 --- a/modules/lang/data/config.el +++ b/modules/lang/data/config.el @@ -7,6 +7,9 @@ :config (setq nxml-slash-auto-complete-flag t nxml-auto-insert-xml-declaration-flag t) + ;; https://github.com/Fuco1/smartparens/issues/397#issuecomment-501059014 + (after! smartparens + (sp-local-pair 'nxml-mode "<" ">" :post-handlers '(("[d1]" "/")))) (set-company-backend! 'nxml-mode '(company-nxml company-yasnippet)) (setq-hook! 'nxml-mode-hook tab-width nxml-child-indent) (set-formatter! 'xmllint '("xmllint" "--format" "-") :modes '(nxml-mode)))