diff --git a/modules/lang/latex/config.el b/modules/lang/latex/config.el index faa848353..0f939d336 100644 --- a/modules/lang/latex/config.el +++ b/modules/lang/latex/config.el @@ -96,11 +96,16 @@ okular and pdf-tools.") "\\bigl\\{" "\\biggl\\{" "\\Bigl\\{" "\\Biggl\\{" "\\lfloor" "\\lceil" "\\langle" "\\lVert" "\\lvert" - "`")) - (sp-local-pair modes open nil :actions :rem)) - ;; And tweak these so that users can decide whether they want use LaTeX - ;; quotes or not, via `+latex-enable-plain-double-quotes'. - (sp-local-pair modes "``" nil :unless '(:add sp-in-math-p)))) + ;; Disable pairs that interfere with AucTeX, + ;; see https://github.com/Fuco1/smartparens/pull/1151. + "`" "``" "\"")) + ;; Some of the above pairs are in smartparens' global list, which + ;; applies to all modes, so we need a local ":actions nil" override + ;; (instead of ":actions :rem", which removes from the local list). + ;; While this keeps the pairs in `sp-pairs', it has negligible + ;; performance impact because smartparens will omit the pairs when + ;; building the buffer-local `sp-local-pairs' used during operation. + (sp-local-pair modes open nil :actions nil)))) ;; Hook LSP, if enabled. (when (modulep! +lsp) (add-hook! '(tex-mode-local-vars-hook