Fixed that single quotes should behave in Lisp modes.

This commit is contained in:
Howard Abrams 2022-08-22 15:58:30 -07:00
parent e7a11e3640
commit 13cc881a2e

View file

@ -98,6 +98,21 @@ We need to make sure we keep the [[https://github.com/Fuco1/smartparens][smartpa
(use-package smartparens
:custom
(smartparens-global-strict-mode t)
:config
(sp-with-modes sp-lisp-modes
;; disable ', as it's the quote character:
(sp-local-pair "'" nil :actions nil))
(sp-with-modes (-difference sp-lisp-modes sp-clojure-modes)
;; use the pseudo-quote inside strings where it serve as hyperlink.
(sp-local-pair "`" "'"
:when '(sp-in-string-p
sp-in-comment-p)
:skip-match (lambda (ms _mb _me)
(cond
((equal ms "'") (not (sp-point-in-string-or-comment)))
(t (not (sp-point-in-string-or-comment)))))))
:hook
(prog-mode . smartparens-strict-mode))
#+end_src