refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been deprecated. They have identical interfaces, and can be replaced without issue. featurep! was never quite the right name for this macro. It implied that it had some connection to featurep, which it doesn't (only that it was similar in purpose; still, Doom modules are not features). To undo such implications and be consistent with its namespace (and since we're heading into a storm of breaking changes with the v3 release anyway), now was the best opportunity to begin the transition.
This commit is contained in:
parent
0407621aff
commit
ad6a3d0f33
316 changed files with 1109 additions and 1103 deletions
|
@ -62,14 +62,14 @@
|
|||
(swiper-isearch search))
|
||||
(evil-ex-define-cmd "sw[iper]" #'+evil:swiper)
|
||||
|
||||
(cond ((featurep! :completion ivy)
|
||||
(cond ((modulep! :completion ivy)
|
||||
(evil-ex-define-cmd "pg[rep]" #'+ivy:project-search)
|
||||
(evil-ex-define-cmd "pg[grep]d" #'+ivy:project-search-from-cwd))
|
||||
|
||||
((featurep! :completion helm)
|
||||
((modulep! :completion helm)
|
||||
(evil-ex-define-cmd "pg[rep]" #'+helm:project-search)
|
||||
(evil-ex-define-cmd "pg[grep]d" #'+helm:project-search-from-cwd))
|
||||
((featurep! :completion vertico)
|
||||
((modulep! :completion vertico)
|
||||
(evil-ex-define-cmd "pg[rep]" #'+vertico:project-search)
|
||||
(evil-ex-define-cmd "pg[grep]d" #'+vertico:project-search-from-cwd)))
|
||||
|
||||
|
@ -104,5 +104,5 @@
|
|||
(evil-ex-define-cmd "cap[ture]" #'org-capture)
|
||||
|
||||
;;; ibuffer
|
||||
(when (featurep! :emacs ibuffer)
|
||||
(when (modulep! :emacs ibuffer)
|
||||
(evil-ex-define-cmd "buffers" #'ibuffer))
|
||||
|
|
|
@ -51,8 +51,8 @@ directives. By default, this only recognizes C directives.")
|
|||
;; errors will abort macros, so suppress them:
|
||||
evil-kbd-macro-suppress-motion-error t
|
||||
evil-undo-system
|
||||
(cond ((featurep! :emacs undo +tree) 'undo-tree)
|
||||
((featurep! :emacs undo) 'undo-fu)
|
||||
(cond ((modulep! :emacs undo +tree) 'undo-tree)
|
||||
((modulep! :emacs undo) 'undo-fu)
|
||||
((> emacs-major-version 27) 'undo-redo)))
|
||||
|
||||
;; Slow this down from 0.02 to prevent blocking in large or folded buffers
|
||||
|
@ -428,7 +428,7 @@ directives. By default, this only recognizes C directives.")
|
|||
|
||||
;; implement dictionary keybinds
|
||||
;; evil already defines 'z=' to `ispell-word' = correct word at point
|
||||
(:when (featurep! :checkers spell)
|
||||
(:when (modulep! :checkers spell)
|
||||
:n "zg" #'+spell/add-word
|
||||
:n "zw" #'+spell/remove-word
|
||||
:m "[s" #'+spell/previous-error
|
||||
|
@ -445,21 +445,21 @@ directives. By default, this only recognizes C directives.")
|
|||
:m "[u" #'+evil:url-decode
|
||||
:m "]y" #'+evil:c-string-encode
|
||||
:m "[y" #'+evil:c-string-decode
|
||||
(:when (featurep! :lang web)
|
||||
(:when (modulep! :lang web)
|
||||
:m "]x" #'+web:encode-html-entities
|
||||
:m "[x" #'+web:decode-html-entities)
|
||||
(:when (featurep! :ui vc-gutter)
|
||||
(:when (modulep! :ui vc-gutter)
|
||||
:m "]d" #'+vc-gutter/next-hunk
|
||||
:m "[d" #'+vc-gutter/previous-hunk)
|
||||
(:when (featurep! :ui hl-todo)
|
||||
(:when (modulep! :ui hl-todo)
|
||||
:m "]t" #'hl-todo-next
|
||||
:m "[t" #'hl-todo-previous)
|
||||
(:when (featurep! :ui workspaces)
|
||||
(:when (modulep! :ui workspaces)
|
||||
:n "gt" #'+workspace:switch-next
|
||||
:n "gT" #'+workspace:switch-previous
|
||||
:n "]w" #'+workspace/switch-right
|
||||
:n "[w" #'+workspace/switch-left)
|
||||
(:when (featurep! :ui tabs)
|
||||
(:when (modulep! :ui tabs)
|
||||
:n "gt" #'+tabs:next-or-goto
|
||||
:n "gT" #'+tabs:previous-or-goto)
|
||||
|
||||
|
@ -494,14 +494,14 @@ directives. By default, this only recognizes C directives.")
|
|||
:v "g=" #'evil-numbers/inc-at-pt-incremental
|
||||
:v "g-" #'evil-numbers/dec-at-pt-incremental
|
||||
:v "g+" #'evil-numbers/inc-at-pt
|
||||
(:when (featurep! :tools lookup)
|
||||
(:when (modulep! :tools lookup)
|
||||
:nv "K" #'+lookup/documentation
|
||||
:nv "gd" #'+lookup/definition
|
||||
:nv "gD" #'+lookup/references
|
||||
:nv "gf" #'+lookup/file
|
||||
:nv "gI" #'+lookup/implementations
|
||||
:nv "gA" #'+lookup/assignments)
|
||||
(:when (featurep! :tools eval)
|
||||
(:when (modulep! :tools eval)
|
||||
:nv "gr" #'+eval:region
|
||||
:n "gR" #'+eval/buffer
|
||||
:v "gR" #'+eval:replace-region
|
||||
|
@ -610,7 +610,7 @@ directives. By default, this only recognizes C directives.")
|
|||
:v "gL" #'evil-lion-right
|
||||
|
||||
;; Omni-completion
|
||||
(:when (featurep! :completion company)
|
||||
(:when (modulep! :completion company)
|
||||
(:prefix "C-x"
|
||||
:i "C-l" #'+company/whole-lines
|
||||
:i "C-k" #'+company/dict-or-keywords
|
||||
|
|
|
@ -21,9 +21,9 @@
|
|||
|
||||
(when (and (not noninteractive)
|
||||
(not doom-reloading-p)
|
||||
(featurep! +everywhere))
|
||||
(modulep! +everywhere))
|
||||
|
||||
(setq evil-collection-company-use-tng (featurep! :completion company +tng)
|
||||
(setq evil-collection-company-use-tng (modulep! :completion company +tng)
|
||||
;; must be set before evil/evil-collection is loaded
|
||||
evil-want-keybinding nil)
|
||||
|
||||
|
@ -293,9 +293,9 @@ and complains if a module is loaded too early (during startup)."
|
|||
(append (list doom-leader-key doom-localleader-key
|
||||
doom-leader-alt-key)
|
||||
evil-collection-key-blacklist
|
||||
(when (featurep! :tools lookup)
|
||||
(when (modulep! :tools lookup)
|
||||
'("gd" "gf" "K"))
|
||||
(when (featurep! :tools eval)
|
||||
(when (modulep! :tools eval)
|
||||
'("gr" "gR"))
|
||||
'("[" "]" "gz" "<escape>")))
|
||||
|
||||
|
|
|
@ -28,10 +28,10 @@
|
|||
:pin "69c883720b30a892c63bc89f49d4f0e8b8028908")
|
||||
|
||||
;;
|
||||
(when (featurep! +everywhere)
|
||||
(when (modulep! +everywhere)
|
||||
;; `evil-collection-neotree' uses the `neotree-make-executor' macro, but this
|
||||
;; requires neotree be available during byte-compilation (while installing).
|
||||
(when (featurep! :ui neotree)
|
||||
(when (modulep! :ui neotree)
|
||||
(package! neotree)
|
||||
(autoload 'neotree-make-executor "neotree" nil nil 'macro))
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ must be non-read-only, empty, and there must be a rule in
|
|||
;;; Bootstrap
|
||||
|
||||
(after! yasnippet
|
||||
(if (featurep! :editor snippets)
|
||||
(if (modulep! :editor snippets)
|
||||
(add-to-list 'yas-snippet-dirs '+file-templates-dir 'append #'eq)
|
||||
(setq yas-prompt-functions (delq #'yas-dropdown-prompt yas-prompt-functions)
|
||||
yas-snippet-dirs '(+file-templates-dir))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; editor/fold/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
;; Add vimish-fold, outline-mode & hideshow support to folding commands
|
||||
(define-key! 'global
|
||||
[remap evil-toggle-fold] #'+fold/toggle
|
||||
|
@ -72,7 +72,7 @@
|
|||
|
||||
|
||||
(use-package! evil-vimish-fold
|
||||
:when (featurep! :editor evil)
|
||||
:when (modulep! :editor evil)
|
||||
:commands (evil-vimish-fold/next-fold evil-vimish-fold/previous-fold
|
||||
evil-vimish-fold/delete evil-vimish-fold/delete-all
|
||||
evil-vimish-fold/create evil-vimish-fold/create-line)
|
||||
|
@ -88,7 +88,7 @@
|
|||
(vimish-fold-global-mode +1))
|
||||
|
||||
(use-package! ts-fold
|
||||
:when (featurep! :tools tree-sitter)
|
||||
:when (modulep! :tools tree-sitter)
|
||||
:after tree-sitter
|
||||
:config
|
||||
;; we want to use our own face so we nullify this one to have no effect and
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
(package! hideshow :built-in t)
|
||||
|
||||
(package! vimish-fold :pin "a6501cbfe3db791f9ca17fd986c7202a87f3adb8")
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
(package! evil-vimish-fold :pin "b6e0e6b91b8cd047e80debef1a536d9d49eef31a"))
|
||||
(when (featurep! :tools tree-sitter)
|
||||
(when (modulep! :tools tree-sitter)
|
||||
(package! ts-fold :pin "01d6485398a553a4fc4bbb3910edeb881c657f1f"
|
||||
:recipe (:host github :repo "jcs090218/ts-fold")))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; editor/format/autoload/evil.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :editor evil)
|
||||
;;;###if (modulep! :editor evil)
|
||||
|
||||
;;;###autoload (autoload '+format:region "editor/format/autoload/evil" nil t)
|
||||
(evil-define-operator +format:region (beg end)
|
||||
|
|
|
@ -51,7 +51,7 @@ This is controlled by `+format-on-save-enabled-modes'."
|
|||
((not (require 'format-all nil t))))
|
||||
(format-all-mode +1)))
|
||||
|
||||
(when (featurep! +onsave)
|
||||
(when (modulep! +onsave)
|
||||
(add-hook 'after-change-major-mode-hook #'+format-enable-on-save-maybe-h))
|
||||
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
;; -*- lexical-binding: t; no-byte-compile: t; -*-
|
||||
;;; editor/god/doctor.el
|
||||
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
(warn! "god-mode is not really compatible with evil"))
|
||||
|
||||
(when (featurep! :editor objed)
|
||||
(when (modulep! :editor objed)
|
||||
(warn! "god-mode is not really compatible with objed"))
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
|
||||
(use-package! lispyville
|
||||
:when (featurep! :editor evil)
|
||||
:when (modulep! :editor evil)
|
||||
:hook (lispy-mode . lispyville-mode)
|
||||
:init
|
||||
(setq lispyville-key-theme
|
||||
|
|
|
@ -2,5 +2,5 @@
|
|||
;;; editor/lispyville/packages.el
|
||||
|
||||
(package! lispy :pin "df1b7e614fb0f73646755343e8892ddda310f427")
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
(package! lispyville :pin "9c14bed0359f659e246d345c706f895737c3d172"))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; editor/multiple-cursors/autoload/evil-mc.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :editor evil)
|
||||
;;;###if (modulep! :editor evil)
|
||||
|
||||
;;;###autoload
|
||||
(defun +multiple-cursors/evil-mc-toggle-cursors ()
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
;;; Packages
|
||||
|
||||
(use-package! evil-multiedit
|
||||
:when (featurep! :editor evil)
|
||||
:when (modulep! :editor evil)
|
||||
:defer t)
|
||||
|
||||
|
||||
(use-package! iedit
|
||||
:when (featurep! :completion vertico)
|
||||
:when (modulep! :completion vertico)
|
||||
:defer t
|
||||
:init
|
||||
;; Fix conflict with embark.
|
||||
|
@ -24,7 +24,7 @@
|
|||
|
||||
|
||||
(use-package! evil-mc
|
||||
:when (featurep! :editor evil)
|
||||
:when (modulep! :editor evil)
|
||||
:commands (evil-mc-make-cursor-here
|
||||
evil-mc-make-all-cursors
|
||||
evil-mc-undo-all-cursors
|
||||
|
@ -74,7 +74,8 @@
|
|||
(apply fn args)))
|
||||
|
||||
;; REVIEW This is tremendously slow on macos and windows for some reason.
|
||||
(setq evil-mc-enable-bar-cursor (not (or IS-MAC IS-WINDOWS)))
|
||||
(setq evil-mc-enable-bar-cursor (not (or (featurep :os 'macos)
|
||||
(featurep :os 'windows))))
|
||||
|
||||
(after! smartparens
|
||||
;; Make evil-mc cooperate with smartparens better
|
||||
|
@ -171,7 +172,7 @@
|
|||
;; mc doesn't play well with evil, this attempts to assuage some of its
|
||||
;; problems so that any plugins that depend on multiple-cursors (which I have
|
||||
;; no control over) can still use it in relative safety.
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
(evil-define-key* '(normal emacs) mc/keymap [escape] #'mc/keyboard-quit)
|
||||
|
||||
(defvar +mc--compat-evil-prev-state nil)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
;;; editor/multiple-cursors/packages.el
|
||||
|
||||
(cond
|
||||
((featurep! :editor evil)
|
||||
((modulep! :editor evil)
|
||||
(package! evil-multiedit :pin "23b53bc8743fb82a8854ba907b1d277374c93a79")
|
||||
(package! evil-mc :pin "63fd2fe0c213a4cc31c464d246f92931c4cb720f"))
|
||||
|
||||
|
|
|
@ -23,5 +23,5 @@
|
|||
(face-remap-remove-relative remap))
|
||||
(setq +objed--extra-face-remaps nil)))
|
||||
|
||||
(unless (featurep! +manual)
|
||||
(unless (modulep! +manual)
|
||||
(objed-mode +1)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue