Skip to content

Commit

Permalink
tweak(editor): replace expand-region with expreg
Browse files Browse the repository at this point in the history
  • Loading branch information
abougouffa committed Sep 4, 2023
1 parent fcdb25e commit ea64eaa
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
15 changes: 11 additions & 4 deletions modules/me-editor.el
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,17 @@
:after smartparens
:demand t)

(use-package expand-region
:straight t
:init
(+vmap! "v" #'er/expand-region))
(when (+emacs-features-p 'tree-sitter)
(use-package expreg
:straight (:host github :repo "casouri/expreg")
:init
(+vmap!
"v" #'expreg-expand
"v" #'expreg-contract)))

;; Fallback to `expand-region' if `expreg' cannot be used
(unless (+emacs-features-p 'tree-sitter)
(+load minemacs-modules-dir "obsolete/me-expand-region.el"))

(use-package drag-stuff
:straight t
Expand Down
18 changes: 18 additions & 0 deletions modules/obsolete/me-expand-region.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
;;; me-expand-region.el --- expand-region config for non-treesitter build -*- lexical-binding: t; -*-

;; Copyright (C) 2022-2023 Abdelhak Bougouffa

;; Author: Abdelhak Bougouffa (concat "abougouffa" "@" "fedora" "project" "." "org")

;;; Commentary:

;;; Code:

(use-package expand-region
:straight t
:init
(+vmap! "v" #'er/expand-region))

(provide 'obsolete/me-expand-region)

;;; me-expand-region.el ends here

0 comments on commit ea64eaa

Please sign in to comment.