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
|
@ -48,7 +48,7 @@ Possible values:
|
|||
(defvar +doom-dashboard-menu-sections
|
||||
'(("Reload last session"
|
||||
:icon (all-the-icons-octicon "history" :face 'doom-dashboard-menu-title)
|
||||
:when (cond ((featurep! :ui workspaces)
|
||||
:when (cond ((modulep! :ui workspaces)
|
||||
(file-exists-p (expand-file-name persp-auto-save-fname persp-save-dir)))
|
||||
((require 'desktop nil t)
|
||||
(file-exists-p (desktop-full-file-name))))
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
:hook (doom-load-theme . doom-themes-org-config)
|
||||
:init (setq doom-theme 'doom-one)
|
||||
;; more Atom-esque file icons for neotree/treemacs
|
||||
(when (featurep! :ui neotree)
|
||||
(when (modulep! :ui neotree)
|
||||
(add-hook 'doom-load-theme-hook #'doom-themes-neotree-config)
|
||||
(setq doom-themes-neotree-enable-variable-pitch t
|
||||
doom-themes-neotree-file-icons 'simple
|
||||
doom-themes-neotree-line-spacing 2))
|
||||
(when (featurep! :ui treemacs)
|
||||
(when (modulep! :ui treemacs)
|
||||
(add-hook 'doom-load-theme-hook #'doom-themes-treemacs-config)))
|
||||
|
||||
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
:config
|
||||
(setq emojify-styles
|
||||
(delq
|
||||
nil (list (if (featurep! +ascii) 'ascii)
|
||||
(if (featurep! +github) 'github)
|
||||
(if (featurep! +unicode) 'unicode))))
|
||||
nil (list (if (modulep! +ascii) 'ascii)
|
||||
(if (modulep! +github) 'github)
|
||||
(if (modulep! +unicode) 'unicode))))
|
||||
|
||||
(emojify-set-emoji-styles emojify-styles))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; ui/ligatures/autoload/install.el -*- lexical-binding: t; -*-
|
||||
;;;###if (or (featurep! +fira) (featurep! +hasklig) (featurep! +iosevka))
|
||||
;;;###if (or (modulep! +fira) (modulep! +hasklig) (modulep! +iosevka))
|
||||
|
||||
(defun +ligatures--install-font (prefix name url-format fonts-alist &optional extra-fonts)
|
||||
"Install fonts to the local system.
|
||||
|
|
|
@ -141,7 +141,7 @@ and cannot run in."
|
|||
(let ((in-mode-p
|
||||
(+ligatures--enable-p +ligatures-in-modes))
|
||||
(in-mode-extras-p
|
||||
(and (featurep! +extra)
|
||||
(and (modulep! +extra)
|
||||
(+ligatures--enable-p +ligatures-extras-in-modes))))
|
||||
(when in-mode-p
|
||||
(if (boundp '+ligature--composition-table)
|
||||
|
@ -214,7 +214,7 @@ and cannot run in."
|
|||
|
||||
(defvar +ligatures--font-alist ())
|
||||
|
||||
(cond ((featurep! +fira) (load! "+fira"))
|
||||
((featurep! +iosevka) (load! "+iosevka"))
|
||||
((featurep! +hasklig) (load! "+hasklig"))
|
||||
((featurep! +pragmata-pro) (load! "+pragmata-pro")))))
|
||||
(cond ((modulep! +fira) (load! "+fira"))
|
||||
((modulep! +iosevka) (load! "+iosevka"))
|
||||
((modulep! +hasklig) (load! "+hasklig"))
|
||||
((modulep! +pragmata-pro) (load! "+pragmata-pro")))))
|
||||
|
|
|
@ -242,7 +242,7 @@ LHS and RHS will accept."
|
|||
anzu--last-isearch-string anzu--overflow-p)))
|
||||
|
||||
(use-package! evil-anzu
|
||||
:when (featurep! :editor evil)
|
||||
:when (modulep! :editor evil)
|
||||
:after-call evil-ex-start-search evil-ex-start-word-search evil-ex-search-activate-highlight
|
||||
:config (global-anzu-mode +1))
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ Meant for `doom-change-font-size-hook'."
|
|||
;;;###autoload
|
||||
(defun +modeline-clear-env-in-all-windows-h (&rest _)
|
||||
"Blank out version strings in all buffers."
|
||||
(unless (featurep! +light)
|
||||
(unless (modulep! +light)
|
||||
(dolist (buffer (buffer-list))
|
||||
(with-current-buffer buffer
|
||||
(setq doom-modeline-env--version
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
;;; ui/modeline/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(when (featurep! +light)
|
||||
(when (modulep! +light)
|
||||
(load! "+light"))
|
||||
|
||||
|
||||
(use-package! doom-modeline
|
||||
:unless (featurep! +light)
|
||||
:unless (modulep! +light)
|
||||
:hook (after-init . doom-modeline-mode)
|
||||
:hook (doom-modeline-mode . size-indication-mode) ; filesize in modeline
|
||||
:hook (doom-modeline-mode . column-number-mode) ; cursor column in modeline
|
||||
|
@ -75,6 +75,6 @@
|
|||
:after-call isearch-mode)
|
||||
|
||||
(use-package! evil-anzu
|
||||
:when (featurep! :editor evil)
|
||||
:when (modulep! :editor evil)
|
||||
:after-call evil-ex-start-search evil-ex-start-word-search evil-ex-search-activate-highlight
|
||||
:config (global-anzu-mode +1)))
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; ui/modeline/packages.el
|
||||
|
||||
(unless (featurep! +light)
|
||||
(unless (modulep! +light)
|
||||
(package! doom-modeline :pin "ce9899f00af40edb78f58b9af5c3685d67c8eed2")
|
||||
(package! compat :pin "cc1924fd8b3f9b75b26bf93f084ea938c06f9615"))
|
||||
(package! anzu :pin "5abb37455ea44fa401d5f4c1bdc58adb2448db67")
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
(package! evil-anzu :pin "d3f6ed4773b48767bd5f4708c7f083336a8a8a86"))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;;; ui/ophints/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package! evil-goggles
|
||||
:when (featurep! :editor evil)
|
||||
:when (modulep! :editor evil)
|
||||
:hook (doom-first-input . evil-goggles-mode)
|
||||
:init
|
||||
(setq evil-goggles-duration 0.1
|
||||
|
@ -24,7 +24,7 @@
|
|||
:face evil-goggles-yank-face
|
||||
:switch evil-goggles-enable-yank
|
||||
:advice evil-goggles--generic-async-advice))
|
||||
(when (featurep! :editor lispy)
|
||||
(when (modulep! :editor lispy)
|
||||
(pushnew! evil-goggles--commands
|
||||
'(lispyville-delete
|
||||
:face evil-goggles-delete-face
|
||||
|
@ -65,7 +65,7 @@
|
|||
|
||||
|
||||
(use-package! volatile-highlights
|
||||
:unless (featurep! :editor evil)
|
||||
:unless (modulep! :editor evil)
|
||||
:hook (doom-first-input . volatile-highlights-mode)
|
||||
:config
|
||||
(after! undo-fu
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; ui/ophints/packages.el
|
||||
|
||||
(if (featurep! :editor evil)
|
||||
(if (modulep! :editor evil)
|
||||
(package! evil-goggles :pin "8f20a16e74016f37ad76dc4f2230d9b00c6df3c2")
|
||||
(package! volatile-highlights :pin "9a20091f0ce7fc0a6b3e641a6a46d5f3ac4d8392"))
|
||||
|
|
|
@ -209,7 +209,7 @@ the command buffer."
|
|||
|
||||
;;;###package helm
|
||||
;;;###package helm-ag
|
||||
(when (featurep! :completion helm)
|
||||
(when (modulep! :completion helm)
|
||||
(setq helm-default-display-buffer-functions '(+popup-display-buffer-stacked-side-window-fn))
|
||||
|
||||
;; Fix #897: "cannot open side window" error when TAB-completing file links
|
||||
|
|
|
@ -41,7 +41,7 @@ adjustment.")
|
|||
|
||||
(defvar +popup-buffer-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
;; For maximum escape coverage in emacs state buffers; this only works in
|
||||
;; GUI Emacs, in tty Emacs use C-g instead
|
||||
(define-key map [escape] #'doom/escape))
|
||||
|
@ -127,10 +127,10 @@ prevent the popup(s) from messing up the UI (or vice versa)."
|
|||
;; Default popup rules & bootstrap
|
||||
|
||||
(set-popup-rules!
|
||||
(when (featurep! +all)
|
||||
(when (modulep! +all)
|
||||
'(("^\\*" :slot 1 :vslot -1 :select t)
|
||||
("^ \\*" :slot 1 :vslot -1 :size +popup-shrink-to-fit)))
|
||||
(when (featurep! +defaults)
|
||||
(when (modulep! +defaults)
|
||||
'(("^\\*Completions" :ignore t)
|
||||
("^\\*Local variables\\*$"
|
||||
:vslot -1 :slot 1 :size +popup-shrink-to-fit)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; ui/tabs/autoload.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :editor evil)
|
||||
;;;###if (modulep! :editor evil)
|
||||
|
||||
;;;###autoload (autoload '+tabs:next-or-goto "ui/tabs/autoload" nil t)
|
||||
(evil-define-command +tabs:next-or-goto (index)
|
||||
|
|
|
@ -42,7 +42,7 @@ This must be set before `treemacs' has loaded.")
|
|||
|
||||
|
||||
(use-package! treemacs-evil
|
||||
:when (featurep! :editor evil +everywhere)
|
||||
:when (modulep! :editor evil +everywhere)
|
||||
:defer t
|
||||
:init
|
||||
(after! treemacs (require 'treemacs-evil))
|
||||
|
@ -63,15 +63,15 @@ This must be set before `treemacs' has loaded.")
|
|||
|
||||
|
||||
(use-package! treemacs-magit
|
||||
:when (featurep! :tools magit)
|
||||
:when (modulep! :tools magit)
|
||||
:after treemacs magit)
|
||||
|
||||
|
||||
(use-package! treemacs-persp
|
||||
:when (featurep! :ui workspaces)
|
||||
:when (modulep! :ui workspaces)
|
||||
:after treemacs
|
||||
:config (treemacs-set-scope-type 'Perspectives))
|
||||
|
||||
(use-package! lsp-treemacs
|
||||
:when (featurep! +lsp)
|
||||
:when (modulep! +lsp)
|
||||
:after (treemacs lsp))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; ui/treemacs/doctor.el -*- lexical-binding: t; -*-
|
||||
|
||||
(assert! (not (and (featurep! +lsp)
|
||||
(featurep! :tools lsp +eglot)))
|
||||
(assert! (not (and (modulep! +lsp)
|
||||
(modulep! :tools lsp +eglot)))
|
||||
"+lsp flag is not supported with eglot, only with lsp-mode.")
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
|
||||
(package! treemacs :pin "b18a05b1f62074a40e6011d83cd4c92cbee040dd")
|
||||
;; These packages have no :pin because they're in the same repo
|
||||
(when (featurep! :editor evil +everywhere)
|
||||
(when (modulep! :editor evil +everywhere)
|
||||
(package! treemacs-evil))
|
||||
(package! treemacs-projectile)
|
||||
(when (featurep! :tools magit)
|
||||
(when (modulep! :tools magit)
|
||||
(package! treemacs-magit))
|
||||
(when (featurep! :ui workspaces)
|
||||
(when (modulep! :ui workspaces)
|
||||
(package! treemacs-persp))
|
||||
(when (featurep! +lsp)
|
||||
(when (modulep! +lsp)
|
||||
(package! lsp-treemacs :pin "355e468b7fa9887c616a8bfe873d8e456303b67b"))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; ui/vc-gutter/autoload/diff-hl.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! +diff-hl)
|
||||
;;;###if (modulep! +diff-hl)
|
||||
|
||||
;;;###autoload
|
||||
(defalias '+vc-gutter/stage-hunk #'diff-hl-stage-current-hunk)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; ui/vc-gutter/autoload/vc-gutter.el -*- lexical-binding: t; -*-
|
||||
;;;###if (not (featurep! +diff-hl))
|
||||
;;;###if (not (modulep! +diff-hl))
|
||||
|
||||
;;;###autoload
|
||||
(defalias '+vc-gutter/stage-hunk #'git-gutter:stage-hunk)
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
;;
|
||||
;;; Default styles
|
||||
|
||||
(when (featurep! +pretty)
|
||||
(when (modulep! +pretty)
|
||||
;; UI: make the fringe small enough that the diff bars aren't too domineering,
|
||||
;; while leaving enough room for other indicators.
|
||||
(if (fboundp 'fringe-mode) (fringe-mode '8))
|
||||
|
@ -23,7 +23,7 @@
|
|||
;; to shrink the fringe and sacrifice precious space for other fringe
|
||||
;; indicators (like flycheck or flyspell).
|
||||
;; TODO Extract these into a package with faces that themes can target.
|
||||
(if (not (featurep! +diff-hl))
|
||||
(if (not (modulep! +diff-hl))
|
||||
(after! git-gutter-fringe
|
||||
(define-fringe-bitmap 'git-gutter-fr:added [224]
|
||||
nil nil '(center repeated))
|
||||
|
@ -65,7 +65,7 @@
|
|||
;;; git-gutter
|
||||
|
||||
(use-package! git-gutter
|
||||
:unless (featurep! +diff-hl)
|
||||
:unless (modulep! +diff-hl)
|
||||
:commands git-gutter:revert-hunk git-gutter:stage-hunk
|
||||
:init
|
||||
(add-hook! 'find-file-hook
|
||||
|
@ -146,7 +146,7 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'."
|
|||
;;; diff-hl
|
||||
|
||||
(use-package! diff-hl
|
||||
:when (featurep! +diff-hl)
|
||||
:when (modulep! +diff-hl)
|
||||
:hook (find-file . diff-hl-mode)
|
||||
:hook (vc-dir-mode . diff-hl-dir-mode)
|
||||
:hook (dired-mode . diff-hl-dired-mode)
|
||||
|
@ -165,7 +165,7 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'."
|
|||
(setq diff-hl-show-staged-changes nil)
|
||||
|
||||
;; UX: Update diffs when it makes sense too, without being too slow
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
(map! :after diff-hl-show-hunk
|
||||
:map diff-hl-show-hunk-map
|
||||
:n "p" #'diff-hl-show-hunk-previous
|
||||
|
@ -186,7 +186,7 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'."
|
|||
(bound-and-true-p diff-hl-dir-mode))
|
||||
(diff-hl-update-once))))))
|
||||
;; UX: Update diff-hl when magit alters git state.
|
||||
(when (featurep! :tools magit)
|
||||
(when (modulep! :tools magit)
|
||||
(add-hook 'magit-pre-refresh-hook #'diff-hl-magit-pre-refresh)
|
||||
(add-hook 'magit-post-refresh-hook #'diff-hl-magit-post-refresh))
|
||||
|
||||
|
@ -203,7 +203,7 @@ is deferred until the file is saved. Respects `git-gutter:disabled-modes'."
|
|||
(apply fn args)))
|
||||
|
||||
;; UX: Don't delete the current hunk's indicators while we're editing
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
(add-hook! 'diff-hl-flydiff-mode-hook
|
||||
(defun +vc-gutter-init-flydiff-mode-h ()
|
||||
(if (not diff-hl-flydiff-mode)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; ui/vc-gutter/packages.el
|
||||
|
||||
(if (featurep! +diff-hl)
|
||||
(if (modulep! +diff-hl)
|
||||
(package! diff-hl :pin "dabb7be6283488abd8d232ea8ce590d502713ed8")
|
||||
(package! git-gutter-fringe :pin "648cb5b57faec55711803cdc9434e55a733c3eba"))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;;; ui/window-select/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package! switch-window
|
||||
:when (featurep! +switch-window)
|
||||
:when (modulep! +switch-window)
|
||||
:defer t
|
||||
:init
|
||||
(global-set-key [remap other-window] #'switch-window)
|
||||
|
@ -10,19 +10,19 @@
|
|||
|
||||
|
||||
(use-package! ace-window
|
||||
:unless (featurep! +switch-window)
|
||||
:unless (modulep! +switch-window)
|
||||
:defer t
|
||||
:init
|
||||
(global-set-key [remap other-window] #'ace-window)
|
||||
:config
|
||||
(unless (featurep! +numbers)
|
||||
(unless (modulep! +numbers)
|
||||
(setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)))
|
||||
(setq aw-scope 'frame
|
||||
aw-background t))
|
||||
|
||||
|
||||
(use-package! winum
|
||||
:when (featurep! +numbers)
|
||||
:when (modulep! +numbers)
|
||||
:after-call doom-switch-window-hook
|
||||
:config
|
||||
(winum-mode +1)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; ui/window-select/packages.el
|
||||
|
||||
(if (featurep! +switch-window)
|
||||
(if (modulep! +switch-window)
|
||||
(package! switch-window :pin "8d9fe251d8d38b223d643df975876356ddfc1b98")
|
||||
(package! ace-window :pin "0577c426a9833ab107bab46c60d1885c611b2fb9"))
|
||||
|
||||
(when (featurep! +numbers)
|
||||
(when (modulep! +numbers)
|
||||
(package! winum :pin "c5455e866e8a5f7eab6a7263e2057aff5f1118b9"))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; ui/workspaces/autoload/evil.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! :editor evil)
|
||||
;;;###if (modulep! :editor evil)
|
||||
|
||||
;;;###autoload (autoload '+workspace:save "ui/workspaces/autoload/evil" nil t)
|
||||
(evil-define-command +workspace:save (&optional name)
|
||||
|
|
|
@ -318,7 +318,7 @@ workspace, otherwise the new workspace is blank."
|
|||
end of the workspace list."
|
||||
(interactive
|
||||
(list (or current-prefix-arg
|
||||
(if (featurep! :completion ivy)
|
||||
(if (modulep! :completion ivy)
|
||||
(ivy-read "Switch to workspace: "
|
||||
(+workspace-list-names)
|
||||
:caller #'+workspace/switch-to
|
||||
|
|
|
@ -206,7 +206,7 @@ stored in `persp-save-dir'.")
|
|||
("xt" counsel-projectile-switch-project-action-run-term "invoke term from project root")
|
||||
("X" counsel-projectile-switch-project-action-org-capture "org-capture into project")))
|
||||
|
||||
(when (featurep! :completion helm)
|
||||
(when (modulep! :completion helm)
|
||||
(after! helm-projectile
|
||||
(setcar helm-source-projectile-projects-actions
|
||||
'("Switch to Project" . +workspaces-switch-to-project-h))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue