Skip to content

Commit

Permalink
tweak(evil): make use of +package-disabled-p to control installing …
Browse files Browse the repository at this point in the history
…evil packages
  • Loading branch information
abougouffa committed Feb 3, 2024
1 parent c348bbb commit 3d69084
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 1 deletion.
4 changes: 4 additions & 0 deletions core/me-evil.el
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@

(use-package evil-collection
:straight t
:unless (+package-disabled-p 'evil 'me-evil)
:after evil minemacs-loaded
:demand t
:config
Expand All @@ -75,6 +76,7 @@

(use-package evil-snipe
:straight t
:unless (+package-disabled-p 'evil 'me-evil)
:hook (minemacs-after-startup . evil-snipe-mode)
:hook (minemacs-after-startup . evil-snipe-override-mode)
:custom
Expand All @@ -84,6 +86,7 @@

(use-package evil-numbers
:straight t
:unless (+package-disabled-p 'evil 'me-evil)
:init
(+nmap!
"g+" #'evil-numbers/inc-at-pt
Expand All @@ -96,6 +99,7 @@

(use-package evil-nerd-commenter
:straight t
:unless (+package-disabled-p 'evil 'me-evil)
:commands evilnc-comment-operator
:init
(+nvmap!
Expand Down
2 changes: 1 addition & 1 deletion modules/me-editor.el
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@

(use-package evil-vimish-fold
:straight t
:unless (+package-disabled-p 'evil 'me-evil)
:hook (vimish-fold-global-mode . global-evil-vimish-fold-mode)
:when (and (memq 'me-evil minemacs-core-modules) (not (+package-disabled-p 'evil)))
:commands evil-vimish-fold/next-fold evil-vimish-fold/previous-fold vimish-fold/delete evil-vimish-fold/delete-all evil-vimish-fold/create evil-vimish-fold/create-line
:custom
(vimish-fold-dir (concat minemacs-cache-dir "vimish-fold/"))
Expand Down
3 changes: 3 additions & 0 deletions modules/me-multi-cursors.el
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

(use-package evil-multiedit ; This will load `iedit' and suppresses it
:straight t
:unless (+package-disabled-p 'evil 'me-evil)
:after evil minemacs-first-file
:demand t
:init
Expand All @@ -36,6 +37,7 @@

(use-package evil-iedit-state
:straight t
:unless (+package-disabled-p 'evil 'me-evil)
:commands evil-iedit-state/iedit-mode
:after iedit
:init
Expand All @@ -52,6 +54,7 @@

(use-package evil-mc
:straight t
:unless (+package-disabled-p 'evil 'me-evil)
:hook (minemacs-first-file . global-evil-mc-mode)
:config
;; Use "gz" instead of "gr", this last is mapped to `xref-find-references' in some programming modes.
Expand Down
2 changes: 2 additions & 0 deletions modules/me-org.el
Original file line number Diff line number Diff line change
Expand Up @@ -93,10 +93,12 @@

(use-package evil-org
:straight t
:unless (+package-disabled-p 'evil 'me-evil)
:hook (org-mode . evil-org-mode))

(use-package evil-org-agenda
:after evil-org
:unless (+package-disabled-p 'evil 'me-evil)
:demand t
:config
(evil-org-agenda-set-keys))
Expand Down
1 change: 1 addition & 0 deletions modules/me-prog.el
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

(use-package evil-textobj-tree-sitter
:straight (:host github :repo "meain/evil-textobj-tree-sitter" :files (:defaults "queries" "treesit-queries"))
:unless (+package-disabled-p 'evil 'me-evil)
:after evil
:init
;; Require the package on the first `prog-mode' file
Expand Down
1 change: 1 addition & 0 deletions modules/me-ui.el
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@

(use-package evil-anzu
:straight t
:unless (+package-disabled-p 'evil 'me-evil)
:hook (evil-mode . global-anzu-mode))


Expand Down
1 change: 1 addition & 0 deletions modules/obsolete/me-evil-escape.el
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

(use-package evil-escape
:straight t
:unless (+package-disabled-p 'evil 'me-evil)
:hook (evil-mode . evil-escape-mode)
:custom
;; The default "fd" interfere with the "f" (bound to `evil-snipe-f') binding.
Expand Down

0 comments on commit 3d69084

Please sign in to comment.