Skip to content

Commit

Permalink
tweak(editor): make smartparens obsolete
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Nov 21, 2023
1 parent 94b31d6 commit 64a3601
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
22 changes: 0 additions & 22 deletions modules/me-editor.el
Original file line number Diff line number Diff line change
Expand Up @@ -41,28 +41,6 @@
:config
(setq highlight-numbers-generic-regexp (rx (and symbol-start (one-or-more digit)) (optional "." (* digit)) symbol-end)))

(use-package smartparens
:straight t
:hook (minemacs-after-startup . smartparens-global-mode)
:init
;; From Doom Emacs, disable expensive navigation features.
(+setq-hook! smartparens-mode
sp-navigate-skip-match nil
sp-navigate-consider-sgml-tags nil)
:config
(sp-local-pair 'org-mode "$" "$" :unless '(sp-point-after-word-p))
(with-eval-after-load 'evil-mc
;; Make evil-mc cooperate with smartparens better
(let ((vars (cdr (assq :default evil-mc-cursor-variables))))
(unless (memq (car sp--mc/cursor-specific-vars) vars)
(setcdr (assq :default evil-mc-cursor-variables) (append vars sp--mc/cursor-specific-vars))))))

;; Default `smartparens' configuration (for example, do not complete a single
;; quote)
(use-package smartparens-config
:after smartparens
:demand t)

(use-package expreg
:straight (:host github :repo "casouri/expreg")
:when (+emacs-features-p 'tree-sitter)
Expand Down
21 changes: 21 additions & 0 deletions modules/me-smartparens.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
(use-package smartparens
:straight t
:hook (minemacs-after-startup . smartparens-global-mode)
:init
;; From Doom Emacs, disable expensive navigation features.
(+setq-hook! smartparens-mode
sp-navigate-skip-match nil
sp-navigate-consider-sgml-tags nil)
:config
(sp-local-pair 'org-mode "$" "$" :unless '(sp-point-after-word-p))
(with-eval-after-load 'evil-mc
;; Make evil-mc cooperate with smartparens better
(let ((vars (cdr (assq :default evil-mc-cursor-variables))))
(unless (memq (car sp--mc/cursor-specific-vars) vars)
(setcdr (assq :default evil-mc-cursor-variables) (append vars sp--mc/cursor-specific-vars))))))

;; Default `smartparens' configuration (for example, do not complete a single
;; quote)
(use-package smartparens-config
:after smartparens
:demand t)

0 comments on commit 64a3601

Please sign in to comment.