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
|
@ -40,13 +40,13 @@
|
|||
company-dabbrev-ignore-case nil
|
||||
company-dabbrev-downcase nil)
|
||||
|
||||
(when (featurep! +tng)
|
||||
(when (modulep! +tng)
|
||||
(add-hook 'global-company-mode-hook #'company-tng-mode))
|
||||
|
||||
:config
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
(add-hook 'company-mode-hook #'evil-normalize-keymaps)
|
||||
(unless (featurep! +childframe)
|
||||
(unless (modulep! +childframe)
|
||||
;; Don't persist company popups when switching back to normal mode.
|
||||
;; `company-box' aborts on mode switch so it doesn't need this.
|
||||
(add-hook! 'evil-normal-state-entry-hook
|
||||
|
@ -95,7 +95,7 @@
|
|||
|
||||
|
||||
(use-package! company-box
|
||||
:when (featurep! +childframe)
|
||||
:when (modulep! +childframe)
|
||||
:hook (company-mode . company-box-mode)
|
||||
:config
|
||||
(setq company-box-show-single-candidate t
|
||||
|
|
|
@ -3,5 +3,5 @@
|
|||
|
||||
(package! company :pin "1005540b1cdf176cbcf893b2fa83d2075cbbe3ca")
|
||||
(package! company-dict :pin "cd7b8394f6014c57897f65d335d6b2bd65dab1f4")
|
||||
(when (featurep! +childframe)
|
||||
(when (modulep! +childframe)
|
||||
(package! company-box :pin "f9cbbc7df8efbb56a8d31a5b422d158660d9109e"))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; completion/helm/autoload/evil.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :editor evil)
|
||||
;;;###if (modulep! :editor evil)
|
||||
|
||||
;;;###autoload (autoload '+helm:project-search "completion/helm/autoload/evil" nil t)
|
||||
(evil-define-command +helm:project-search (all-files-p query)
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"A version of `helm-buffers-list' with its buffer list restricted to the
|
||||
current workspace."
|
||||
(interactive)
|
||||
(unless (featurep! :ui workspaces)
|
||||
(unless (modulep! :ui workspaces)
|
||||
(user-error "This command requires the :ui workspaces module"))
|
||||
(with-no-warnings
|
||||
(with-persp-buffer-list nil (helm-buffers-list))))
|
||||
|
@ -28,7 +28,7 @@ current workspace."
|
|||
"A version of `helm-mini' with its buffer list restricted to the current
|
||||
workspace."
|
||||
(interactive)
|
||||
(unless (featurep! :ui workspaces)
|
||||
(unless (modulep! :ui workspaces)
|
||||
(user-error "This command requires the :ui workspaces module"))
|
||||
(with-no-warnings
|
||||
(with-persp-buffer-list nil (helm-mini))))
|
||||
|
|
|
@ -63,17 +63,17 @@ Can be negative.")
|
|||
;; disable special behavior for left/right, M-left/right keys.
|
||||
helm-ff-lynx-style-map nil)
|
||||
|
||||
(when (featurep! :editor evil +everywhere)
|
||||
(when (modulep! :editor evil +everywhere)
|
||||
(setq helm-default-prompt-display-function #'+helm--set-prompt-display))
|
||||
|
||||
:init
|
||||
(when (featurep! +childframe)
|
||||
(when (modulep! +childframe)
|
||||
;; If this is set to 'iconify-top-level then Emacs will be minimized upon
|
||||
;; helm completion.
|
||||
(setq iconify-child-frame 'make-invisible)
|
||||
(setq helm-display-function #'+helm-posframe-display-fn))
|
||||
|
||||
(let ((fuzzy (featurep! +fuzzy)))
|
||||
(let ((fuzzy (modulep! +fuzzy)))
|
||||
(setq helm-apropos-fuzzy-match fuzzy
|
||||
helm-bookmark-show-location fuzzy
|
||||
helm-buffers-fuzzy-matching fuzzy
|
||||
|
@ -117,7 +117,7 @@ Can be negative.")
|
|||
(advice-add fn :around #'doom-use-helpful-a)))
|
||||
|
||||
(use-package! helm-flx
|
||||
:when (featurep! +fuzzy)
|
||||
:when (modulep! +fuzzy)
|
||||
:hook (helm-mode . helm-flx-mode)
|
||||
:config (helm-flx-mode +1))
|
||||
|
||||
|
@ -154,7 +154,7 @@ Can be negative.")
|
|||
|
||||
|
||||
(use-package! helm-org
|
||||
:when (featurep! :lang org)
|
||||
:when (modulep! :lang org)
|
||||
:defer t
|
||||
:init
|
||||
(after! helm-mode
|
||||
|
@ -188,7 +188,7 @@ Can be negative.")
|
|||
|
||||
(use-package! helm-icons
|
||||
:after helm
|
||||
:when (featurep! +icons)
|
||||
:when (modulep! +icons)
|
||||
:init
|
||||
(setq helm-icons-provider 'all-the-icons)
|
||||
:config
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
:pin "11fb36af119b784539d31c6160002de1957408aa")
|
||||
(package! helm-projectile :pin "58123f14c392021714fc5d23b9f95c7f95ce07f1")
|
||||
(package! swiper-helm :pin "93fb6db87bc6a5967898b5fd3286954cc72a0008")
|
||||
(when (featurep! +fuzzy)
|
||||
(when (modulep! +fuzzy)
|
||||
(package! helm-flx :pin "27dd9e3ce385a3ca15092150e65781de14b5b00b"))
|
||||
(when (featurep! +childframe)
|
||||
(when (modulep! +childframe)
|
||||
(package! posframe :pin "c91d4d53fa479ceb604071008ce0a901770eff57"))
|
||||
(when (featurep! :lang org)
|
||||
(when (modulep! :lang org)
|
||||
(package! helm-org :pin "d67186d3a64e610c03a5f3d583488f018fb032e4"))
|
||||
(when (featurep! +icons)
|
||||
(when (modulep! +icons)
|
||||
(package! helm-icons :pin "8d2f5e705c8b78a390677cf242024739c932fc95"))
|
||||
(package! helm-descbinds :pin "b72515982396b6e336ad7beb6767e95a80fca192")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;; completion/ivy/autoload/evil.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :editor evil)
|
||||
;;;###if (modulep! :editor evil)
|
||||
|
||||
;;;###autoload (autoload '+ivy:project-search "completion/ivy/autoload/evil" nil t)
|
||||
(evil-define-command +ivy:project-search (query &optional all-files-p)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; completion/ivy/autoload/hydras.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :ui hydra)
|
||||
;;;###if (modulep! :ui hydra)
|
||||
|
||||
;;;###autoload
|
||||
(after! ivy-hydra
|
||||
|
|
|
@ -281,7 +281,7 @@ The point of this is to avoid Emacs locking up indexing massive file trees."
|
|||
(replace-regexp-in-string
|
||||
"[! |]" (lambda (substr)
|
||||
(cond ((and (string= substr " ")
|
||||
(not (featurep! +fuzzy)))
|
||||
(not (modulep! +fuzzy)))
|
||||
" ")
|
||||
((string= substr "|")
|
||||
"\\\\\\\\|")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; completion/ivy/autoload/posframe.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! +childframe)
|
||||
;;;###if (modulep! +childframe)
|
||||
|
||||
;;;###autoload
|
||||
(defun +ivy-display-at-frame-center-near-bottom-fn (str)
|
||||
|
|
|
@ -22,11 +22,11 @@ results buffer.")
|
|||
:hook (doom-first-input . ivy-mode)
|
||||
:init
|
||||
(let ((standard-search-fn
|
||||
(if (featurep! +prescient)
|
||||
(if (modulep! +prescient)
|
||||
#'+ivy-prescient-non-fuzzy
|
||||
#'ivy--regex-plus))
|
||||
(alt-search-fn
|
||||
(if (featurep! +fuzzy)
|
||||
(if (modulep! +fuzzy)
|
||||
#'ivy--regex-fuzzy
|
||||
;; Ignore order for non-fuzzy searches by default
|
||||
#'ivy--regex-ignore-order)))
|
||||
|
@ -116,7 +116,7 @@ results buffer.")
|
|||
:config
|
||||
(setq ivy-rich-parse-remote-buffer nil)
|
||||
|
||||
(when (featurep! +icons)
|
||||
(when (modulep! +icons)
|
||||
(cl-pushnew '(+ivy-rich-buffer-icon)
|
||||
(cadr (plist-get ivy-rich-display-transformers-list
|
||||
'ivy-switch-buffer))
|
||||
|
@ -160,7 +160,7 @@ results buffer.")
|
|||
|
||||
|
||||
(use-package! all-the-icons-ivy
|
||||
:when (featurep! +icons)
|
||||
:when (modulep! +icons)
|
||||
:after ivy
|
||||
:config
|
||||
;; `all-the-icons-ivy' is incompatible with ivy-rich's switch-buffer
|
||||
|
@ -335,7 +335,7 @@ results buffer.")
|
|||
;; no highlighting visited files; slows down the filtering
|
||||
(ivy-set-display-transformer #'counsel-projectile-find-file nil)
|
||||
|
||||
(when (featurep! +prescient)
|
||||
(when (modulep! +prescient)
|
||||
(setq counsel-projectile-sort-files t)))
|
||||
|
||||
|
||||
|
@ -345,7 +345,7 @@ results buffer.")
|
|||
|
||||
|
||||
(use-package! ivy-posframe
|
||||
:when (featurep! +childframe)
|
||||
:when (modulep! +childframe)
|
||||
:hook (ivy-mode . ivy-posframe-mode)
|
||||
:config
|
||||
(setq ivy-fixed-height-minibuffer nil
|
||||
|
@ -369,23 +369,23 @@ results buffer.")
|
|||
|
||||
|
||||
(use-package! flx
|
||||
:when (featurep! +fuzzy)
|
||||
:unless (featurep! +prescient)
|
||||
:when (modulep! +fuzzy)
|
||||
:unless (modulep! +prescient)
|
||||
:defer t ; is loaded by ivy
|
||||
:preface (setq ivy--flx-featurep (featurep! +fuzzy))
|
||||
:preface (setq ivy--flx-featurep (modulep! +fuzzy))
|
||||
:init (setq ivy-flx-limit 10000))
|
||||
|
||||
(use-package! ivy-avy
|
||||
:after ivy)
|
||||
|
||||
(use-package! ivy-prescient
|
||||
:when (featurep! +prescient)
|
||||
:when (modulep! +prescient)
|
||||
:hook (ivy-mode . ivy-prescient-mode)
|
||||
:hook (ivy-prescient-mode . prescient-persist-mode)
|
||||
:commands +ivy-prescient-non-fuzzy
|
||||
:init
|
||||
(setq prescient-filter-method
|
||||
(if (featurep! +fuzzy)
|
||||
(if (modulep! +fuzzy)
|
||||
'(literal regexp initialism fuzzy)
|
||||
'(literal regexp initialism)))
|
||||
:config
|
||||
|
|
|
@ -12,13 +12,13 @@
|
|||
(package! ivy-rich :pin "600b8183ed0be8668dcc548cc2c8cb94b001363b")
|
||||
(package! wgrep :pin "f9687c28bbc2e84f87a479b6ce04407bb97cfb23")
|
||||
|
||||
(if (featurep! +prescient)
|
||||
(if (modulep! +prescient)
|
||||
(package! ivy-prescient :pin "c5295a9eecbd2935bb57684a4422638e03bf738c")
|
||||
(when (featurep! +fuzzy)
|
||||
(when (modulep! +fuzzy)
|
||||
(package! flx :pin "e3b3f0533e44c5250ce73d728b59a7e96c692b5d")))
|
||||
|
||||
(when (featurep! +childframe)
|
||||
(when (modulep! +childframe)
|
||||
(package! ivy-posframe :pin "533a8e368fcabfd534761a5c685ce713376fa594"))
|
||||
|
||||
(when (featurep! +icons)
|
||||
(when (modulep! +icons)
|
||||
(package! all-the-icons-ivy :pin "a70cbfa1effe36efc946a823a580cec686d5e88d"))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;; completion/vertico/autoload/evil.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :editor evil)
|
||||
;;;###if (modulep! :editor evil)
|
||||
|
||||
;;;###autoload (autoload '+vertico:project-search "completion/vertico/autoload/evil" nil t)
|
||||
(evil-define-command +vertico:project-search (query &optional all-files-p)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; completion/vertico/autoload/magit.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :tools magit)
|
||||
;;;###if (modulep! :tools magit)
|
||||
|
||||
;;;###autoload
|
||||
(defun +vertico/embark-magit-status (file)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; completion/vertico/autoload/workspaces.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :ui workspaces)
|
||||
;;;###if (modulep! :ui workspaces)
|
||||
|
||||
(defun +vertico--workspace-buffer-state ()
|
||||
(let ((preview
|
||||
|
|
|
@ -152,7 +152,7 @@ orderless."
|
|||
(consult-customize
|
||||
consult-theme
|
||||
:preview-key (list (kbd "C-SPC") :debounce 0.5 'any))
|
||||
(when (featurep! :lang org)
|
||||
(when (modulep! :lang org)
|
||||
(defvar +vertico--consult-org-source
|
||||
(list :name "Org Buffer"
|
||||
:category 'buffer
|
||||
|
@ -185,7 +185,7 @@ orderless."
|
|||
("C-x C-d" . consult-dir)
|
||||
("C-x C-j" . consult-dir-jump-file))
|
||||
:config
|
||||
(when (featurep! :tools docker)
|
||||
(when (modulep! :tools docker)
|
||||
(defun +vertico--consult-dir-docker-hosts ()
|
||||
"Get a list of hosts from docker."
|
||||
(when (require 'docker-tramp nil t)
|
||||
|
@ -213,7 +213,7 @@ orderless."
|
|||
(add-to-list 'consult-dir-sources 'consult-dir--source-tramp-local t))
|
||||
|
||||
(use-package! consult-flycheck
|
||||
:when (featurep! :checkers syntax)
|
||||
:when (modulep! :checkers syntax)
|
||||
:after (consult flycheck))
|
||||
|
||||
|
||||
|
@ -263,9 +263,9 @@ orderless."
|
|||
(setf (alist-get 'package embark-keymap-alist) #'+vertico/embark-doom-package-map)
|
||||
(map! (:map embark-file-map
|
||||
:desc "Open target with sudo" "s" #'doom/sudo-find-file
|
||||
(:when (featurep! :tools magit)
|
||||
(:when (modulep! :tools magit)
|
||||
:desc "Open magit-status of target" "g" #'+vertico/embark-magit-status)
|
||||
(:when (featurep! :ui workspaces)
|
||||
(:when (modulep! :ui workspaces)
|
||||
:desc "Open in new workspace" "TAB" #'+vertico/embark-open-in-new-workspace))))
|
||||
|
||||
|
||||
|
@ -275,7 +275,7 @@ orderless."
|
|||
(map! :map minibuffer-local-map
|
||||
:desc "Cycle marginalia views" "M-A" #'marginalia-cycle)
|
||||
:config
|
||||
(when (featurep! +icons)
|
||||
(when (modulep! +icons)
|
||||
(add-hook 'marginalia-mode-hook #'all-the-icons-completion-marginalia-setup))
|
||||
(advice-add #'marginalia--project-root :override #'doom-project-root)
|
||||
(pushnew! marginalia-command-categories
|
||||
|
@ -304,7 +304,7 @@ orderless."
|
|||
|
||||
|
||||
(use-package! vertico-posframe
|
||||
:when (featurep! +childframe)
|
||||
:when (modulep! +childframe)
|
||||
:hook (vertico-mode . vertico-posframe-mode)
|
||||
:config
|
||||
(add-hook 'doom-after-reload-hook #'posframe-delete-all))
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
(package! consult :pin "6319aec3513cd587a8817269bc32c8283d419710")
|
||||
(package! compat :pin "cc1924fd8b3f9b75b26bf93f084ea938c06f9615")
|
||||
(package! consult-dir :pin "d397ca6ea67af4d3c59a330a778affd825f0efd9")
|
||||
(when (featurep! :checkers syntax)
|
||||
(when (modulep! :checkers syntax)
|
||||
(package! consult-flycheck :pin "9b40f136c017fadf6239d7602d16bf73b4ad5198"))
|
||||
|
||||
(package! embark :pin "5d0459d27aa7cf738b5af36cf862723a62bef955")
|
||||
|
@ -21,10 +21,10 @@
|
|||
|
||||
(package! wgrep :pin "f9687c28bbc2e84f87a479b6ce04407bb97cfb23")
|
||||
|
||||
(when (featurep! +icons)
|
||||
(when (modulep! +icons)
|
||||
(package! all-the-icons-completion :pin "286e2c064a1298be0d8d4100dc91d7a7a554d04a"))
|
||||
|
||||
(when (featurep! +childframe)
|
||||
(when (modulep! +childframe)
|
||||
(package! vertico-posframe
|
||||
:recipe (:host github :repo "tumashu/vertico-posframe")
|
||||
:pin "7ca364d319e7ba8ccba26a0d57513f3e66f1b05b"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue