From ad6a3d0f33eed9e08f88f1913f2e10fc7e9bdffb Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 12 Aug 2022 20:29:19 +0200 Subject: [PATCH] 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. --- lisp/doom-keybinds.el | 2 +- lisp/doom-modules.el | 13 +- lisp/lib/help.el | 5 +- modules/app/calendar/autoload.el | 4 +- modules/app/calendar/config.el | 2 +- modules/app/irc/autoload/irc.el | 8 +- modules/app/irc/autoload/ivy.el | 2 +- modules/app/irc/autoload/vertico.el | 2 +- modules/app/irc/config.el | 4 +- modules/app/rss/autoload.el | 4 +- modules/app/rss/config.el | 4 +- modules/app/rss/packages.el | 2 +- modules/app/twitter/autoload.el | 6 +- modules/app/twitter/config.el | 4 +- modules/checkers/spell/autoload/+flyspell.el | 2 +- modules/checkers/spell/autoload/+spell-fu.el | 8 +- modules/checkers/spell/config.el | 22 +-- modules/checkers/spell/doctor.el | 6 +- modules/checkers/spell/packages.el | 8 +- modules/checkers/syntax/config.el | 2 +- modules/checkers/syntax/packages.el | 2 +- modules/completion/company/config.el | 8 +- modules/completion/company/packages.el | 2 +- modules/completion/helm/autoload/evil.el | 2 +- modules/completion/helm/autoload/helm.el | 4 +- modules/completion/helm/config.el | 12 +- modules/completion/helm/packages.el | 8 +- modules/completion/ivy/autoload/evil.el | 2 +- modules/completion/ivy/autoload/hydras.el | 2 +- modules/completion/ivy/autoload/ivy.el | 2 +- modules/completion/ivy/autoload/posframe.el | 2 +- modules/completion/ivy/config.el | 22 +-- modules/completion/ivy/packages.el | 8 +- modules/completion/vertico/autoload/evil.el | 2 +- modules/completion/vertico/autoload/magit.el | 2 +- .../completion/vertico/autoload/workspaces.el | 2 +- modules/completion/vertico/config.el | 14 +- modules/completion/vertico/packages.el | 6 +- modules/config/default/+emacs-bindings.el | 152 ++++++++-------- modules/config/default/+emacs.el | 2 +- modules/config/default/+evil-bindings.el | 166 +++++++++--------- modules/config/default/+evil.el | 2 +- modules/config/default/autoload/default.el | 12 +- modules/config/default/autoload/search.el | 30 ++-- modules/config/default/autoload/text.el | 2 +- modules/config/default/config.el | 18 +- modules/config/default/packages.el | 2 +- modules/editor/evil/+commands.el | 8 +- modules/editor/evil/config.el | 22 +-- modules/editor/evil/init.el | 8 +- modules/editor/evil/packages.el | 4 +- modules/editor/file-templates/config.el | 2 +- modules/editor/fold/config.el | 6 +- modules/editor/fold/packages.el | 4 +- modules/editor/format/autoload/evil.el | 2 +- modules/editor/format/config.el | 2 +- modules/editor/god/doctor.el | 4 +- modules/editor/lispy/config.el | 2 +- modules/editor/lispy/packages.el | 2 +- .../multiple-cursors/autoload/evil-mc.el | 2 +- modules/editor/multiple-cursors/config.el | 11 +- modules/editor/multiple-cursors/packages.el | 2 +- modules/editor/objed/config.el | 2 +- modules/emacs/dired/config.el | 14 +- modules/emacs/dired/packages.el | 8 +- modules/emacs/ibuffer/autoload/workspaces.el | 2 +- modules/emacs/ibuffer/config.el | 8 +- modules/emacs/undo/config.el | 6 +- modules/emacs/undo/packages.el | 2 +- modules/emacs/vc/autoload/hydra.el | 2 +- modules/emacs/vc/config.el | 2 +- modules/email/mu4e/autoload/email.el | 4 +- modules/email/mu4e/autoload/evil.el | 2 +- modules/email/mu4e/config.el | 18 +- modules/email/mu4e/doctor.el | 2 +- modules/email/mu4e/packages.el | 2 +- modules/email/notmuch/autoload.el | 8 +- modules/email/notmuch/config.el | 8 +- modules/email/notmuch/packages.el | 10 +- modules/email/wanderlust/config.el | 4 +- modules/input/japanese/config.el | 2 +- modules/input/layout/+azerty.el | 16 +- modules/input/layout/+bepo.el | 14 +- modules/input/layout/autoload/bepo.el | 2 +- modules/input/layout/config.el | 4 +- modules/lang/agda/config.el | 4 +- modules/lang/agda/doctor.el | 4 +- modules/lang/agda/packages.el | 2 +- modules/lang/beancount/config.el | 2 +- modules/lang/cc/config.el | 36 ++-- modules/lang/cc/doctor.el | 10 +- modules/lang/cc/packages.el | 14 +- modules/lang/clojure/config.el | 20 +-- modules/lang/clojure/doctor.el | 4 +- modules/lang/clojure/packages.el | 2 +- modules/lang/common-lisp/config.el | 2 +- modules/lang/coq/config.el | 2 +- modules/lang/crystal/config.el | 6 +- modules/lang/crystal/packages.el | 2 +- modules/lang/csharp/config.el | 8 +- modules/lang/csharp/doctor.el | 6 +- modules/lang/csharp/packages.el | 4 +- modules/lang/dart/config.el | 8 +- modules/lang/dart/doctor.el | 4 +- modules/lang/dart/packages.el | 4 +- modules/lang/dhall/config.el | 2 +- modules/lang/elixir/config.el | 8 +- modules/lang/elixir/doctor.el | 4 +- modules/lang/elixir/packages.el | 2 +- modules/lang/elm/config.el | 6 +- modules/lang/elm/doctor.el | 4 +- modules/lang/elm/packages.el | 2 +- modules/lang/emacs-lisp/config.el | 4 +- modules/lang/emacs-lisp/demos.org | 10 +- modules/lang/emacs-lisp/packages.el | 2 +- modules/lang/erlang/config.el | 2 +- modules/lang/erlang/doctor.el | 4 +- modules/lang/ess/config.el | 12 +- modules/lang/ess/packages.el | 6 +- modules/lang/fortran/autoload.el | 4 +- modules/lang/fortran/config.el | 10 +- modules/lang/fortran/doctor.el | 10 +- modules/lang/fsharp/config.el | 4 +- modules/lang/gdscript/config.el | 2 +- modules/lang/go/config.el | 10 +- modules/lang/go/doctor.el | 14 +- modules/lang/go/packages.el | 4 +- modules/lang/graphql/config.el | 2 +- modules/lang/graphql/packages.el | 2 +- modules/lang/haskell/config.el | 6 +- modules/lang/haskell/doctor.el | 12 +- modules/lang/haskell/packages.el | 4 +- modules/lang/idris/config.el | 2 +- modules/lang/java/+eclim.el | 4 +- modules/lang/java/+lsp.el | 6 +- modules/lang/java/+meghanada.el | 6 +- modules/lang/java/autoload/lsp.el | 2 +- modules/lang/java/config.el | 8 +- modules/lang/java/doctor.el | 10 +- modules/lang/java/packages.el | 10 +- modules/lang/javascript/config.el | 20 +-- modules/lang/javascript/doctor.el | 8 +- modules/lang/javascript/packages.el | 2 +- modules/lang/json/config.el | 6 +- modules/lang/json/doctor.el | 6 +- modules/lang/json/packages.el | 2 +- modules/lang/julia/config.el | 14 +- modules/lang/julia/doctor.el | 10 +- modules/lang/julia/packages.el | 4 +- modules/lang/kotlin/config.el | 4 +- modules/lang/kotlin/doctor.el | 4 +- modules/lang/kotlin/packages.el | 2 +- modules/lang/latex/+ref.el | 2 +- modules/lang/latex/+viewers.el | 2 +- modules/lang/latex/config.el | 18 +- modules/lang/latex/packages.el | 8 +- modules/lang/lean/config.el | 2 +- modules/lang/lean/packages.el | 2 +- modules/lang/ledger/config.el | 4 +- modules/lang/ledger/packages.el | 4 +- modules/lang/lua/autoload/lua.el | 4 +- modules/lang/lua/autoload/moonscript.el | 2 +- modules/lang/lua/config.el | 16 +- modules/lang/lua/packages.el | 8 +- modules/lang/markdown/config.el | 6 +- modules/lang/markdown/doctor.el | 2 +- modules/lang/markdown/packages.el | 4 +- modules/lang/nim/config.el | 2 +- modules/lang/nim/packages.el | 2 +- modules/lang/nix/autoload.el | 4 +- modules/lang/nix/config.el | 6 +- modules/lang/nix/doctor.el | 4 +- modules/lang/nix/packages.el | 4 +- modules/lang/ocaml/config.el | 16 +- modules/lang/ocaml/doctor.el | 12 +- modules/lang/ocaml/packages.el | 8 +- modules/lang/org/autoload/contrib-ipython.el | 4 +- modules/lang/org/autoload/contrib-present.el | 2 +- modules/lang/org/autoload/contrib-roam2.el | 2 +- modules/lang/org/autoload/org.el | 2 +- modules/lang/org/config.el | 37 ++-- modules/lang/org/contrib/brain.el | 4 +- modules/lang/org/contrib/dragndrop.el | 2 +- modules/lang/org/contrib/ipython.el | 2 +- modules/lang/org/contrib/journal.el | 2 +- modules/lang/org/contrib/jupyter.el | 2 +- modules/lang/org/contrib/noter.el | 2 +- modules/lang/org/contrib/pomodoro.el | 2 +- modules/lang/org/contrib/present.el | 4 +- modules/lang/org/contrib/pretty.el | 2 +- modules/lang/org/contrib/roam.el | 8 +- modules/lang/org/contrib/roam2.el | 4 +- modules/lang/org/doctor.el | 10 +- modules/lang/org/packages.el | 58 +++--- modules/lang/php/config.el | 8 +- modules/lang/php/doctor.el | 8 +- modules/lang/php/packages.el | 8 +- modules/lang/plantuml/config.el | 2 +- modules/lang/plantuml/packages.el | 2 +- modules/lang/purescript/config.el | 4 +- modules/lang/python/autoload/conda.el | 2 +- modules/lang/python/autoload/pyenv.el | 2 +- modules/lang/python/config.el | 28 +-- modules/lang/python/doctor.el | 22 +-- modules/lang/python/packages.el | 18 +- modules/lang/racket/config.el | 10 +- modules/lang/raku/config.el | 2 +- modules/lang/raku/packages.el | 2 +- modules/lang/rest/config.el | 6 +- modules/lang/rest/packages.el | 4 +- modules/lang/ruby/config.el | 18 +- modules/lang/ruby/doctor.el | 12 +- modules/lang/ruby/packages.el | 10 +- modules/lang/rust/config.el | 8 +- modules/lang/rust/doctor.el | 10 +- modules/lang/rust/packages.el | 2 +- modules/lang/scala/config.el | 4 +- modules/lang/scala/doctor.el | 10 +- modules/lang/scala/packages.el | 2 +- modules/lang/scheme/config.el | 6 +- modules/lang/scheme/packages.el | 20 +-- modules/lang/sh/config.el | 14 +- modules/lang/sh/doctor.el | 8 +- modules/lang/sh/packages.el | 6 +- modules/lang/sml/config.el | 2 +- modules/lang/sml/packages.el | 2 +- modules/lang/solidity/config.el | 4 +- modules/lang/solidity/packages.el | 4 +- modules/lang/swift/config.el | 12 +- modules/lang/swift/doctor.el | 4 +- modules/lang/swift/packages.el | 6 +- modules/lang/terra/packages.el | 2 +- modules/lang/web/+css.el | 8 +- modules/lang/web/+html.el | 4 +- modules/lang/web/autoload/evil.el | 2 +- modules/lang/web/autoload/html.el | 2 +- modules/lang/web/config.el | 2 +- modules/lang/web/doctor.el | 8 +- modules/lang/web/packages.el | 6 +- modules/lang/yaml/config.el | 2 +- modules/lang/zig/config.el | 6 +- modules/lang/zig/doctor.el | 10 +- modules/os/tty/config.el | 2 +- modules/os/tty/packages.el | 2 +- modules/term/eshell/autoload/company.el | 2 +- modules/term/eshell/autoload/eshell.el | 6 +- modules/term/eshell/autoload/evil.el | 2 +- modules/term/eshell/config.el | 2 +- modules/tools/ansible/config.el | 2 +- modules/tools/ansible/packages.el | 2 +- modules/tools/biblio/config.el | 10 +- modules/tools/biblio/packages.el | 6 +- modules/tools/debugger/autoload/evil.el | 2 +- modules/tools/debugger/config.el | 4 +- modules/tools/debugger/doctor.el | 2 +- modules/tools/debugger/packages.el | 4 +- modules/tools/docker/config.el | 2 +- modules/tools/eval/autoload/evil.el | 2 +- modules/tools/eval/config.el | 4 +- modules/tools/eval/packages.el | 2 +- modules/tools/gist/autoload/evil.el | 2 +- modules/tools/lookup/autoload/docsets.el | 8 +- modules/tools/lookup/autoload/evil.el | 2 +- modules/tools/lookup/autoload/lookup.el | 10 +- modules/tools/lookup/config.el | 24 +-- modules/tools/lookup/doctor.el | 2 +- modules/tools/lookup/packages.el | 16 +- modules/tools/lsp/+eglot.el | 6 +- modules/tools/lsp/+lsp.el | 18 +- modules/tools/lsp/autoload/common.el | 2 +- modules/tools/lsp/autoload/eglot.el | 2 +- modules/tools/lsp/autoload/lsp-mode.el | 2 +- modules/tools/lsp/config.el | 2 +- modules/tools/lsp/doctor.el | 4 +- modules/tools/lsp/packages.el | 10 +- modules/tools/magit/config.el | 10 +- modules/tools/magit/packages.el | 2 +- modules/tools/pass/autoload/consult.el | 2 +- modules/tools/pass/autoload/ivy.el | 2 +- modules/tools/pass/config.el | 2 +- modules/tools/pass/packages.el | 4 +- modules/tools/rgb/autoload.el | 2 +- modules/tools/taskrunner/autoload.el | 4 +- modules/tools/taskrunner/config.el | 4 +- modules/tools/taskrunner/packages.el | 4 +- modules/tools/terraform/config.el | 4 +- modules/tools/terraform/packages.el | 2 +- modules/tools/tmux/autoload/evil.el | 2 +- modules/tools/tree-sitter/config.el | 2 +- modules/tools/tree-sitter/packages.el | 2 +- modules/ui/doom-dashboard/config.el | 2 +- modules/ui/doom/config.el | 4 +- modules/ui/emoji/config.el | 6 +- modules/ui/ligatures/autoload/install.el | 2 +- modules/ui/ligatures/config.el | 10 +- modules/ui/modeline/+light.el | 2 +- modules/ui/modeline/autoload.el | 2 +- modules/ui/modeline/config.el | 6 +- modules/ui/modeline/packages.el | 4 +- modules/ui/ophints/config.el | 6 +- modules/ui/ophints/packages.el | 2 +- modules/ui/popup/+hacks.el | 2 +- modules/ui/popup/config.el | 6 +- modules/ui/tabs/autoload.el | 2 +- modules/ui/treemacs/config.el | 8 +- modules/ui/treemacs/doctor.el | 4 +- modules/ui/treemacs/packages.el | 8 +- modules/ui/vc-gutter/autoload/diff-hl.el | 2 +- modules/ui/vc-gutter/autoload/git-gutter.el | 2 +- modules/ui/vc-gutter/config.el | 14 +- modules/ui/vc-gutter/packages.el | 2 +- modules/ui/window-select/config.el | 8 +- modules/ui/window-select/packages.el | 4 +- modules/ui/workspaces/autoload/evil.el | 2 +- modules/ui/workspaces/autoload/workspaces.el | 2 +- modules/ui/workspaces/config.el | 2 +- 316 files changed, 1109 insertions(+), 1103 deletions(-) diff --git a/lisp/doom-keybinds.el b/lisp/doom-keybinds.el index 104854b8d..1550e6ba9 100644 --- a/lisp/doom-keybinds.el +++ b/lisp/doom-keybinds.el @@ -170,7 +170,7 @@ interface. See `doom-localleader-key' and `doom-localleader-alt-key' to change the localleader prefix." - (if (featurep! :editor evil) + (if (modulep! :editor evil) ;; :non-normal-prefix doesn't apply to non-evil sessions (only evil's ;; emacs state) `(general-define-key diff --git a/lisp/doom-modules.el b/lisp/doom-modules.el index 4f0ea60c8..112086078 100644 --- a/lisp/doom-modules.el +++ b/lisp/doom-modules.el @@ -549,12 +549,15 @@ WARNINGS: (lambda () ,@body) 'append))) -(defmacro featurep! (category &optional module flag) - "Returns t if CATEGORY MODULE is enabled. +;; DEPRECATED Remove in 3.0 +(define-obsolete-function-alias 'featurep! 'modulep! "3.0.0") + +(defmacro modulep! (category &optional module flag) + "Return t if FEATURES are all present. If FLAG is provided, returns t if CATEGORY MODULE has FLAG enabled. - (featurep! :config default) + (modulep! :config default) Module FLAGs are set in your config's `doom!' block, typically in ~/.doom.d/init.el. Like so: @@ -562,13 +565,13 @@ Module FLAGs are set in your config's `doom!' block, typically in :config (default +flag1 -flag2) CATEGORY and MODULE can be omitted When this macro is used from inside a module -(except your DOOMDIR, which is a special module). e.g. (featurep! +flag)" +(except your DOOMDIR, which is a special module). e.g. (modulep! +flag)" (and (cond (flag (memq flag (doom-module-get category module :flags))) (module (doom-module-p category module)) (doom--current-flags (memq category doom--current-flags)) ((if-let (module (doom-module-from-path)) (memq category (doom-module-get (car module) (cdr module) :flags)) - (error "(featurep! %s %s %s) couldn't figure out what module it was called from (in %s)" + (error "(modulep! %s %s %s) couldn't figure out what module it was called from (in %s)" category module flag (file!))))) t)) diff --git a/lisp/lib/help.el b/lisp/lib/help.el index bece21ded..4727a7423 100644 --- a/lisp/lib/help.el +++ b/lisp/lib/help.el @@ -361,7 +361,8 @@ without needing to check if they are available." (unless (eq (char-after) ?\() (backward-char)) (let ((sexp (sexp-at-point))) - (when (memq (car-safe sexp) '(featurep! require!)) + ;; DEPRECATED `featurep!' + (when (memq (car-safe sexp) '(featurep! modulep! require!)) (format "%s %s" (nth 1 sexp) (nth 2 sexp))))))) ((when buffer-file-name (when-let (mod (doom-module-from-path buffer-file-name)) @@ -382,7 +383,7 @@ If VISIT-DIR is non-nil, visit the module's directory rather than its documentation. Automatically selects a) the module at point (in private init files), b) the -module derived from a `featurep!' or `require!' call, c) the module that the +module derived from a `modulep!' or `require!' call, c) the module that the current file is in, or d) the module associated with the current major mode (see `doom--help-major-mode-module-alist')." (interactive diff --git a/modules/app/calendar/autoload.el b/modules/app/calendar/autoload.el index bb446931e..9ced8ccbb 100644 --- a/modules/app/calendar/autoload.el +++ b/modules/app/calendar/autoload.el @@ -13,7 +13,7 @@ (defun =calendar () "Activate (or switch to) `calendar' in its workspace." (interactive) - (if (featurep! :ui workspaces) + (if (modulep! :ui workspaces) (progn (+workspace-switch "Calendar" t) (doom/switch-to-scratch-buffer) @@ -28,7 +28,7 @@ (defun +calendar/quit () "TODO" (interactive) - (if (featurep! :ui workspaces) + (if (modulep! :ui workspaces) (when (+workspace-exists-p "Calendar") (+workspace/delete "Calendar")) (when (window-configuration-p +calendar--wconf) diff --git a/modules/app/calendar/config.el b/modules/app/calendar/config.el index 65907cfc0..75720240f 100644 --- a/modules/app/calendar/config.el +++ b/modules/app/calendar/config.el @@ -25,7 +25,7 @@ (set-popup-rule! "^\\*cfw:details" :quit t :ttl 0 :select t :size 0.4) (define-key cfw:calendar-mode-map "q" #'+calendar/quit) - (when (featurep! :editor evil +everywhere) + (when (modulep! :editor evil +everywhere) (set-evil-initial-state! '(cfw:calendar-mode cfw:details-mode) 'motion) (add-hook! (cfw:calendar-mode cfw:details-mode) #'evil-normalize-keymaps) (map! (:map cfw:calendar-mode-map diff --git a/modules/app/irc/autoload/irc.el b/modules/app/irc/autoload/irc.el index b44c47070..21ab37a66 100644 --- a/modules/app/irc/autoload/irc.el +++ b/modules/app/irc/autoload/irc.el @@ -3,7 +3,7 @@ (defvar +irc--workspace-name "*IRC*") (defun +irc-setup-wconf (&optional inhibit-workspace) - (when (and (featurep! :ui workspaces) + (when (and (modulep! :ui workspaces) (not inhibit-workspace)) (+workspace-switch +irc--workspace-name 'auto-create)) (let ((buffers (doom-buffers-in-mode 'circe-mode nil t))) @@ -58,7 +58,7 @@ workspace for it." (cancel-timer +irc--defer-timer)) (disable-circe-notifications) (mapc #'kill-buffer (doom-buffers-in-mode 'circe-mode (buffer-list) t)) - (when (featurep! :ui workspaces) + (when (modulep! :ui workspaces) (when (equal (+workspace-current-name) +irc--workspace-name) (+workspace/delete +irc--workspace-name))))) @@ -68,8 +68,8 @@ workspace for it." argument) is non-nil only show channels in current server." (interactive "P") (call-interactively - (cond ((featurep! :completion ivy) #'+irc/ivy-jump-to-channel) - ((featurep! :completion vertico) #'+irc/vertico-jump-to-channel) + (cond ((modulep! :completion ivy) #'+irc/ivy-jump-to-channel) + ((modulep! :completion vertico) #'+irc/vertico-jump-to-channel) ((user-error "No jump-to-channel backend is enabled. Enable vertico or ivy!"))))) ;;;###autoload diff --git a/modules/app/irc/autoload/ivy.el b/modules/app/irc/autoload/ivy.el index 7fc06fc13..eb25beb77 100644 --- a/modules/app/irc/autoload/ivy.el +++ b/modules/app/irc/autoload/ivy.el @@ -1,5 +1,5 @@ ;;; app/irc/autoload/ivy.el -*- lexical-binding: t; -*- -;;;###if (featurep! :completion ivy) +;;;###if (modulep! :completion ivy) ;;;###autoload (defun +irc/ivy-jump-to-channel (&optional this-server) diff --git a/modules/app/irc/autoload/vertico.el b/modules/app/irc/autoload/vertico.el index c97edece9..700103c05 100644 --- a/modules/app/irc/autoload/vertico.el +++ b/modules/app/irc/autoload/vertico.el @@ -1,5 +1,5 @@ ;;; app/irc/autoload/vertico.el -*- lexical-binding: t; -*- -;;;###if (featurep! :completion vertico) +;;;###if (modulep! :completion vertico) ;;;###autoload (defun +irc/vertico-jump-to-channel () diff --git a/modules/app/irc/config.el b/modules/app/irc/config.el index ad079d386..bf1d73cf1 100644 --- a/modules/app/irc/config.el +++ b/modules/app/irc/config.el @@ -141,7 +141,7 @@ playback.") ;; Fail gracefully if not in a circe buffer (global-set-key [remap tracking-next-buffer] #'+irc/tracking-next-buffer) - (when (featurep! :completion vertico) + (when (modulep! :completion vertico) (after! consult (add-to-list 'consult-buffer-sources '+irc--consult-circe-source 'append))) @@ -198,7 +198,7 @@ playback.") (define-key lui-mode-map "\C-u" #'lui-kill-to-beginning-of-line) (setq lui-fill-type nil) - (when (featurep! :checkers spell) + (when (modulep! :checkers spell) (setq lui-flyspell-p t)) (after! evil diff --git a/modules/app/rss/autoload.el b/modules/app/rss/autoload.el index 3e13a70e2..3c68bb464 100644 --- a/modules/app/rss/autoload.el +++ b/modules/app/rss/autoload.el @@ -6,7 +6,7 @@ (defun =rss () "Activate (or switch to) `elfeed' in its workspace." (interactive) - (if (featurep! :ui workspaces) + (if (modulep! :ui workspaces) (progn (+workspace-switch +rss-workspace-name t) (doom/switch-to-scratch-buffer) @@ -98,7 +98,7 @@ (remove-hook 'kill-buffer-hook #'+rss-cleanup-h :local) (kill-buffer b))) (mapc #'kill-buffer show-buffers)) - (if (and (featurep! :ui workspaces) + (if (and (modulep! :ui workspaces) (+workspace-exists-p +rss-workspace-name)) (+workspace/delete +rss-workspace-name) (when (window-configuration-p +rss--wconf) diff --git a/modules/app/rss/config.el b/modules/app/rss/config.el index a8078d18f..a292f4006 100644 --- a/modules/app/rss/config.el +++ b/modules/app/rss/config.el @@ -56,7 +56,7 @@ easier to scroll through.") (define-key! elfeed-show-mode-map [remap next-buffer] #'+rss/next [remap previous-buffer] #'+rss/previous)) - (when (featurep! :editor evil +everywhere) + (when (modulep! :editor evil +everywhere) (evil-define-key 'normal elfeed-search-mode-map "q" #'elfeed-kill-buffer "r" #'elfeed-search-update--force @@ -68,7 +68,7 @@ easier to scroll through.") (use-package! elfeed-org - :when (featurep! +org) + :when (modulep! +org) :after elfeed :preface (setq rmh-elfeed-org-files (list "elfeed.org")) diff --git a/modules/app/rss/packages.el b/modules/app/rss/packages.el index 83871bb56..0fbdf65b9 100644 --- a/modules/app/rss/packages.el +++ b/modules/app/rss/packages.el @@ -3,5 +3,5 @@ (package! elfeed :pin "162d7d545ed41c27967d108c04aa31f5a61c8e16") (package! elfeed-goodies :pin "c9d9cd196746add3010d74f43b5c9866562f39fb") -(when (featurep! +org) +(when (modulep! +org) (package! elfeed-org :pin "d28c858303e60dcb3a6eb18ea85ee3cb9e3dd623")) diff --git a/modules/app/twitter/autoload.el b/modules/app/twitter/autoload.el index 6dc777f2b..6148b1f2f 100644 --- a/modules/app/twitter/autoload.el +++ b/modules/app/twitter/autoload.el @@ -29,7 +29,7 @@ that works with the ui/popup module." (interactive "P") (condition-case _ (progn - (if (and (not arg) (featurep! :ui workspaces)) + (if (and (not arg) (modulep! :ui workspaces)) (+workspace/new +twitter-workspace-name) (setq +twitter--old-wconf (current-window-configuration)) (delete-other-windows) @@ -52,7 +52,7 @@ that works with the ui/popup module." (when (eq major-mode 'twittering-mode) (twittering-kill-buffer) (cond ((one-window-p) (+twitter/quit-all)) - ((featurep! :ui workspaces) + ((modulep! :ui workspaces) (+workspace/close-window-or-workspace)) ((delete-window))))) @@ -60,7 +60,7 @@ that works with the ui/popup module." (defun +twitter/quit-all () "Close all open `twitter-mode' buffers and the associated workspace, if any." (interactive) - (when (featurep! :ui workspaces) + (when (modulep! :ui workspaces) (+workspace/delete +twitter-workspace-name)) (when +twitter--old-wconf (set-window-configuration +twitter--old-wconf) diff --git a/modules/app/twitter/config.el b/modules/app/twitter/config.el index 5e194e043..5640cfde6 100644 --- a/modules/app/twitter/config.el +++ b/modules/app/twitter/config.el @@ -35,7 +35,7 @@ :group 'twittering-mode) (add-hook 'doom-real-buffer-functions #'+twitter-buffer-p) - (when (featurep! :ui popup) + (when (modulep! :ui popup) (setq twittering-pop-to-buffer-function #'+twitter-display-buffer-fn)) ;; Custom header-line for twitter buffers @@ -54,7 +54,7 @@ [remap twittering-kill-buffer] #'+twitter/quit [remap delete-window] #'+twitter/quit [remap +workspace/close-window-or-workspace] #'+twitter/quit) - (when (featurep! :editor evil +everywhere) + (when (modulep! :editor evil +everywhere) (define-key! twittering-mode-map [remap evil-window-delete] #'+twitter/quit "f" #'twittering-favorite diff --git a/modules/checkers/spell/autoload/+flyspell.el b/modules/checkers/spell/autoload/+flyspell.el index ad7b034ee..a8ec30520 100644 --- a/modules/checkers/spell/autoload/+flyspell.el +++ b/modules/checkers/spell/autoload/+flyspell.el @@ -1,5 +1,5 @@ ;;; checkers/spell/autoload/+flyspell.el -*- lexical-binding: t; -*- -;;;###if (featurep! +flyspell) +;;;###if (modulep! +flyspell) ;;;###autodef (defalias 'flyspell-mode! #'flyspell-mode) diff --git a/modules/checkers/spell/autoload/+spell-fu.el b/modules/checkers/spell/autoload/+spell-fu.el index 33450eeab..0e78dec81 100644 --- a/modules/checkers/spell/autoload/+spell-fu.el +++ b/modules/checkers/spell/autoload/+spell-fu.el @@ -1,5 +1,5 @@ ;;; checkers/spell/autoload/+spell-fu.el -*- lexical-binding: t; -*- -;;;###if (not (featurep! +flyspell)) +;;;###if (not (modulep! +flyspell)) (defun +spell--correct (replace poss word orig-pt start end) (cond ((eq replace 'ignore) @@ -61,9 +61,9 @@ (ispell-set-spellchecker-params) (save-current-buffer (ispell-accept-buffer-local-defs)) - (if (not (or (featurep! :completion ivy) - (featurep! :completion helm) - (featurep! :completion vertico))) + (if (not (or (modulep! :completion ivy) + (modulep! :completion helm) + (modulep! :completion vertico))) (call-interactively #'ispell-word) (cl-destructuring-bind (start . end) (or (bounds-of-thing-at-point 'word) diff --git a/modules/checkers/spell/config.el b/modules/checkers/spell/config.el index 386ccf011..1a9444f57 100644 --- a/modules/checkers/spell/config.el +++ b/modules/checkers/spell/config.el @@ -21,9 +21,9 @@ ;; if their binary is found. ;; If one of the flags `+aspell', `+hunspell' or `+enchant' is given, ;; only enable that spell checker. - (pcase (cond ((featurep! +aspell) 'aspell) - ((featurep! +hunspell) 'hunspell) - ((featurep! +enchant) 'enchant) + (pcase (cond ((modulep! +aspell) 'aspell) + ((modulep! +hunspell) 'hunspell) + ((modulep! +enchant) 'enchant) ((executable-find "aspell") 'aspell) ((executable-find "hunspell") 'hunspell) ((executable-find "enchant-2") 'enchant)) @@ -66,7 +66,7 @@ ;; ;;; Implementations -(eval-if! (not (featurep! +flyspell)) +(eval-if! (not (modulep! +flyspell)) (use-package! spell-fu :when (executable-find "aspell") @@ -74,9 +74,9 @@ :general ([remap ispell-word] #'+spell/correct) :preface (defvar +spell-correct-interface - (cond ((featurep! :completion ivy) + (cond ((modulep! :completion ivy) #'+spell-correct-ivy-fn) - ((featurep! :completion helm) + ((modulep! :completion helm) #'+spell-correct-helm-fn) (#'+spell-correct-generic-fn)) "Function to use to display corrections.") @@ -129,7 +129,7 @@ "Faces in certain major modes that spell-fu will not spellcheck.") (setq spell-fu-directory (concat doom-etc-dir "spell-fu")) - (when (featurep! +everywhere) + (when (modulep! +everywhere) (add-hook! '(yaml-mode-hook conf-mode-hook prog-mode-hook) @@ -184,7 +184,7 @@ directory first)." git-commit-mode-hook) #'flyspell-mode) - (when (featurep! +everywhere) + (when (modulep! +everywhere) (add-hook! '(yaml-mode-hook conf-mode-hook prog-mode-hook) @@ -228,11 +228,11 @@ e.g. proselint and langtool." :commands flyspell-correct-previous :general ([remap ispell-word] #'flyspell-correct-at-point) :config - (cond ((and (featurep! :completion helm) + (cond ((and (modulep! :completion helm) (require 'flyspell-correct-helm nil t))) - ((and (featurep! :completion ivy) + ((and (modulep! :completion ivy) (require 'flyspell-correct-ivy nil t))) - ((featurep! :completion vertico)) ; vertico doesn't need any extra configuration + ((modulep! :completion vertico)) ; vertico doesn't need any extra configuration ((require 'flyspell-correct-popup nil t) ; only use popup if no compatible completion UI is enabled (setq flyspell-popup-correct-delay 0.8) (define-key popup-menu-keymap [escape] #'keyboard-quit)))) diff --git a/modules/checkers/spell/doctor.el b/modules/checkers/spell/doctor.el index b24824ebb..f74f7dca2 100644 --- a/modules/checkers/spell/doctor.el +++ b/modules/checkers/spell/doctor.el @@ -1,10 +1,10 @@ ;;; checkers/spell/doctor.el -*- lexical-binding: t; -*- -(when (or (not (featurep! +flyspell)) - (featurep! +aspell)) +(when (or (not (modulep! +flyspell)) + (modulep! +aspell)) (unless (executable-find "aspell") (warn! "Couldn't find aspell executable; spell checker will not work"))) -(when (featurep! +hunspell) +(when (modulep! +hunspell) (unless (executable-find "hunspell") (warn! "Couldn't find hunspell executable; spell checker will not work"))) diff --git a/modules/checkers/spell/packages.el b/modules/checkers/spell/packages.el index 2bf4090c2..fd99c0ffa 100644 --- a/modules/checkers/spell/packages.el +++ b/modules/checkers/spell/packages.el @@ -1,13 +1,13 @@ ;; -*- no-byte-compile: t; -*- ;;; checkers/spell/packages.el -(if (not (featurep! +flyspell)) +(if (not (modulep! +flyspell)) (package! spell-fu :pin "8185467b24f05bceb428a0e9909651ec083cc54e") (package! flyspell-correct :pin "e9fde6f93af991b0528d6ed47d44bed470dc70af") - (cond ((featurep! :completion ivy) + (cond ((modulep! :completion ivy) (package! flyspell-correct-ivy)) - ((featurep! :completion helm) + ((modulep! :completion helm) (package! flyspell-correct-helm)) - ((not (featurep! :completion vertico)) + ((not (modulep! :completion vertico)) (package! flyspell-correct-popup))) (package! flyspell-lazy :pin "0fc5996bcee20b46cbd227ae948d343c3bef7339")) diff --git a/modules/checkers/syntax/config.el b/modules/checkers/syntax/config.el index e535ab226..f3503f5a8 100644 --- a/modules/checkers/syntax/config.el +++ b/modules/checkers/syntax/config.el @@ -62,7 +62,7 @@ (use-package! flycheck-posframe - :when (featurep! +childframe) + :when (modulep! +childframe) :hook (flycheck-mode . +syntax-init-popups-h) :config (setq flycheck-posframe-warning-prefix "! " diff --git a/modules/checkers/syntax/packages.el b/modules/checkers/syntax/packages.el index c75a3066e..ef318dd62 100644 --- a/modules/checkers/syntax/packages.el +++ b/modules/checkers/syntax/packages.el @@ -3,7 +3,7 @@ (package! flycheck :pin "784f184cdd9f9cb4e3dbb997c09d93e954142842") (package! flycheck-popup-tip :pin "ef86aad907f27ca076859d8d9416f4f7727619c6") -(when (featurep! +childframe) +(when (modulep! +childframe) (package! flycheck-posframe :pin "8f60c9bf124ab9597d681504a73fdf116a0bde12")) ;; TODO flymake? diff --git a/modules/completion/company/config.el b/modules/completion/company/config.el index 64a25ae3b..d816ec99f 100644 --- a/modules/completion/company/config.el +++ b/modules/completion/company/config.el @@ -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 diff --git a/modules/completion/company/packages.el b/modules/completion/company/packages.el index 0d4788989..a085087e0 100644 --- a/modules/completion/company/packages.el +++ b/modules/completion/company/packages.el @@ -3,5 +3,5 @@ (package! company :pin "1005540b1cdf176cbcf893b2fa83d2075cbbe3ca") (package! company-dict :pin "cd7b8394f6014c57897f65d335d6b2bd65dab1f4") -(when (featurep! +childframe) +(when (modulep! +childframe) (package! company-box :pin "f9cbbc7df8efbb56a8d31a5b422d158660d9109e")) diff --git a/modules/completion/helm/autoload/evil.el b/modules/completion/helm/autoload/evil.el index fbcf0a9db..a7f75642f 100644 --- a/modules/completion/helm/autoload/evil.el +++ b/modules/completion/helm/autoload/evil.el @@ -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) diff --git a/modules/completion/helm/autoload/helm.el b/modules/completion/helm/autoload/helm.el index c7bfe982d..86aba5890 100644 --- a/modules/completion/helm/autoload/helm.el +++ b/modules/completion/helm/autoload/helm.el @@ -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)))) diff --git a/modules/completion/helm/config.el b/modules/completion/helm/config.el index cf15e3da0..c330d7f91 100644 --- a/modules/completion/helm/config.el +++ b/modules/completion/helm/config.el @@ -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 diff --git a/modules/completion/helm/packages.el b/modules/completion/helm/packages.el index 3f45dac0a..c6fdb9df0 100644 --- a/modules/completion/helm/packages.el +++ b/modules/completion/helm/packages.el @@ -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") diff --git a/modules/completion/ivy/autoload/evil.el b/modules/completion/ivy/autoload/evil.el index 8a8125536..8e1c3d8c7 100644 --- a/modules/completion/ivy/autoload/evil.el +++ b/modules/completion/ivy/autoload/evil.el @@ -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) diff --git a/modules/completion/ivy/autoload/hydras.el b/modules/completion/ivy/autoload/hydras.el index b879c23ad..368640753 100644 --- a/modules/completion/ivy/autoload/hydras.el +++ b/modules/completion/ivy/autoload/hydras.el @@ -1,5 +1,5 @@ ;;; completion/ivy/autoload/hydras.el -*- lexical-binding: t; -*- -;;;###if (featurep! :ui hydra) +;;;###if (modulep! :ui hydra) ;;;###autoload (after! ivy-hydra diff --git a/modules/completion/ivy/autoload/ivy.el b/modules/completion/ivy/autoload/ivy.el index 12308e830..78e793c64 100644 --- a/modules/completion/ivy/autoload/ivy.el +++ b/modules/completion/ivy/autoload/ivy.el @@ -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 "|") "\\\\\\\\|") diff --git a/modules/completion/ivy/autoload/posframe.el b/modules/completion/ivy/autoload/posframe.el index eb080af5e..c5e77ca2c 100644 --- a/modules/completion/ivy/autoload/posframe.el +++ b/modules/completion/ivy/autoload/posframe.el @@ -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) diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index 0fc016eea..642740793 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -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 diff --git a/modules/completion/ivy/packages.el b/modules/completion/ivy/packages.el index c357d2ce9..50365b266 100644 --- a/modules/completion/ivy/packages.el +++ b/modules/completion/ivy/packages.el @@ -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")) diff --git a/modules/completion/vertico/autoload/evil.el b/modules/completion/vertico/autoload/evil.el index 85e10ce03..5bf1e6aa8 100644 --- a/modules/completion/vertico/autoload/evil.el +++ b/modules/completion/vertico/autoload/evil.el @@ -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) diff --git a/modules/completion/vertico/autoload/magit.el b/modules/completion/vertico/autoload/magit.el index f3cbc9dc5..a7158bc29 100644 --- a/modules/completion/vertico/autoload/magit.el +++ b/modules/completion/vertico/autoload/magit.el @@ -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) diff --git a/modules/completion/vertico/autoload/workspaces.el b/modules/completion/vertico/autoload/workspaces.el index b4646153c..fcf63506d 100644 --- a/modules/completion/vertico/autoload/workspaces.el +++ b/modules/completion/vertico/autoload/workspaces.el @@ -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 diff --git a/modules/completion/vertico/config.el b/modules/completion/vertico/config.el index e72db3bb6..2ff4f9fdf 100644 --- a/modules/completion/vertico/config.el +++ b/modules/completion/vertico/config.el @@ -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)) diff --git a/modules/completion/vertico/packages.el b/modules/completion/vertico/packages.el index e2111e6cc..44022d19d 100644 --- a/modules/completion/vertico/packages.el +++ b/modules/completion/vertico/packages.el @@ -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")) diff --git a/modules/config/default/+emacs-bindings.el b/modules/config/default/+emacs-bindings.el index a7f6e0968..15c4789a6 100644 --- a/modules/config/default/+emacs-bindings.el +++ b/modules/config/default/+emacs-bindings.el @@ -41,36 +41,36 @@ :desc "Delete trailing whitespace" "w" #'delete-trailing-whitespace :desc "Delete trailing newlines" "W" #'doom/delete-trailing-newlines :desc "List errors" "x" #'+default/diagnostics - (:when (and (featurep! :tools lsp) (not (featurep! :tools lsp +eglot))) + (:when (and (modulep! :tools lsp) (not (modulep! :tools lsp +eglot))) :desc "LSP Code actions" "a" #'lsp-execute-code-action :desc "LSP Organize imports" "o" #'lsp-organize-imports :desc "LSP Rename" "r" #'lsp-rename :desc "LSP" "l" #'+default/lsp-command-map - (:when (featurep! :completion ivy) + (:when (modulep! :completion ivy) :desc "Jump to symbol in current workspace" "j" #'lsp-ivy-workspace-symbol :desc "Jump to symbol in any workspace" "J" #'lsp-ivy-global-workspace-symbol) - (:when (featurep! :completion helm) + (:when (modulep! :completion helm) :desc "Jump to symbol in current workspace" "j" #'helm-lsp-workspace-symbol :desc "Jump to symbol in any workspace" "J" #'helm-lsp-global-workspace-symbol) - (:when (featurep! :completion vertico) + (:when (modulep! :completion vertico) :desc "Jump to symbol in current workspace" "j" #'consult-lsp-symbols :desc "Jump to symbol in any workspace" "J" (cmd!! #'consult-lsp-symbols 'all-workspaces)) - (:when (featurep! :ui treemacs +lsp) + (:when (modulep! :ui treemacs +lsp) :desc "Errors list" "X" #'lsp-treemacs-errors-list :desc "Incoming call hierarchy" "y" #'lsp-treemacs-call-hierarchy :desc "Outgoing call hierarchy" "Y" (cmd!! #'lsp-treemacs-call-hierarchy t) :desc "References tree" "R" (cmd!! #'lsp-treemacs-references t) :desc "Symbols" "S" #'lsp-treemacs-symbols)) - (:when (featurep! :tools lsp +eglot) + (:when (modulep! :tools lsp +eglot) :desc "LSP Execute code action" "a" #'eglot-code-actions :desc "LSP Rename" "r" #'eglot-rename :desc "LSP Find declaration" "j" #'eglot-find-declaration - (:when (featurep! :completion vertico) + (:when (modulep! :completion vertico) :desc "Jump to symbol in current workspace" "j" #'consult-eglot-symbols))) ;;; f --- file (:prefix-map ("f" . "file") - (:when (featurep! :tools editorconfig) + (:when (modulep! :tools editorconfig) :desc "Open project editorconfig" "c" #'editorconfig-find-current-editorconfig) :desc "Copy this file" "C" #'doom/copy-this-file :desc "Find directory" "d" #'dired @@ -93,7 +93,7 @@ :desc "Switch to scratch buffer" "X" #'doom/switch-to-scratch-buffer) ;;; r --- remote - (:when (featurep! :tools upload) + (:when (modulep! :tools upload) (:prefix-map ("r" . "remote") :desc "Browse remote" "b" #'ssh-deploy-browse-remote-base-handler :desc "Browse relative" "B" #'ssh-deploy-browse-remote-handler @@ -114,13 +114,13 @@ (:prefix-map ("s" . "search") :desc "Search project for symbol" "." #'+default/search-project-for-symbol-at-point :desc "Search buffer" "b" - (cond ((featurep! :completion vertico) #'consult-line) - ((featurep! :completion ivy) #'swiper) - ((featurep! :completion helm) #'swiper)) + (cond ((modulep! :completion vertico) #'consult-line) + ((modulep! :completion ivy) #'swiper) + ((modulep! :completion helm) #'swiper)) :desc "Search all open buffers" "B" - (cond ((featurep! :completion vertico) (cmd!! #'consult-line-multi 'all-buffers)) - ((featurep! :completion ivy) #'swiper-all) - ((featurep! :completion helm) #'swiper-all)) + (cond ((modulep! :completion vertico) (cmd!! #'consult-line-multi 'all-buffers)) + ((modulep! :completion ivy) #'swiper-all) + ((modulep! :completion helm) #'swiper-all)) :desc "Search current directory" "d" #'+default/search-cwd :desc "Search other directory" "D" #'+default/search-other-cwd :desc "Search .emacs.d" "e" #'+default/search-emacsd @@ -137,9 +137,9 @@ :desc "Search other project" "P" #'+default/search-other-project :desc "Search buffer" "s" #'+default/search-buffer :desc "Search buffer for thing at point" "S" - (cond ((featurep! :completion vertico) #'+vertico/search-symbol-at-point) - ((featurep! :completion ivy) #'swiper-isearch-thing-at-point) - ((featurep! :completion helm) #'swiper-isearch-thing-at-point)) + (cond ((modulep! :completion vertico) #'+vertico/search-symbol-at-point) + ((modulep! :completion ivy) #'swiper-isearch-thing-at-point) + ((modulep! :completion helm) #'swiper-isearch-thing-at-point)) :desc "Dictionary" "t" #'+lookup/dictionary-definition :desc "Thesaurus" "T" #'+lookup/synonyms) @@ -156,16 +156,16 @@ (:prefix-map ("n" . "notes") :desc "Search notes for symbol" "." #'+default/search-notes-for-symbol-at-point :desc "Org agenda" "a" #'org-agenda - (:when (featurep! :tools biblio) + (:when (modulep! :tools biblio) :desc "Bibliographic entries" "b" - (cond ((featurep! :completion vertico) #'citar-open-entry) - ((featurep! :completion ivy) #'ivy-bibtex) - ((featurep! :completion helm) #'helm-bibtex))) + (cond ((modulep! :completion vertico) #'citar-open-entry) + ((modulep! :completion ivy) #'ivy-bibtex) + ((modulep! :completion helm) #'helm-bibtex))) :desc "Toggle last org-clock" "c" #'+org/toggle-last-clock :desc "Cancel current org-clock" "C" #'org-clock-cancel :desc "Open deft" "d" #'deft - (:when (featurep! :lang org +noter) + (:when (modulep! :lang org +noter) :desc "Org noter" "e" #'org-noter) :desc "Find file in notes" "f" #'+default/find-in-notes @@ -181,12 +181,12 @@ :desc "View search" "v" #'org-search-view :desc "Org export to clipboard" "y" #'+org/export-to-clipboard :desc "Org export to clipboard as RTF" "Y" #'+org/export-to-clipboard-as-rich-text - (:when (featurep! :lang org +journal) + (:when (modulep! :lang org +journal) (:prefix ("j" . "journal") :desc "New Entry" "j" #'org-journal-new-entry :desc "New Scheduled Entry" "J" #'org-journal-new-scheduled-entry :desc "Search Forever" "s" #'org-journal-search-forever)) - (:when (featurep! :lang org +roam) + (:when (modulep! :lang org +roam) (:prefix ("r" . "roam") :desc "Switch to buffer" "b" #'org-roam-switch-to-buffer :desc "Org Roam Capture" "c" #'org-roam-capture @@ -202,7 +202,7 @@ :desc "Today" "t" #'org-roam-dailies-find-today :desc "Tomorrow" "m" #'org-roam-dailies-find-tomorrow :desc "Yesterday" "y" #'org-roam-dailies-find-yesterday))) - (:when (featurep! :lang org +roam2) + (:when (modulep! :lang org +roam2) (:prefix ("r" . "roam") :desc "Open random node" "a" #'org-roam-node-random :desc "Find node" "f" #'org-roam-node-find @@ -236,25 +236,25 @@ :desc "REPL" "r" #'+eval/open-repl-other-window :desc "REPL (same window)" "R" #'+eval/open-repl-same-window :desc "Dired" "-" #'dired-jump - (:when (featurep! :ui neotree) + (:when (modulep! :ui neotree) :desc "Project sidebar" "p" #'+neotree/open :desc "Find file in project sidebar" "P" #'+neotree/find-this-file) - (:when (featurep! :ui treemacs) + (:when (modulep! :ui treemacs) :desc "Project sidebar" "p" #'+treemacs/toggle :desc "Find file in project rsidebar" "P" #'treemacs-find-file) - (:when (featurep! :term shell) + (:when (modulep! :term shell) :desc "Toggle shell popup" "t" #'+shell/toggle :desc "Open shell here" "T" #'+shell/here) - (:when (featurep! :term term) + (:when (modulep! :term term) :desc "Toggle terminal popup" "t" #'+term/toggle :desc "Open terminal here" "T" #'+term/here) - (:when (featurep! :term vterm) + (:when (modulep! :term vterm) :desc "Toggle vterm popup" "t" #'+vterm/toggle :desc "Open vterm here" "T" #'+vterm/here) - (:when (featurep! :term eshell) + (:when (modulep! :term eshell) :desc "Toggle eshell popup" "e" #'+eshell/toggle :desc "Open eshell here" "E" #'+eshell/here) - (:when (featurep! :os macos) + (:when (modulep! :os macos) :desc "Reveal in Finder" "o" #'+macos/reveal-in-finder :desc "Reveal project in Finder" "O" #'+macos/reveal-project-in-finder :desc "Send to Transmit" "u" #'+macos/send-to-transmit @@ -263,13 +263,13 @@ :desc "Send project to Launchbar" "L" #'+macos/send-project-to-launchbar :desc "Open in iTerm" "i" #'+macos/open-in-iterm :desc "Open in new iTerm window" "I" #'+macos/open-in-iterm-new-window) - (:when (featurep! :tools docker) + (:when (modulep! :tools docker) :desc "Docker" "D" #'docker) - (:when (featurep! :email mu4e) + (:when (modulep! :email mu4e) :desc "mu4e" "m" #'=mu4e) - (:when (featurep! :email notmuch) + (:when (modulep! :email notmuch) :desc "notmuch" "m" #'=notmuch) - (:when (featurep! :email wanderlust) + (:when (modulep! :email wanderlust) :desc "wanderlust" "m" #'=wanderlust)) @@ -281,9 +281,9 @@ :desc "List project todos" "t" #'magit-todos-list :desc "Open project scratch buffer" "x" #'doom/open-project-scratch-buffer :desc "Switch to project scratch buffer" "X" #'doom/switch-to-project-scratch-buffer - (:when (and (featurep! :tools taskrunner) - (or (featurep! :completion ivy) - (featurep! :completion helm))) + (:when (and (modulep! :tools taskrunner) + (or (modulep! :completion ivy) + (modulep! :completion helm))) :desc "List project tasks" "z" #'+taskrunner/project-tasks) ;; later expanded by projectile (:prefix ("4" . "in other window")) @@ -322,24 +322,24 @@ :desc "Indent style" "I" #'doom/toggle-indent-style :desc "Line numbers" "l" #'doom/toggle-line-numbers :desc "Soft line wrapping" "w" #'visual-line-mode - (:when (featurep! :editor word-wrap) + (:when (modulep! :editor word-wrap) :desc "Soft line wrapping" "w" #'+word-wrap-mode) - (:when (featurep! :checkers syntax) + (:when (modulep! :checkers syntax) :desc "Flycheck" "f" #'flycheck-mode) - (:when (featurep! :ui indent-guides) + (:when (modulep! :ui indent-guides) :desc "Indent guides" "i" #'highlight-indent-guides-mode) - (:when (featurep! :ui minimap) + (:when (modulep! :ui minimap) :desc "Minimap mode" "m" #'minimap-mode) - (:when (featurep! :lang org +present) + (:when (modulep! :lang org +present) :desc "org-tree-slide mode" "p" #'org-tree-slide-mode) :desc "Read-only mode" "r" #'read-only-mode - (:when (and (featurep! :checkers spell) (not (featurep! :checkers spell +flyspell))) + (:when (and (modulep! :checkers spell) (not (modulep! :checkers spell +flyspell))) :desc "Spell checker" "s" #'spell-fu-mode) - (:when (featurep! :checkers spell +flyspell) + (:when (modulep! :checkers spell +flyspell) :desc "Spell checker" "s" #'flyspell-mode) - (:when (featurep! :lang org +pomodoro) + (:when (modulep! :lang org +pomodoro) :desc "Pomodoro timer" "t" #'org-pomodoro) - (:when (featurep! :ui zen) + (:when (modulep! :ui zen) :desc "Zen mode" "z" #'+zen/toggle :desc "Zen mode (fullscreen)" "Z" #'+zen/toggle-fullscreen)) @@ -348,13 +348,13 @@ :desc "Git revert file" "R" #'vc-revert :desc "Kill link to remote" "y" #'+vc/browse-at-remote-kill :desc "Kill link to homepage" "Y" #'+vc/browse-at-remote-kill-homepage - (:when (featurep! :ui vc-gutter) + (:when (modulep! :ui vc-gutter) :desc "Git revert hunk" "r" #'+vc-gutter/revert-hunk :desc "Git stage hunk" "s" #'+vc-gutter/stage-hunk :desc "Git time machine" "t" #'git-timemachine-toggle :desc "Jump to next hunk" "n" #'+vc-gutter/next-hunk :desc "Jump to previous hunk" "p" #'+vc-gutter/previous-hunk) - (:when (featurep! :tools magit) + (:when (modulep! :tools magit) :desc "Magit dispatch" "/" #'magit-dispatch :desc "Magit file dispatch" "." #'magit-file-dispatch :desc "Forge dispatch" "'" #'forge-dispatch @@ -383,7 +383,7 @@ :desc "Browse issues" "I" #'forge-browse-issues :desc "Browse pull requests" "P" #'forge-browse-pullreqs) (:prefix ("l" . "list") - (:when (featurep! :tools gist) + (:when (modulep! :tools gist) :desc "List gists" "g" #'gist-list) :desc "List repositories" "r" #'magit-list-repositories :desc "List submodules" "s" #'magit-list-submodules @@ -400,7 +400,7 @@ ;;; w --- workspaces/windows (:prefix-map ("w" . "workspaces/windows") - (:when (featurep! :ui workspaces) + (:when (modulep! :ui workspaces) :desc "Display workspaces" "d" #'+workspace/display :desc "Rename workspace" "r" #'+workspace/rename :desc "Create workspace" "c" #'+workspace/new @@ -429,7 +429,7 @@ :desc "Redo window config" "U" #'winner-redo) ;;; m --- multiple cursors - (:when (featurep! :editor multiple-cursors) + (:when (modulep! :editor multiple-cursors) (:prefix-map ("m" . "multiple-cursors") :desc "Edit lines" "l" #'mc/edit-lines :desc "Mark next" "n" #'mc/mark-next-like-this @@ -446,26 +446,26 @@ ;; APPs ;;; M --- mu4e - (:when (featurep! :email mu4e) + (:when (modulep! :email mu4e) (:prefix-map ("M" . "mu4e") :desc "Open email app" "M" #'=mu4e :desc "Compose email" "c" #'+mu4e/compose)) ;;; I --- IRC - (:when (featurep! :app irc) + (:when (modulep! :app irc) (:prefix-map ("I" . "irc") :desc "Open irc app" "I" #'=irc :desc "Next unread buffer" "a" #'tracking-next-buffer :desc "Quit irc" "q" #'+irc/quit :desc "Reconnect all" "r" #'circe-reconnect-all :desc "Send message" "s" #'+irc/send-message - (:when (featurep! :completion ivy) + (:when (modulep! :completion ivy) :desc "Jump to channel" "j" #'+irc/ivy-jump-to-channel) - (:when (featurep! :completion vertico) + (:when (modulep! :completion vertico) :desc "Jump to channel" "j" #'+irc/vertico-jump-to-channel))) ;;; T --- twitter - (:when (featurep! :app twitter) + (:when (modulep! :app twitter) (:prefix-map ("T" . "twitter") :desc "Open twitter app" "T" #'=twitter :desc "Quit twitter" "q" #'+twitter/quit @@ -479,27 +479,27 @@ (map! "C-'" #'imenu ;;; search - (:when (featurep! :completion ivy) + (:when (modulep! :completion ivy) "C-S-s" #'swiper "C-S-r" #'ivy-resume) - (:when (featurep! :completion helm) + (:when (modulep! :completion helm) "C-S-s" #'swiper-helm "C-S-r" #'helm-resume) - (:when (featurep! :completion vertico) + (:when (modulep! :completion vertico) "C-S-r" #'vertico-repeat) ;;; objed - (:when (featurep! :editor objed +manual) + (:when (modulep! :editor objed +manual) "M-SPC" #'objed-activate) ;;; buffer management "C-x b" #'switch-to-buffer "C-x 4 b" #'switch-to-buffer-other-window - (:when (featurep! :ui workspaces) + (:when (modulep! :ui workspaces) "C-x b" #'persp-switch-to-buffer "C-x B" #'switch-to-buffer "C-x 4 B" #'switch-to-buffer-other-window - (:when (featurep! :completion ivy) + (:when (modulep! :completion ivy) "C-x 4 b" #'+ivy/switch-workspace-buffer-other-window)) "C-x C-b" #'ibuffer "C-x K" #'doom/kill-this-buffer-in-all-windows @@ -518,12 +518,12 @@ [C-tab] #'company-complete-common-or-cycle [tab] #'company-complete-common-or-cycle [backtab] #'company-select-previous - "C-RET" (cond ((featurep! :completion vertico) #'completion-at-point) - ((featurep! :completion ivy) #'counsel-company) - ((featurep! :completion helm) #'helm-company)) - "C-" (cond ((featurep! :completion vertico) #'completion-at-point) - ((featurep! :completion ivy) #'counsel-company) - ((featurep! :completion helm) #'helm-company)) + "C-RET" (cond ((modulep! :completion vertico) #'completion-at-point) + ((modulep! :completion ivy) #'counsel-company) + ((modulep! :completion helm) #'helm-company)) + "C-" (cond ((modulep! :completion vertico) #'completion-at-point) + ((modulep! :completion ivy) #'counsel-company) + ((modulep! :completion helm) #'helm-company)) :map company-search-map "C-n" #'company-search-repeat-forward "C-p" #'company-search-repeat-backward @@ -565,7 +565,7 @@ "o" #'link-hint-open-link) ;;; ivy & counsel - (:when (featurep! :completion ivy) + (:when (modulep! :completion ivy) (:after ivy :map ivy-minibuffer-map "TAB" #'ivy-alt-done @@ -577,7 +577,7 @@ "C-M-y" #'counsel-yank-pop) ;;; neotree - (:when (featurep! :ui neotree) + (:when (modulep! :ui neotree) "" #'+neotree/open "" #'+neotree/find-this-file (:after neotree @@ -600,7 +600,7 @@ "P" #'neotree-select-previous-sibling-node)) ;;; popups - (:when (featurep! :ui popup) + (:when (modulep! :ui popup) "C-x p" #'+popup/other "C-`" #'+popup/toggle "C-~" #'+popup/raise) @@ -621,12 +621,12 @@ "C-M-" #'sp-splice-sexp) ;;; treemacs - (:when (featurep! :ui treemacs) + (:when (modulep! :ui treemacs) "" #'+treemacs/toggle "" #'treemacs-find-file)) (map! :leader - (:when (featurep! :editor fold) + (:when (modulep! :editor fold) (:prefix ("C-f" . "fold") "C-d" #'vimish-fold-delete "C-a C-d" #'vimish-fold-delete-all diff --git a/modules/config/default/+emacs.el b/modules/config/default/+emacs.el index 5510fda65..a68711bb2 100644 --- a/modules/config/default/+emacs.el +++ b/modules/config/default/+emacs.el @@ -22,5 +22,5 @@ ;; ;;; Keybinds -(when (featurep! +bindings) +(when (modulep! +bindings) (load! "+emacs-bindings")) diff --git a/modules/config/default/+evil-bindings.el b/modules/config/default/+evil-bindings.el index 7cc3f7fb3..7a34fd63c 100644 --- a/modules/config/default/+evil-bindings.el +++ b/modules/config/default/+evil-bindings.el @@ -1,6 +1,6 @@ ;;; config/default/+bindings.el -*- lexical-binding: t; -*- -(when (featurep! :editor evil +everywhere) +(when (modulep! :editor evil +everywhere) ;; NOTE SPC u replaces C-u as the universal argument. ;; Minibuffer @@ -38,18 +38,18 @@ ;;; Global keybindings ;; Smart tab, these will only work in GUI Emacs -(map! :i [tab] (cmds! (and (featurep! :editor snippets) +(map! :i [tab] (cmds! (and (modulep! :editor snippets) (yas-maybe-expand-abbrev-key-filter 'yas-expand)) #'yas-expand (and (bound-and-true-p company-mode) - (featurep! :completion company +tng)) + (modulep! :completion company +tng)) #'company-indent-or-complete-common) - :m [tab] (cmds! (and (featurep! :editor snippets) + :m [tab] (cmds! (and (modulep! :editor snippets) (evil-visual-state-p) (or (eq evil-visual-selection 'line) (not (memq (char-after) (list ?\( ?\[ ?\{ ?\} ?\] ?\)))))) #'yas-insert-snippet - (and (featurep! :editor fold) + (and (modulep! :editor fold) (save-excursion (end-of-line) (invisible-p (point)))) #'+fold/toggle ;; Fixes #4548: without this, this tab keybind overrides @@ -86,12 +86,12 @@ (:after geiser-doc :map geiser-doc-mode-map :n "o" #'link-hint-open-link) - (:unless (featurep! :input layout +bepo) + (:unless (modulep! :input layout +bepo) (:after (evil-org evil-easymotion) :map evil-org-mode-map :m "gsh" #'+org/goto-visible)) - (:when (featurep! :editor multiple-cursors) + (:when (modulep! :editor multiple-cursors) :prefix "gz" :nv "d" #'evil-mc-make-and-goto-next-match :nv "D" #'evil-mc-make-and-goto-prev-match @@ -128,7 +128,7 @@ ;;; Module keybinds ;;; :completion -(map! (:when (featurep! :completion company) +(map! (:when (modulep! :completion company) :i "C-@" (cmds! (not (minibufferp)) #'company-complete-common) :i "C-SPC" (cmds! (not (minibufferp)) #'company-complete-common) (:after company @@ -142,9 +142,9 @@ "C-u" #'company-previous-page "C-d" #'company-next-page "C-s" #'company-filter-candidates - "C-S-s" (cond ((featurep! :completion vertico) #'completion-at-point) - ((featurep! :completion ivy) #'counsel-company) - ((featurep! :completion helm) #'helm-company)) + "C-S-s" (cond ((modulep! :completion vertico) #'completion-at-point) + ((modulep! :completion ivy) #'counsel-company) + ((modulep! :completion helm) #'helm-company)) "C-SPC" #'company-complete-common "TAB" #'company-complete-common-or-cycle [tab] #'company-complete-common-or-cycle @@ -158,7 +158,7 @@ "C-s" #'company-filter-candidates [escape] #'company-search-abort))) - (:when (featurep! :completion ivy) + (:when (modulep! :completion ivy) (:after ivy :map ivy-minibuffer-map "C-SPC" #'ivy-call-and-recenter ; preview file @@ -170,7 +170,7 @@ "C-l" #'ivy-done [C-return] #'+ivy/git-grep-other-window-action)) - (:when (featurep! :completion helm) + (:when (modulep! :completion helm) (:after helm :map helm-map [remap next-line] #'helm-next-line [remap previous-line] #'helm-previous-line @@ -179,7 +179,7 @@ "C-S-f" #'helm-previous-page "C-S-n" #'helm-next-source "C-S-p" #'helm-previous-source - (:when (featurep! :editor evil +everywhere) + (:when (modulep! :editor evil +everywhere) "C-j" #'helm-next-line "C-k" #'helm-previous-line "C-S-j" #'helm-next-source @@ -207,7 +207,7 @@ (:after helm-grep :map helm-grep-map [C-return] #'helm-grep-run-other-window-action)) - (:when (featurep! :completion vertico) + (:when (modulep! :completion vertico) (:after vertico :map vertico-map "M-RET" #'vertico-exit-input @@ -219,12 +219,12 @@ ;;; :ui -(map! (:when (featurep! :ui popup) +(map! (:when (modulep! :ui popup) "C-`" #'+popup/toggle "C-~" #'+popup/raise "C-x p" #'+popup/other) - (:when (featurep! :ui workspaces) + (:when (modulep! :ui workspaces) :n "C-t" #'+workspace/new :n "C-S-t" #'+workspace/display :g "M-1" #'+workspace/switch-to-0 @@ -252,14 +252,14 @@ :n "s-0" #'+workspace/switch-to-final))) ;;; :editor -(map! (:when (featurep! :editor format) +(map! (:when (modulep! :editor format) :n "gQ" #'+format:region) - (:when (featurep! :editor rotate-text) + (:when (modulep! :editor rotate-text) :n "]r" #'rotate-text :n "[r" #'rotate-text-backward) - (:when (featurep! :editor multiple-cursors) + (:when (modulep! :editor multiple-cursors) ;; evil-multiedit :v "R" #'evil-multiedit-match-all :n "M-d" #'evil-multiedit-match-symbol-and-next @@ -273,13 +273,13 @@ :nv "M-D" #'evil-multiedit-match-and-prev [return] #'evil-multiedit-toggle-or-restrict-region))) - (:when (featurep! :editor snippets) + (:when (modulep! :editor snippets) ;; auto-yasnippet :i [C-tab] #'aya-expand :nv [C-tab] #'aya-create)) ;;; :tools -(when (featurep! :tools eval) +(when (modulep! :tools eval) (map! "M-r" #'+eval/buffer)) @@ -296,18 +296,18 @@ :desc "window" "w" evil-window-map :desc "help" "h" help-map - (:when (featurep! :ui popup) + (:when (modulep! :ui popup) :desc "Toggle last popup" "~" #'+popup/toggle) :desc "Find file" "." #'find-file :desc "Switch buffer" "," #'switch-to-buffer - (:when (featurep! :ui workspaces) + (:when (modulep! :ui workspaces) :desc "Switch workspace buffer" "," #'persp-switch-to-buffer :desc "Switch buffer" "<" #'switch-to-buffer) :desc "Switch to last buffer" "`" #'evil-switch-to-windows-last-buffer :desc "Resume last search" "'" - (cond ((featurep! :completion vertico) #'vertico-repeat) - ((featurep! :completion ivy) #'ivy-resume) - ((featurep! :completion helm) #'helm-resume)) + (cond ((modulep! :completion vertico) #'vertico-repeat) + ((modulep! :completion ivy) #'ivy-resume) + ((modulep! :completion helm) #'helm-resume)) :desc "Search for symbol in project" "*" #'+default/search-project-for-symbol-at-point :desc "Search project" "/" #'+default/search-project @@ -316,7 +316,7 @@ :desc "Jump to bookmark" "RET" #'bookmark-jump ;;; TAB --- workspace - (:when (featurep! :ui workspaces) + (:when (modulep! :ui workspaces) (:prefix-map ("TAB" . "workspace") :desc "Display tab bar" "TAB" #'+workspace/display :desc "Switch workspace" "." #'+workspace/switch-to @@ -347,11 +347,11 @@ :desc "Toggle narrowing" "-" #'doom/toggle-narrow-buffer :desc "Previous buffer" "[" #'previous-buffer :desc "Next buffer" "]" #'next-buffer - (:when (featurep! :ui workspaces) + (:when (modulep! :ui workspaces) :desc "Switch workspace buffer" "b" #'persp-switch-to-buffer :desc "Switch buffer" "B" #'switch-to-buffer :desc "ibuffer workspace" "I" #'+ibuffer/open-for-current-workspace) - (:unless (featurep! :ui workspaces) + (:unless (modulep! :ui workspaces) :desc "Switch buffer" "b" #'switch-to-buffer) :desc "Clone buffer" "c" #'clone-indirect-buffer :desc "Clone buffer other window" "C" #'clone-indirect-buffer-other-window @@ -379,19 +379,19 @@ ;;; c --- code (:prefix-map ("c" . "code") - (:when (and (featurep! :tools lsp) (not (featurep! :tools lsp +eglot))) + (:when (and (modulep! :tools lsp) (not (modulep! :tools lsp +eglot))) :desc "LSP Execute code action" "a" #'lsp-execute-code-action :desc "LSP Organize imports" "o" #'lsp-organize-imports - (:when (featurep! :completion ivy) + (:when (modulep! :completion ivy) :desc "Jump to symbol in current workspace" "j" #'lsp-ivy-workspace-symbol :desc "Jump to symbol in any workspace" "J" #'lsp-ivy-global-workspace-symbol) - (:when (featurep! :completion helm) + (:when (modulep! :completion helm) :desc "Jump to symbol in current workspace" "j" #'helm-lsp-workspace-symbol :desc "Jump to symbol in any workspace" "J" #'helm-lsp-global-workspace-symbol) - (:when (featurep! :completion vertico) + (:when (modulep! :completion vertico) :desc "Jump to symbol in current workspace" "j" #'consult-lsp-symbols :desc "Jump to symbol in any workspace" "J" (cmd!! #'consult-lsp-symbols 'all-workspaces)) - (:when (featurep! :ui treemacs +lsp) + (:when (modulep! :ui treemacs +lsp) :desc "Errors list" "X" #'lsp-treemacs-errors-list :desc "Incoming call hierarchy" "y" #'lsp-treemacs-call-hierarchy :desc "Outgoing call hierarchy" "Y" (cmd!! #'lsp-treemacs-call-hierarchy t) @@ -399,11 +399,11 @@ :desc "Symbols" "S" #'lsp-treemacs-symbols) :desc "LSP" "l" #'+default/lsp-command-map :desc "LSP Rename" "r" #'lsp-rename) - (:when (featurep! :tools lsp +eglot) + (:when (modulep! :tools lsp +eglot) :desc "LSP Execute code action" "a" #'eglot-code-actions :desc "LSP Rename" "r" #'eglot-rename :desc "LSP Find declaration" "j" #'eglot-find-declaration - (:when (featurep! :completion vertico) + (:when (modulep! :completion vertico) :desc "Jump to symbol in current workspace" "j" #'consult-eglot-symbols)) :desc "Compile" "c" #'compile :desc "Recompile" "C" #'recompile @@ -447,17 +447,17 @@ :desc "Revert file" "R" #'vc-revert :desc "Copy link to remote" "y" #'+vc/browse-at-remote-kill :desc "Copy link to homepage" "Y" #'+vc/browse-at-remote-kill-homepage - (:when (featurep! :ui hydra) + (:when (modulep! :ui hydra) :desc "SMerge" "m" #'+vc/smerge-hydra/body) - (:when (featurep! :ui vc-gutter) - (:when (featurep! :ui hydra) + (:when (modulep! :ui vc-gutter) + (:when (modulep! :ui hydra) :desc "VCGutter" "." #'+vc/gutter-hydra/body) :desc "Revert hunk at point" "r" #'+vc-gutter/revert-hunk :desc "stage hunk at point" "s" #'+vc-gutter/stage-hunk :desc "Git time machine" "t" #'git-timemachine-toggle :desc "Jump to next hunk" "]" #'+vc-gutter/next-hunk :desc "Jump to previous hunk" "[" #'+vc-gutter/previous-hunk) - (:when (featurep! :tools magit) + (:when (modulep! :tools magit) :desc "Magit dispatch" "/" #'magit-dispatch :desc "Magit file dispatch" "." #'magit-file-dispatch :desc "Forge dispatch" "'" #'forge-dispatch @@ -487,7 +487,7 @@ :desc "Browse issues" "I" #'forge-browse-issues :desc "Browse pull requests" "P" #'forge-browse-pullreqs) (:prefix ("l" . "list") - (:when (featurep! :tools gist) + (:when (modulep! :tools gist) :desc "List gists" "g" #'+gist:list) :desc "List repositories" "r" #'magit-list-repositories :desc "List submodules" "s" #'magit-list-submodules @@ -518,16 +518,16 @@ (:prefix-map ("n" . "notes") :desc "Search notes for symbol" "*" #'+default/search-notes-for-symbol-at-point :desc "Org agenda" "a" #'org-agenda - (:when (featurep! :tools biblio) + (:when (modulep! :tools biblio) :desc "Bibliographic entries" "b" - (cond ((featurep! :completion vertico) #'citar-open-entry) - ((featurep! :completion ivy) #'ivy-bibtex) - ((featurep! :completion helm) #'helm-bibtex))) + (cond ((modulep! :completion vertico) #'citar-open-entry) + ((modulep! :completion ivy) #'ivy-bibtex) + ((modulep! :completion helm) #'helm-bibtex))) :desc "Toggle last org-clock" "c" #'+org/toggle-last-clock :desc "Cancel current org-clock" "C" #'org-clock-cancel :desc "Open deft" "d" #'deft - (:when (featurep! :lang org +noter) + (:when (modulep! :lang org +noter) :desc "Org noter" "e" #'org-noter) :desc "Find file in notes" "f" #'+default/find-in-notes @@ -544,7 +544,7 @@ :desc "Org export to clipboard" "y" #'+org/export-to-clipboard :desc "Org export to clipboard as RTF" "Y" #'+org/export-to-clipboard-as-rich-text - (:when (featurep! :lang org +roam) + (:when (modulep! :lang org +roam) (:prefix ("r" . "roam") :desc "Switch to buffer" "b" #'org-roam-switch-to-buffer :desc "Org Roam Capture" "c" #'org-roam-capture @@ -559,7 +559,7 @@ :desc "Tomorrow" "m" #'org-roam-dailies-find-tomorrow :desc "Yesterday" "y" #'org-roam-dailies-find-yesterday))) - (:when (featurep! :lang org +roam2) + (:when (modulep! :lang org +roam2) (:prefix ("r" . "roam") :desc "Open random node" "a" #'org-roam-node-random :desc "Find node" "f" #'org-roam-node-find @@ -584,7 +584,7 @@ :desc "Capture yesterday" "Y" #'org-roam-dailies-capture-yesterday :desc "Find directory" "-" #'org-roam-dailies-find-directory))) - (:when (featurep! :lang org +journal) + (:when (modulep! :lang org +journal) (:prefix ("j" . "journal") :desc "New Entry" "j" #'org-journal-new-entry :desc "New Scheduled Entry" "J" #'org-journal-new-scheduled-entry @@ -605,25 +605,25 @@ :desc "REPL" "r" #'+eval/open-repl-other-window :desc "REPL (same window)" "R" #'+eval/open-repl-same-window :desc "Dired" "-" #'dired-jump - (:when (featurep! :ui neotree) + (:when (modulep! :ui neotree) :desc "Project sidebar" "p" #'+neotree/open :desc "Find file in project sidebar" "P" #'+neotree/find-this-file) - (:when (featurep! :ui treemacs) + (:when (modulep! :ui treemacs) :desc "Project sidebar" "p" #'+treemacs/toggle :desc "Find file in project sidebar" "P" #'treemacs-find-file) - (:when (featurep! :term shell) + (:when (modulep! :term shell) :desc "Toggle shell popup" "t" #'+shell/toggle :desc "Open shell here" "T" #'+shell/here) - (:when (featurep! :term term) + (:when (modulep! :term term) :desc "Toggle terminal popup" "t" #'+term/toggle :desc "Open terminal here" "T" #'+term/here) - (:when (featurep! :term vterm) + (:when (modulep! :term vterm) :desc "Toggle vterm popup" "t" #'+vterm/toggle :desc "Open vterm here" "T" #'+vterm/here) - (:when (featurep! :term eshell) + (:when (modulep! :term eshell) :desc "Toggle eshell popup" "e" #'+eshell/toggle :desc "Open eshell here" "E" #'+eshell/here) - (:when (featurep! :os macos) + (:when (modulep! :os macos) :desc "Reveal in Finder" "o" #'+macos/reveal-in-finder :desc "Reveal project in Finder" "O" #'+macos/reveal-project-in-finder :desc "Send to Transmit" "u" #'+macos/send-to-transmit @@ -632,13 +632,13 @@ :desc "Send project to Launchbar" "L" #'+macos/send-project-to-launchbar :desc "Open in iTerm" "i" #'+macos/open-in-iterm :desc "Open in new iTerm window" "I" #'+macos/open-in-iterm-new-window) - (:when (featurep! :tools docker) + (:when (modulep! :tools docker) :desc "Docker" "D" #'docker) - (:when (featurep! :email mu4e) + (:when (modulep! :email mu4e) :desc "mu4e" "m" #'=mu4e) - (:when (featurep! :email notmuch) + (:when (modulep! :email notmuch) :desc "notmuch" "m" #'=notmuch) - (:when (featurep! :email wanderlust) + (:when (modulep! :email wanderlust) :desc "wanderlust" "m" #'=wanderlust)) ;;; p --- project @@ -668,9 +668,9 @@ :desc "Test project" "T" #'projectile-test-project :desc "Pop up scratch buffer" "x" #'doom/open-project-scratch-buffer :desc "Switch to scratch buffer" "X" #'doom/switch-to-project-scratch-buffer - (:when (and (featurep! :tools taskrunner) - (or (featurep! :completion ivy) - (featurep! :completion helm))) + (:when (and (modulep! :tools taskrunner) + (or (modulep! :completion ivy) + (modulep! :completion helm))) :desc "List project tasks" "z" #'+taskrunner/project-tasks)) ;;; q --- quit/session @@ -689,7 +689,7 @@ :desc "Restart Emacs" "R" #'doom/restart) ;;; r --- remote - (:when (featurep! :tools upload) + (:when (modulep! :tools upload) (:prefix-map ("r" . "remote") :desc "Browse remote" "b" #'ssh-deploy-browse-remote-base-handler :desc "Browse relative" "B" #'ssh-deploy-browse-remote-handler @@ -709,13 +709,13 @@ ;;; s --- search (:prefix-map ("s" . "search") :desc "Search buffer" "b" - (cond ((featurep! :completion vertico) #'+default/search-buffer) - ((featurep! :completion ivy) #'swiper) - ((featurep! :completion helm) #'swiper)) + (cond ((modulep! :completion vertico) #'+default/search-buffer) + ((modulep! :completion ivy) #'swiper) + ((modulep! :completion helm) #'swiper)) :desc "Search all open buffers" "B" - (cond ((featurep! :completion vertico) (cmd!! #'consult-line-multi 'all-buffers)) - ((featurep! :completion ivy) #'swiper-all) - ((featurep! :completion helm) #'swiper-all)) + (cond ((modulep! :completion vertico) (cmd!! #'consult-line-multi 'all-buffers)) + ((modulep! :completion ivy) #'swiper-all) + ((modulep! :completion helm) #'swiper-all)) :desc "Search current directory" "d" #'+default/search-cwd :desc "Search other directory" "D" #'+default/search-other-cwd :desc "Search .emacs.d" "e" #'+default/search-emacsd @@ -734,9 +734,9 @@ :desc "Jump to mark" "r" #'evil-show-marks :desc "Search buffer" "s" #'+default/search-buffer :desc "Search buffer for thing at point" "S" - (cond ((featurep! :completion vertico) #'+vertico/search-symbol-at-point) - ((featurep! :completion ivy) #'swiper-isearch-thing-at-point) - ((featurep! :completion helm) #'swiper-isearch-thing-at-point)) + (cond ((modulep! :completion vertico) #'+vertico/search-symbol-at-point) + ((modulep! :completion ivy) #'swiper-isearch-thing-at-point) + ((modulep! :completion helm) #'swiper-isearch-thing-at-point)) :desc "Dictionary" "t" #'+lookup/dictionary-definition :desc "Thesaurus" "T" #'+lookup/synonyms) @@ -745,29 +745,29 @@ :desc "Big mode" "b" #'doom-big-font-mode :desc "Fill Column Indicator" "c" #'global-display-fill-column-indicator-mode :desc "Flymake" "f" #'flymake-mode - (:when (featurep! :checkers syntax) + (:when (modulep! :checkers syntax) :desc "Flycheck" "f" #'flycheck-mode) :desc "Frame fullscreen" "F" #'toggle-frame-fullscreen :desc "Evil goggles" "g" #'evil-goggles-mode - (:when (featurep! :ui indent-guides) + (:when (modulep! :ui indent-guides) :desc "Indent guides" "i" #'highlight-indent-guides-mode) :desc "Indent style" "I" #'doom/toggle-indent-style :desc "Line numbers" "l" #'doom/toggle-line-numbers - (:when (featurep! :ui minimap) + (:when (modulep! :ui minimap) :desc "Minimap" "m" #'minimap-mode) - (:when (featurep! :lang org +present) + (:when (modulep! :lang org +present) :desc "org-tree-slide mode" "p" #'org-tree-slide-mode) :desc "Read-only mode" "r" #'read-only-mode - (:when (and (featurep! :checkers spell) (not (featurep! :checkers spell +flyspell))) + (:when (and (modulep! :checkers spell) (not (modulep! :checkers spell +flyspell))) :desc "Spell checker" "s" #'spell-fu-mode) - (:when (featurep! :checkers spell +flyspell) + (:when (modulep! :checkers spell +flyspell) :desc "Spell checker" "s" #'flyspell-mode) - (:when (featurep! :lang org +pomodoro) + (:when (modulep! :lang org +pomodoro) :desc "Pomodoro timer" "t" #'org-pomodoro) :desc "Soft line wrapping" "w" #'visual-line-mode - (:when (featurep! :editor word-wrap) + (:when (modulep! :editor word-wrap) :desc "Soft line wrapping" "w" #'+word-wrap-mode) - (:when (featurep! :ui zen) + (:when (modulep! :ui zen) :desc "Zen mode" "z" #'+zen/toggle :desc "Zen mode (fullscreen)" "Z" #'+zen/toggle-fullscreen))) diff --git a/modules/config/default/+evil.el b/modules/config/default/+evil.el index afb67451d..a5ddc3099 100644 --- a/modules/config/default/+evil.el +++ b/modules/config/default/+evil.el @@ -17,5 +17,5 @@ :prefix doom-leader-key "u" #'universal-argument-more :prefix doom-leader-alt-key "u" #'universal-argument-more) -(when (featurep! +bindings) +(when (modulep! +bindings) (load! "+evil-bindings")) diff --git a/modules/config/default/autoload/default.el b/modules/config/default/autoload/default.el index 7ea522f41..d68698049 100644 --- a/modules/config/default/autoload/default.el +++ b/modules/config/default/autoload/default.el @@ -32,7 +32,7 @@ generate `completing-read' candidates." (defun +default/new-buffer () "TODO" (interactive) - (if (featurep! 'evil) + (if (modulep! 'evil) (call-interactively #'evil-buffer-new) (let ((buffer (generate-new-buffer "*new*"))) (set-window-buffer nil buffer) @@ -54,17 +54,17 @@ generate `completing-read' candidates." If the the vertico and lsp modules are active, list lsp diagnostics for the current project. Otherwise list them for the current buffer" (interactive) - (cond ((and (featurep! :completion vertico) - (featurep! :tools lsp) + (cond ((and (modulep! :completion vertico) + (modulep! :tools lsp) (bound-and-true-p lsp-mode)) (consult-lsp-diagnostics arg)) - ((and (featurep! :checkers syntax) + ((and (modulep! :checkers syntax) (bound-and-true-p flycheck-mode)) - (if (featurep! :completion vertico) + (if (modulep! :completion vertico) (consult-flycheck) (flycheck-list-errors))) ((bound-and-true-p flymake-mode) - (if (featurep! :completion vertico) + (if (modulep! :completion vertico) (consult-flymake) (flymake-show-diagnostics-buffer))) (t diff --git a/modules/config/default/autoload/search.el b/modules/config/default/autoload/search.el index 2acea5d39..2a9c122b4 100644 --- a/modules/config/default/autoload/search.el +++ b/modules/config/default/autoload/search.el @@ -10,9 +10,9 @@ If prefix ARG is set, prompt for a directory to search from." (read-directory-name "Search directory: ") default-directory))) (call-interactively - (cond ((featurep! :completion ivy) #'+ivy/project-search-from-cwd) - ((featurep! :completion helm) #'+helm/project-search-from-cwd) - ((featurep! :completion vertico) #'+vertico/project-search-from-cwd) + (cond ((modulep! :completion ivy) #'+ivy/project-search-from-cwd) + ((modulep! :completion helm) #'+helm/project-search-from-cwd) + ((modulep! :completion vertico) #'+vertico/project-search-from-cwd) (#'rgrep))))) ;;;###autoload @@ -27,9 +27,9 @@ If prefix ARG is set, prompt for a directory to search from." (interactive) (let ((default-directory doom-emacs-dir)) (call-interactively - (cond ((featurep! :completion ivy) #'+ivy/project-search-from-cwd) - ((featurep! :completion helm) #'+helm/project-search-from-cwd) - ((featurep! :completion vertico) #'+vertico/project-search-from-cwd) + (cond ((modulep! :completion ivy) #'+ivy/project-search-from-cwd) + ((modulep! :completion helm) #'+helm/project-search-from-cwd) + ((modulep! :completion vertico) #'+vertico/project-search-from-cwd) (#'rgrep))))) ;;;###autoload @@ -52,13 +52,13 @@ input and search the whole buffer for it." (deactivate-mark) (when multiline-p (narrow-to-region start end))) - (cond ((or (featurep! :completion helm) - (featurep! :completion ivy)) + (cond ((or (modulep! :completion helm) + (modulep! :completion ivy)) (call-interactively (if (and start end (not multiline-p)) #'swiper-isearch-thing-at-point #'swiper-isearch))) - ((featurep! :completion vertico) + ((modulep! :completion vertico) (if (and start end (not multiline-p)) (consult-line (replace-regexp-in-string @@ -82,9 +82,9 @@ If prefix ARG is set, include ignored/hidden files." (user-error "There are no known projects")) default-directory))) (call-interactively - (cond ((featurep! :completion ivy) #'+ivy/project-search) - ((featurep! :completion helm) #'+helm/project-search) - ((featurep! :completion vertico) #'+vertico/project-search) + (cond ((modulep! :completion ivy) #'+ivy/project-search) + ((modulep! :completion helm) #'+helm/project-search) + ((modulep! :completion vertico) #'+vertico/project-search) (#'projectile-ripgrep))))) ;;;###autoload @@ -105,11 +105,11 @@ If prefix ARG is set, prompt for a known project to search from." (completing-read "Search project: " projects nil t) (user-error "There are no known projects")) (doom-project-root default-directory))))) - (cond ((featurep! :completion ivy) + (cond ((modulep! :completion ivy) (+ivy/project-search nil symbol dir)) - ((featurep! :completion helm) + ((modulep! :completion helm) (+helm/project-search nil symbol dir)) - ((featurep! :completion vertico) + ((modulep! :completion vertico) (+vertico/project-search nil symbol dir)) ((rgrep (regexp-quote symbol))))) diff --git a/modules/config/default/autoload/text.el b/modules/config/default/autoload/text.el index f4dd9b76b..ccc9da9fa 100644 --- a/modules/config/default/autoload/text.el +++ b/modules/config/default/autoload/text.el @@ -145,7 +145,7 @@ possible, or just one char if that's not possible." (insert-char ?\s (- ocol (current-column)) nil)))) ;; ((= n 1) - (cond ((or (not (featurep! +smartparens)) + (cond ((or (not (modulep! +smartparens)) (not (bound-and-true-p smartparens-mode)) (and (memq (char-before) (list ?\ ?\t)) (save-excursion diff --git a/modules/config/default/config.el b/modules/config/default/config.el index 5184859b6..f4a301488 100644 --- a/modules/config/default/config.el +++ b/modules/config/default/config.el @@ -10,10 +10,10 @@ minibuffer-local-must-match-map minibuffer-local-isearch-map read-expression-map) - (cond ((featurep! :completion ivy) + (cond ((modulep! :completion ivy) '(ivy-minibuffer-map ivy-switch-buffer-map)) - ((featurep! :completion helm) + ((modulep! :completion helm) '(helm-map helm-rg-map helm-read-file-map)))) @@ -83,7 +83,7 @@ ;; ;;; Smartparens config -(when (featurep! +smartparens) +(when (modulep! +smartparens) ;; You can disable :unless predicates with (sp-pair "'" nil :unless nil) ;; And disable :post-handlers with (sp-pair "{" nil :post-handlers nil) ;; or specific :post-handlers with: @@ -311,7 +311,7 @@ Continues comments if executed from a commented line. Consults "s-l" #'goto-line ;; Restore OS undo, save, copy, & paste keys (without cua-mode, because ;; it imposes some other functionality and overhead we don't need) - "s-f" (if (featurep! :completion vertico) #'consult-line #'swiper) + "s-f" (if (modulep! :completion vertico) #'consult-line #'swiper) "s-z" #'undo "s-Z" #'redo "s-c" (if (featurep 'evil) #'evil-yank #'copy-region-as-kill) @@ -433,7 +433,7 @@ Continues comments if executed from a commented line. Consults which-key-replacement-alist))) -(when (featurep! +bindings) +(when (modulep! +bindings) ;; Make M-x harder to miss (define-key! 'override "M-x" #'execute-extended-command @@ -441,15 +441,15 @@ Continues comments if executed from a commented line. Consults ;; A Doom convention where C-s on popups and interactive searches will invoke ;; ivy/helm/vertico for their superior filtering. - (when-let (command (cond ((featurep! :completion ivy) + (when-let (command (cond ((modulep! :completion ivy) #'counsel-minibuffer-history) - ((featurep! :completion helm) + ((modulep! :completion helm) #'helm-minibuffer-history) - ((featurep! :completion vertico) + ((modulep! :completion vertico) #'consult-history))) (define-key! :keymaps (append +default-minibuffer-maps - (when (featurep! :editor evil +everywhere) + (when (modulep! :editor evil +everywhere) '(evil-ex-completion-map))) "C-s" command)) diff --git a/modules/config/default/packages.el b/modules/config/default/packages.el index 7d0ff6f5b..25d33eb79 100644 --- a/modules/config/default/packages.el +++ b/modules/config/default/packages.el @@ -5,5 +5,5 @@ (package! drag-stuff :pin "6d06d846cd37c052d79acd0f372c13006aa7e7c8") (package! link-hint :pin "676dac6621e321b33a8d396fa27dd0ea619d21e3") -(unless (featurep! :editor evil) +(unless (modulep! :editor evil) (package! expand-region :pin "7e5bbe2763c12bae3e77fe0c49bcad05ff91dbfe")) diff --git a/modules/editor/evil/+commands.el b/modules/editor/evil/+commands.el index 633da6a66..7c05694bc 100644 --- a/modules/editor/evil/+commands.el +++ b/modules/editor/evil/+commands.el @@ -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)) diff --git a/modules/editor/evil/config.el b/modules/editor/evil/config.el index 764f9d32f..3b6802c00 100644 --- a/modules/editor/evil/config.el +++ b/modules/editor/evil/config.el @@ -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 diff --git a/modules/editor/evil/init.el b/modules/editor/evil/init.el index 092976f4c..f896b4cf9 100644 --- a/modules/editor/evil/init.el +++ b/modules/editor/evil/init.el @@ -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" ""))) diff --git a/modules/editor/evil/packages.el b/modules/editor/evil/packages.el index 1431b5c66..e09f9d78b 100644 --- a/modules/editor/evil/packages.el +++ b/modules/editor/evil/packages.el @@ -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)) diff --git a/modules/editor/file-templates/config.el b/modules/editor/file-templates/config.el index fc4b8a64d..2620c931d 100644 --- a/modules/editor/file-templates/config.el +++ b/modules/editor/file-templates/config.el @@ -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)) diff --git a/modules/editor/fold/config.el b/modules/editor/fold/config.el index 11be67aad..419d5682a 100644 --- a/modules/editor/fold/config.el +++ b/modules/editor/fold/config.el @@ -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 diff --git a/modules/editor/fold/packages.el b/modules/editor/fold/packages.el index 2867a322f..e25d44e95 100644 --- a/modules/editor/fold/packages.el +++ b/modules/editor/fold/packages.el @@ -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"))) diff --git a/modules/editor/format/autoload/evil.el b/modules/editor/format/autoload/evil.el index d9e00f989..e9eceb3f3 100644 --- a/modules/editor/format/autoload/evil.el +++ b/modules/editor/format/autoload/evil.el @@ -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) diff --git a/modules/editor/format/config.el b/modules/editor/format/config.el index 905b0d525..0e634adbe 100644 --- a/modules/editor/format/config.el +++ b/modules/editor/format/config.el @@ -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)) diff --git a/modules/editor/god/doctor.el b/modules/editor/god/doctor.el index 66b0b1e84..f87bd87d3 100644 --- a/modules/editor/god/doctor.el +++ b/modules/editor/god/doctor.el @@ -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")) diff --git a/modules/editor/lispy/config.el b/modules/editor/lispy/config.el index 9945c98d4..810a7d859 100644 --- a/modules/editor/lispy/config.el +++ b/modules/editor/lispy/config.el @@ -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 diff --git a/modules/editor/lispy/packages.el b/modules/editor/lispy/packages.el index a3b264604..57d67a432 100644 --- a/modules/editor/lispy/packages.el +++ b/modules/editor/lispy/packages.el @@ -2,5 +2,5 @@ ;;; editor/lispyville/packages.el (package! lispy :pin "df1b7e614fb0f73646755343e8892ddda310f427") -(when (featurep! :editor evil) +(when (modulep! :editor evil) (package! lispyville :pin "9c14bed0359f659e246d345c706f895737c3d172")) diff --git a/modules/editor/multiple-cursors/autoload/evil-mc.el b/modules/editor/multiple-cursors/autoload/evil-mc.el index d0af0d5df..4bdebb651 100644 --- a/modules/editor/multiple-cursors/autoload/evil-mc.el +++ b/modules/editor/multiple-cursors/autoload/evil-mc.el @@ -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 () diff --git a/modules/editor/multiple-cursors/config.el b/modules/editor/multiple-cursors/config.el index 105bdfc8b..70a9518ad 100644 --- a/modules/editor/multiple-cursors/config.el +++ b/modules/editor/multiple-cursors/config.el @@ -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) diff --git a/modules/editor/multiple-cursors/packages.el b/modules/editor/multiple-cursors/packages.el index 304c99df2..220187af6 100644 --- a/modules/editor/multiple-cursors/packages.el +++ b/modules/editor/multiple-cursors/packages.el @@ -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")) diff --git a/modules/editor/objed/config.el b/modules/editor/objed/config.el index f58c55f78..57b191361 100644 --- a/modules/editor/objed/config.el +++ b/modules/editor/objed/config.el @@ -23,5 +23,5 @@ (face-remap-remove-relative remap)) (setq +objed--extra-face-remaps nil))) - (unless (featurep! +manual) + (unless (modulep! +manual) (objed-mode +1))) diff --git a/modules/emacs/dired/config.el b/modules/emacs/dired/config.el index 4b0c48eaa..26e5e74e2 100644 --- a/modules/emacs/dired/config.el +++ b/modules/emacs/dired/config.el @@ -72,7 +72,7 @@ Fixes #3939: unsortable dired entries on Windows." (use-package! ranger - :when (featurep! +ranger) + :when (modulep! +ranger) :after dired :init (setq ranger-override-dired t) :config @@ -129,7 +129,7 @@ we have to clean it up ourselves." (use-package! dirvish - :when (featurep! +dirvish) + :when (modulep! +dirvish) :defer t :init (after! dired (dirvish-override-dired-mode)) :hook (dired-mode . dired-omit-mode) @@ -138,7 +138,7 @@ we have to clean it up ourselves." dirvish-hide-details nil dirvish-attributes '(git-msg) dired-omit-files (concat dired-omit-files "\\|^\\..*$")) - (when (featurep! +icons) + (when (modulep! +icons) (push 'all-the-icons dirvish-attributes)) (map! :map dirvish-mode-map :n "b" #'dirvish-goto-bookmark @@ -152,8 +152,8 @@ we have to clean it up ourselves." (use-package! all-the-icons-dired - :when (featurep! +icons) - :unless (featurep! +dirvish) + :when (modulep! +icons) + :unless (modulep! +dirvish) :hook (dired-mode . all-the-icons-dired-mode) :config ;; HACK Fixes #1929: icons break file renaming in Emacs 27+, because the icon @@ -176,8 +176,8 @@ we have to clean it up ourselves." (use-package! dired-x - :unless (featurep! +dirvish) - :unless (featurep! +ranger) + :unless (modulep! +dirvish) + :unless (modulep! +ranger) :hook (dired-mode . dired-omit-mode) :config (setq dired-omit-verbose nil diff --git a/modules/emacs/dired/packages.el b/modules/emacs/dired/packages.el index c98fd2b83..06e5659a5 100644 --- a/modules/emacs/dired/packages.el +++ b/modules/emacs/dired/packages.el @@ -4,11 +4,11 @@ (package! diredfl :pin "f9140b2c42151dca669003d685c9f079b2e3dc37") (package! dired-git-info :pin "9461476a28a5fec0784260f6e318237c662c3430") (package! dired-rsync :pin "7940d9154d0a908693999b0e1ea351a6d365c93d") -(when (featurep! +ranger) +(when (modulep! +ranger) (package! ranger :pin "2498519cb21dcd5791d240607a72a204d1761668")) -(when (featurep! +dirvish) +(when (modulep! +dirvish) (package! dirvish :pin "73dcaa404da9ab84d25f2919e6e3af4b1f8e7f37")) -(when (and (featurep! +icons) - (not (featurep! +dirvish))) +(when (and (modulep! +icons) + (not (modulep! +dirvish))) (package! all-the-icons-dired :pin "5e9b097f9950cc9f86de922b07903a4e5fefc733")) (package! fd-dired :pin "458464771bb220b6eb87ccfd4c985c436e57dc7e") diff --git a/modules/emacs/ibuffer/autoload/workspaces.el b/modules/emacs/ibuffer/autoload/workspaces.el index 181785136..cb14ab039 100644 --- a/modules/emacs/ibuffer/autoload/workspaces.el +++ b/modules/emacs/ibuffer/autoload/workspaces.el @@ -1,5 +1,5 @@ ;;; emacs/ibuffer/autoload/workspaces.el -*- lexical-binding: t; -*- -;;;###if (featurep! :ui workspaces) +;;;###if (modulep! :ui workspaces) ;;;###autoload (defun +ibuffer-workspace (workspace-name) diff --git a/modules/emacs/ibuffer/config.el b/modules/emacs/ibuffer/config.el index daa0b3a43..775bc9131 100644 --- a/modules/emacs/ibuffer/config.el +++ b/modules/emacs/ibuffer/config.el @@ -7,7 +7,7 @@ ibuffer-filter-group-name-face '(:inherit (success bold)) ibuffer-formats `((mark modified read-only locked - ,@(if (featurep! +icons) + ,@(if (modulep! +icons) `(;; Here you may adjust by replacing :right with :center ;; or :left According to taste, if you want the icon ;; further from the name @@ -39,7 +39,7 @@ :header-mouse-map ibuffer-size-header-map) (file-size-human-readable (buffer-size))) - (when (featurep! :ui workspaces) + (when (modulep! :ui workspaces) (define-ibuffer-filter workspace-buffers "Filter for workspace buffers" (:reader (+workspace-get (read-string "workspace name: ")) @@ -48,7 +48,7 @@ (define-key ibuffer-mode-map [remap ibuffer-visit-buffer] #'+ibuffer/visit-workspace-buffer)) - (when (featurep! :completion ivy) + (when (modulep! :completion ivy) (defadvice! +ibuffer--use-counsel-maybe-a (_file &optional _wildcards) "Use `counsel-find-file' instead of `find-file'." :override #'ibuffer-find-file @@ -71,7 +71,7 @@ :hook (ibuffer . ibuffer-projectile-set-filter-groups) :config (setq ibuffer-projectile-prefix - (if (featurep! +icons) + (if (modulep! +icons) (concat (all-the-icons-octicon "file-directory" :face ibuffer-filter-group-name-face diff --git a/modules/emacs/undo/config.el b/modules/emacs/undo/config.el index bfa98f4a7..a113a5745 100644 --- a/modules/emacs/undo/config.el +++ b/modules/emacs/undo/config.el @@ -1,7 +1,7 @@ ;;; emacs/undo/config.el -*- lexical-binding: t; -*- (use-package! undo-fu - :unless (featurep! +tree) + :unless (modulep! +tree) :hook (doom-first-buffer . undo-fu-mode) :config ;; Increase undo history limits to reduce likelihood of data loss @@ -25,7 +25,7 @@ (use-package! undo-fu-session - :unless (featurep! +tree) + :unless (modulep! +tree) :hook (undo-fu-mode . global-undo-fu-session-mode) :custom (undo-fu-session-directory (concat doom-cache-dir "undo-fu-session/")) :config @@ -52,7 +52,7 @@ (use-package! undo-tree - :when (featurep! +tree) + :when (modulep! +tree) ;; Branching & persistent undo :hook (doom-first-buffer . global-undo-tree-mode) :custom (undo-tree-history-directory-alist `(("." . ,(concat doom-cache-dir "undo-tree-hist/")))) diff --git a/modules/emacs/undo/packages.el b/modules/emacs/undo/packages.el index c7dad7000..d10fa27a2 100644 --- a/modules/emacs/undo/packages.el +++ b/modules/emacs/undo/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; emacs/undo/packages.el -(if (featurep! +tree) +(if (modulep! +tree) (package! undo-tree :pin "e326c6135e62f5fe8536528d3acd5e798f847407") (package! undo-fu :pin "ab8bc10e424bccc847800c31ab41888db789d55d") (package! undo-fu-session :pin "3e810c7c9ab75d2b6f92c7c876290abbc164e750")) diff --git a/modules/emacs/vc/autoload/hydra.el b/modules/emacs/vc/autoload/hydra.el index dc0a13408..65272d4c3 100644 --- a/modules/emacs/vc/autoload/hydra.el +++ b/modules/emacs/vc/autoload/hydra.el @@ -1,5 +1,5 @@ ;;; emacs/vc/autoload/hydra.el -*- lexical-binding: t; -*- -;;;###if (featurep! :ui hydra) +;;;###if (modulep! :ui hydra) ;;;###autoload (autoload '+vc/smerge-hydra/body "emacs/vc/autoload/hydra" nil t) (defhydra +vc/smerge-hydra (:hint nil diff --git a/modules/emacs/vc/config.el b/modules/emacs/vc/config.el index 7f729c397..b35a204a3 100644 --- a/modules/emacs/vc/config.el +++ b/modules/emacs/vc/config.el @@ -93,7 +93,7 @@ info in the `header-line-format' is a more visible indicator." ;; Rehash evil keybindings so they are recognized (add-hook 'git-timemachine-mode-hook #'evil-normalize-keymaps)) - (when (featurep! :tools magit) + (when (modulep! :tools magit) (add-transient-hook! #'git-timemachine-blame (require 'magit-blame))) (map! :map git-timemachine-mode-map diff --git a/modules/email/mu4e/autoload/email.el b/modules/email/mu4e/autoload/email.el index 295b80c52..5482b6903 100644 --- a/modules/email/mu4e/autoload/email.el +++ b/modules/email/mu4e/autoload/email.el @@ -56,7 +56,7 @@ default/fallback account." "Start email client." (interactive) (require 'mu4e) - (if (featurep! :ui workspaces) + (if (modulep! :ui workspaces) ;; delete current workspace if empty ;; this is useful when mu4e is in the daemon ;; as otherwise you can accumulate empty workspaces @@ -326,7 +326,7 @@ When otherwise called, open a dired buffer and enable `dired-mu4e-attach-ctrl-c- (defun +mu4e-kill-mu4e-h () ;; (prolusion-mail-hide) (cond - ((and (featurep! :ui workspaces) (+workspace-exists-p +mu4e-workspace-name)) + ((and (modulep! :ui workspaces) (+workspace-exists-p +mu4e-workspace-name)) (+workspace/delete +mu4e-workspace-name)) (+mu4e--old-wconf diff --git a/modules/email/mu4e/autoload/evil.el b/modules/email/mu4e/autoload/evil.el index 2a2153999..ec3a2f661 100644 --- a/modules/email/mu4e/autoload/evil.el +++ b/modules/email/mu4e/autoload/evil.el @@ -1,5 +1,5 @@ ;; email/mu4e/autoload/evil.el -*- lexical-binding: t; -*- -;;;###if (featurep! :editor evil) +;;;###if (modulep! :editor evil) ;;;###autoload (defun +mu4e/mark (&optional beg end) diff --git a/modules/email/mu4e/config.el b/modules/email/mu4e/config.el index 9a3a79417..4242a798b 100644 --- a/modules/email/mu4e/config.el +++ b/modules/email/mu4e/config.el @@ -86,9 +86,9 @@ is non-nil." mu4e-compose-context-policy 'ask-if-none ;; use helm/ivy/vertico mu4e-completing-read-function - (cond ((featurep! :completion ivy) #'ivy-completing-read) - ((featurep! :completion helm) #'completing-read) - ((featurep! :completion vertico) #'completing-read) + (cond ((modulep! :completion ivy) #'ivy-completing-read) + ((modulep! :completion helm) #'completing-read) + ((modulep! :completion vertico) #'completing-read) (t #'ido-completing-read)) mu4e-attachment-dir (concat @@ -252,7 +252,7 @@ is non-nil." (when (fboundp 'imagemagick-register-types) (imagemagick-register-types)) - (when (featurep! :ui workspaces) + (when (modulep! :ui workspaces) (map! :map mu4e-main-mode-map :ne "h" #'+workspace/other)) @@ -337,7 +337,7 @@ Acts like a singular `mu4e-view-save-attachments', without the saving." ;; Due to evil, none of the marking commands work when making a visual selection in ;; the headers view of mu4e. Without overriding any evil commands we may actually ;; want to use in and evil selection, this can be easily fixed. - (when (featurep! :editor evil) + (when (modulep! :editor evil) (map! :map mu4e-headers-mode-map :v "*" #'mu4e-headers-mark-for-something :v "!" #'mu4e-headers-mark-for-read @@ -362,7 +362,7 @@ This is enacted by `+mu4e~main-action-str-prettier-a' and (advice-add #'mu4e--key-val :filter-return #'+mu4e~main-keyval-str-prettier-a) (advice-add #'mu4e--main-action-str :override #'+mu4e~main-action-str-prettier-a) - (when (featurep! :editor evil) + (when (modulep! :editor evil) ;; As +mu4e~main-action-str-prettier replaces [k]ey with key q]uit should become quit (setq evil-collection-mu4e-end-region-misc "quit")) @@ -376,7 +376,7 @@ This is enacted by `+mu4e~main-action-str-prettier-a' and (advice-add 'mu4e--start :around #'+mu4e-lock-start) (advice-add 'mu4e-quit :after #'+mu4e-lock-file-delete-maybe)) -(unless (featurep! +org) +(unless (modulep! +org) (after! mu4e (defun org-msg-mode (&optional _) "Dummy function." @@ -388,7 +388,7 @@ Ignores all arguments and returns nil." (use-package! org-msg :after mu4e - :when (featurep! +org) + :when (modulep! +org) :config (setq org-msg-options "html-postamble:nil H:5 num:nil ^:{} toc:nil author:nil email:nil tex:dvipng" org-msg-startup "hidestars indent inlineimages" @@ -583,7 +583,7 @@ Must be set before org-msg is loaded to take effect.") ;; ;;; Gmail integration -(when (featurep! +gmail) +(when (modulep! +gmail) (after! mu4e (defvar +mu4e-gmail-accounts nil "Gmail accounts that do not contain \"gmail\" in address and maildir. diff --git a/modules/email/mu4e/doctor.el b/modules/email/mu4e/doctor.el index a9a4a9586..bfe18dc4c 100644 --- a/modules/email/mu4e/doctor.el +++ b/modules/email/mu4e/doctor.el @@ -8,7 +8,7 @@ (warn! "Couldn't find mbsync or offlineimap command. \ You may not have a way of fetching mail.")) -(when (and (featurep! +org) +(when (and (modulep! +org) (not IS-WINDOWS)) (unless (executable-find "identify") (warn! "Couldn't find the identify command from imagemagick. \ diff --git a/modules/email/mu4e/packages.el b/modules/email/mu4e/packages.el index 726ab59ee..2e922885e 100644 --- a/modules/email/mu4e/packages.el +++ b/modules/email/mu4e/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; email/mu4e/packages.el -(when (featurep! +org) +(when (modulep! +org) (package! org-msg :pin "60e22e446325a9b3387396459d98be7c1c52579d")) (package! mu4e-alert :pin "b34d0ea7b75709cc25d842a783cebea855dc9f7d") diff --git a/modules/email/notmuch/autoload.el b/modules/email/notmuch/autoload.el index 0ee671abf..1856e8308 100644 --- a/modules/email/notmuch/autoload.el +++ b/modules/email/notmuch/autoload.el @@ -6,13 +6,13 @@ (interactive) (condition-case-unless-debug e (progn - (when (featurep! :ui workspaces) + (when (modulep! :ui workspaces) (+workspace-switch "*MAIL*" t)) (if-let* ((win (cl-find-if (lambda (it) (string-match-p "^\\*notmuch" (buffer-name (window-buffer it)))) (doom-visible-windows)))) (select-window win) (funcall +notmuch-home-function)) - (when (featurep! :ui workspaces) + (when (modulep! :ui workspaces) (+workspace/display))) ('error (+notmuch/quit) @@ -28,7 +28,7 @@ (interactive) ;; (+popup/close (get-buffer-window "*notmuch-hello*")) (doom-kill-matching-buffers "^\\*notmuch") - (when (featurep! :ui workspaces) + (when (modulep! :ui workspaces) (+workspace/delete "*MAIL*"))) (defun +notmuch-get-sync-command () @@ -52,7 +52,7 @@ ((and (pred stringp) it) it) (_ (user-error "Invalid notmuch backend specified: %S" +notmuch-sync-backend))))) - (if (featurep! +afew) + (if (modulep! +afew) (format "%s && %s" sync-cmd afew-cmd) sync-cmd))) diff --git a/modules/email/notmuch/config.el b/modules/email/notmuch/config.el index c95e63d54..2029e48d4 100644 --- a/modules/email/notmuch/config.el +++ b/modules/email/notmuch/config.el @@ -106,24 +106,24 @@ variable accordingly.") (use-package! org-mime - :when (featurep! +org) + :when (modulep! +org) :after (org notmuch) :config (setq org-mime-library 'mml)) (use-package! counsel-notmuch - :when (featurep! :completion ivy) + :when (modulep! :completion ivy) :commands counsel-notmuch :after notmuch) (use-package! helm-notmuch - :when (featurep! :completion helm) + :when (modulep! :completion helm) :commands helm-notmuch :after notmuch) (use-package! consult-notmuch - :when (featurep! :completion vertico) + :when (modulep! :completion vertico) :commands consult-notmuch :after notmuch) diff --git a/modules/email/notmuch/packages.el b/modules/email/notmuch/packages.el index 5a64b5f99..f84b31a59 100644 --- a/modules/email/notmuch/packages.el +++ b/modules/email/notmuch/packages.el @@ -19,13 +19,13 @@ t t))) :pin "bd243b65a9709bfd61ba80e80cc41ae3a23ea524") -(when (featurep! +org) +(when (modulep! +org) (package! org-mime :pin "cf96f585c68ad14751a3f73d937cbfcb890171b9")) -(when (featurep! :lang org) +(when (modulep! :lang org) (package! ol-notmuch :pin "1a53d6c707514784cabf33d865b577bf77f45913")) -(when (featurep! :completion ivy) +(when (modulep! :completion ivy) (package! counsel-notmuch :pin "a4a1562935e4180c42524c51609d1283e9be0688")) -(when (featurep! :completion helm) +(when (modulep! :completion helm) (package! helm-notmuch :pin "97a01497e079a7b6505987e9feba6b603bbec288")) -(when (featurep! :completion vertico) +(when (modulep! :completion vertico) (package! consult-notmuch :pin "4138855cddee0ef126cff6a5fc5ca9c49fd2682d")) diff --git a/modules/email/wanderlust/config.el b/modules/email/wanderlust/config.el index 7e67b865b..8743cd1d8 100644 --- a/modules/email/wanderlust/config.el +++ b/modules/email/wanderlust/config.el @@ -47,7 +47,7 @@ "^X-Mailer:" "^X-Face:")) - (when (featurep! +gmail) + (when (modulep! +gmail) (setq elmo-imap4-default-server "imap.gmail.com" elmo-imap4-default-port 993 elmo-imap4-default-authenticate-type 'clear ; CRAM-MD5 @@ -70,7 +70,7 @@ (setq wl-message-id-domain wl-local-domain) - (when (featurep! :editor evil) + (when (modulep! :editor evil) ;; Neither `wl-folder-mode' nor `wl-summary-mode' are correctly defined as ;; major modes, so we cannot use `set-evil-initial-state!' here. ;; In addition, `wl-folder-mode' won't start in `evil-emacs-state' through diff --git a/modules/input/japanese/config.el b/modules/input/japanese/config.el index dfc11ee84..fae28297d 100644 --- a/modules/input/japanese/config.el +++ b/modules/input/japanese/config.el @@ -18,7 +18,7 @@ :after avy :config (avy-migemo-mode 1)) - (when (featurep! :completion helm) + (when (modulep! :completion helm) (after! helm (helm-migemo-mode +1))))) diff --git a/modules/input/layout/+azerty.el b/modules/input/layout/+azerty.el index 467ef2f4f..12a8b9021 100644 --- a/modules/input/layout/+azerty.el +++ b/modules/input/layout/+azerty.el @@ -15,10 +15,10 @@ (map! :leader :desc "Window" "z" 'evil-window-map - (:when (featurep! :ui popup) + (:when (modulep! :ui popup) :desc "Toggle last popup" "é" #'+popup/toggle) :desc "Switch to last buffer" "²" #'evil-switch-to-windows-last-buffer - (:when (featurep! :ui workspaces) + (:when (modulep! :ui workspaces) (:prefix-map ("TAB" . "workspace") :desc "Switch to last workspace" "²" #'+workspace/other :desc "Previous workspace" "é" #'+workspace/switch-left @@ -27,14 +27,14 @@ :desc "Previous buffer" "é" #'previous-buffer :desc "Next buffer" "è" #'next-buffer) (:prefix-map ("g" . "git") - (:when (featurep! :ui vc-gutter) + (:when (modulep! :ui vc-gutter) :desc "Jump to previous hunk" "é" #'git-gutter:previous-hunk :desc "Jump to next hunk" "è" #'git-gutter:next-hunk)))) (defun +layout-remap-evil-keys-for-azerty-h () (map! :nv "à" #'evil-execute-macro :nv "²" #'evil-goto-mark - (:when (featurep! :checkers spell) + (:when (modulep! :checkers spell) :m "és" #'+spell/previous-error :m "ès" #'+spell/next-error) :n "è SPC" #'+evil/insert-newline-below @@ -47,13 +47,13 @@ :m "éu" #'+evil:url-decode :m "èy" #'+evil:c-string-encode :m "éy" #'+evil:c-string-decode - (:when (featurep! :ui vc-gutter) + (:when (modulep! :ui vc-gutter) :m "èd" #'git-gutter:next-hunk :m "éd" #'git-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 "èw" #'+workspace/switch-right :n "éw" #'+workspace/switch-left) :m "è#" #'+evil/next-preproc-directive @@ -77,5 +77,5 @@ :nv "gà" #'+evil:apply-macro)) (+layout-remap-keys-for-azerty-h) -(when (featurep! :editor evil) +(when (modulep! :editor evil) (+layout-remap-evil-keys-for-azerty-h)) diff --git a/modules/input/layout/+bepo.el b/modules/input/layout/+bepo.el index f24da8a0b..d57595eb7 100644 --- a/modules/input/layout/+bepo.el +++ b/modules/input/layout/+bepo.el @@ -37,12 +37,12 @@ In all cases, 'h' functions go to 'c' and 'l' ones go to 'r' so the navigation k (map! "C-é" 'evil-window-map) (map! :leader :desc "Window" "é" evil-window-map - (:when (featurep! :ui popup) + (:when (modulep! :ui popup) :desc "Toggle last popup" "#" #'+popup/toggle) - (:when (featurep! :ui workspaces) + (:when (modulep! :ui workspaces) :desc "Switch buffer" "«" #'switch-to-buffer) :desc "Switch to last buffer" "$" #'evil-switch-to-windows-last-buffer - (:when (featurep! :ui workspaces) + (:when (modulep! :ui workspaces) (:prefix-map ("TAB" . "workspace") :desc "Switch to last workspace" "$" #'+workspace/other :desc "Next workspace" ")" #'+workspace/switch-right @@ -53,7 +53,7 @@ In all cases, 'h' functions go to 'c' and 'l' ones go to 'r' so the navigation k (:prefix-map ("c" . "code") :desc "Jump to documentation" "S" #'+lookup/documentation) (:prefix-map ("g" . "git") - (:when (featurep! :ui vc-gutter) + (:when (modulep! :ui vc-gutter) :desc "Jump to next hunk" ")" #'git-gutter:next-hunk :desc "Jump to previous hunk" "(" #'git-gutter:previous-hunk)) (:prefix-map ("p" . "project") @@ -92,7 +92,7 @@ In all cases, 'h' functions go to 'c' and 'l' ones go to 'r' so the navigation k :m "V" #'evil-visual-screen-line))) (map! :i "C-t" #'+default-newline - (:when (featurep! :editor multiple-cursors) + (:when (modulep! :editor multiple-cursors) :prefix "gz" :nv "t" #'evil-mc-make-cursor-move-next-line :nv "s" #'evil-mc-make-cursor-move-prev-line @@ -100,7 +100,7 @@ In all cases, 'h' functions go to 'c' and 'l' ones go to 'r' so the navigation k ;; mnemonics and "j" as a "classic" rotation :nv "T" #'+multiple-cursors/evil-mc-toggle-cursors :nv "j" #'+multiple-cursors/evil-mc-toggle-cursors) - (:when (featurep! :ui popup) + (:when (modulep! :ui popup) :n "C-$" #'+popup/toggle :n "C-#" #'+popup/raise)) (after! treemacs @@ -262,7 +262,7 @@ In all cases, 'h' functions go to 'c' and 'l' ones go to 'r' so the navigation k ;;; Bootstrap (+layout-remap-keys-for-bepo-h) -(when (featurep! :editor evil) +(when (modulep! :editor evil) (+layout-remap-evil-keys-for-bepo-h) (add-hook! 'evil-collection-setup-hook (defun +layout-bepo-rotate-evil-collection-keymap (_mode mode-keymaps &rest _rest) diff --git a/modules/input/layout/autoload/bepo.el b/modules/input/layout/autoload/bepo.el index 0be948833..8a18692bf 100644 --- a/modules/input/layout/autoload/bepo.el +++ b/modules/input/layout/autoload/bepo.el @@ -1,5 +1,5 @@ ;;; input/layout/autoload/bepo.el -*- lexical-binding: t; -*- -;;;###if (featurep! +bepo) +;;;###if (modulep! +bepo) ;;;###autoload (defun +layout-bepo-rotate-ts-bare-keymap (keymaps) diff --git a/modules/input/layout/config.el b/modules/input/layout/config.el index 24c554d32..004fa4098 100644 --- a/modules/input/layout/config.el +++ b/modules/input/layout/config.el @@ -2,7 +2,7 @@ (add-hook! 'doom-init-modules-hook (defun +layout-init-h () - (cond ((featurep! +bepo) + (cond ((modulep! +bepo) (load! "+bepo")) - ((featurep! +azerty) + ((modulep! +azerty) (load! "+azerty"))))) diff --git a/modules/lang/agda/config.el b/modules/lang/agda/config.el index 074c650e9..869b5371e 100644 --- a/modules/lang/agda/config.el +++ b/modules/lang/agda/config.el @@ -1,6 +1,6 @@ ;;; lang/agda/config.el -*- lexical-binding: t; -*- -(when (and (featurep! +local) +(when (and (modulep! +local) (executable-find "agda-mode")) (add-load-path! (file-name-directory (shell-command-to-string "agda-mode locate"))) @@ -11,7 +11,7 @@ (set-lookup-handlers! 'agda2-mode :definition #'agda2-goto-definition-keyboard) - (when (featurep! +tree-sitter) + (when (modulep! +tree-sitter) (add-hook! '(agda-mode-local-vars-hook agda2-mode-local-vars-hook) :append #'tree-sitter!)) diff --git a/modules/lang/agda/doctor.el b/modules/lang/agda/doctor.el index e5715325b..941053bbc 100644 --- a/modules/lang/agda/doctor.el +++ b/modules/lang/agda/doctor.el @@ -1,5 +1,5 @@ ;;; lang/agda/doctor.el -*- lexical-binding: t; -*- -(assert! (or (not (featurep! +tree-sitter)) - (featurep! :tools tree-sitter)) +(assert! (or (not (modulep! +tree-sitter)) + (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") diff --git a/modules/lang/agda/packages.el b/modules/lang/agda/packages.el index 56740dd80..8576e6f50 100644 --- a/modules/lang/agda/packages.el +++ b/modules/lang/agda/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/agda/packages.el -(unless (featurep! +local) +(unless (modulep! +local) (package! agda-input :recipe (:host github :repo "agda/agda" :files ("src/data/emacs-mode/agda-input.el") diff --git a/modules/lang/beancount/config.el b/modules/lang/beancount/config.el index 31b748709..c70ce6f7d 100644 --- a/modules/lang/beancount/config.el +++ b/modules/lang/beancount/config.el @@ -14,7 +14,7 @@ :config (setq beancount-electric-currency t) - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'beancount-mode-local-vars-hook #'lsp! 'append)) (map! :map beancount-mode-map diff --git a/modules/lang/cc/config.el b/modules/lang/cc/config.el index ec719c6b6..6c943085f 100644 --- a/modules/lang/cc/config.el +++ b/modules/lang/cc/config.el @@ -17,7 +17,7 @@ This is ignored by ccls.") `((c-mode . nil) (c++-mode . ,(list "-std=c++1z" ; use C++17 draft by default - (when IS-MAC + (when (featurep :os 'macos) ;; NOTE beware: you'll get abi-inconsistencies when passing ;; std-objects to libraries linked with libstdc++ (e.g. if you ;; use boost which wasn't compiled with libc++) @@ -67,7 +67,7 @@ This is ignored by ccls.") :return "return" :yield "#require") - (when (featurep! +tree-sitter) + (when (modulep! +tree-sitter) (add-hook! '(c-mode-local-vars-hook c++-mode-local-vars-hook) :append #'tree-sitter!)) @@ -125,7 +125,7 @@ This is ignored by ccls.") (use-package! irony - :unless (featurep! +lsp) + :unless (modulep! +lsp) :commands irony-install-server ;; Initialize compilation database, if present. Otherwise, fall back on ;; `+cc-default-compiler-options'. @@ -146,11 +146,11 @@ This is ignored by ccls.") :hook (irony-mode . irony-eldoc)) (use-package! flycheck-irony - :when (featurep! :checkers syntax) + :when (modulep! :checkers syntax) :config (flycheck-irony-setup)) (use-package! company-irony - :when (featurep! :completion company) + :when (modulep! :completion company) :init (set-company-backend! 'irony-mode '(:separate company-irony-c-headers company-irony)) :config (require 'company-irony-c-headers))) @@ -166,7 +166,7 @@ This is ignored by ccls.") (use-package! company-cmake ; for `cmake-mode' - :when (featurep! :completion company) + :when (modulep! :completion company) :after cmake-mode :config (set-company-backend! 'cmake-mode 'company-cmake)) @@ -176,7 +176,7 @@ This is ignored by ccls.") (use-package! company-glsl ; for `glsl-mode' - :when (featurep! :completion company) + :when (modulep! :completion company) :after glsl-mode :config (set-company-backend! 'glsl-mode 'company-glsl)) @@ -185,7 +185,7 @@ This is ignored by ccls.") ;; Rtags Support (use-package! rtags - :unless (featurep! +lsp) + :unless (modulep! +lsp) ;; Only initialize rtags-mode if rtags and rdm are available. :hook ((c-mode-local-vars c++-mode-local-vars objc-mode-local-vars) . +cc-init-rtags-maybe-h) :preface (setq rtags-install-path (concat doom-etc-dir "rtags/")) @@ -201,8 +201,8 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e rtags-use-bookmarks nil rtags-completions-enabled nil rtags-display-result-backend - (cond ((featurep! :completion ivy) 'ivy) - ((featurep! :completion helm) 'helm) + (cond ((modulep! :completion ivy) 'ivy) + ((modulep! :completion helm) 'helm) ('default)) ;; These executables are named rtags-* on debian rtags-rc-binary-name @@ -235,7 +235,7 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e ;; ;; LSP -(when (featurep! +lsp) +(when (modulep! +lsp) (add-hook! '(c-mode-local-vars-hook c++-mode-local-vars-hook objc-mode-local-vars-hook @@ -261,7 +261,7 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e :desc "References (Read)" "r" #'+cc/ccls-show-references-read :desc "References (Write)" "w" #'+cc/ccls-show-references-write))) - (when (featurep! :tools lsp +eglot) + (when (modulep! :tools lsp +eglot) ;; Map eglot specific helper (map! :localleader :after cc-mode @@ -270,8 +270,7 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e ;; NOTE : This setting is untested yet (after! eglot - ;; IS-MAC custom configuration - (when IS-MAC + (when (featurep :os 'macos) (add-to-list 'eglot-workspace-configuration `((:ccls . ((:clang . ,(list :extraArgs ["-isystem/Library/Developer/CommandLineTools/usr/include/c++/v1" "-isystem/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include" @@ -279,8 +278,8 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e :resourceDir (cdr (doom-call-process "clang" "-print-resource-dir")))))))))))) (use-package! ccls - :when (featurep! +lsp) - :unless (featurep! :tools lsp +eglot) + :when (modulep! +lsp) + :unless (modulep! :tools lsp +eglot) :defer t :init (defvar ccls-sem-highlight-method 'font-lock) @@ -298,11 +297,12 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e (setq-hook! 'lsp-configure-hook ccls-sem-highlight-method (if lsp-enable-semantic-highlighting ccls-sem-highlight-method)) - (when (or IS-MAC IS-LINUX) + (when (or (featurep :os 'macos) + (featurep :os 'linux)) (setq ccls-initialization-options `(:index (:trackDependency 1 :threads ,(max 1 (/ (doom-system-cpus) 2)))))) - (when IS-MAC + (when (featurep :os 'macos) (setq ccls-initialization-options (append ccls-initialization-options `(:clang ,(list :extraArgs ["-isystem/Library/Developer/CommandLineTools/usr/include/c++/v1" diff --git a/modules/lang/cc/doctor.el b/modules/lang/cc/doctor.el index 8cb6f9e87..f9d2ee687 100644 --- a/modules/lang/cc/doctor.el +++ b/modules/lang/cc/doctor.el @@ -1,12 +1,12 @@ ;; -*- lexical-binding: t; no-byte-compile: t; -*- ;;; lang/cc/doctor.el -(assert! (or (not (featurep! +lsp)) - (featurep! :tools lsp)) +(assert! (or (not (modulep! +lsp)) + (modulep! :tools lsp)) "This module requires (:tools lsp)") -(assert! (or (not (featurep! +tree-sitter)) - (featurep! :tools tree-sitter)) +(assert! (or (not (modulep! +tree-sitter)) + (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") (when (require 'rtags nil t) @@ -22,7 +22,7 @@ (unless (file-directory-p irony-server-install-prefix) (warn! "Irony server isn't installed. Run M-x irony-install-server"))) -(when (featurep! :completion company) +(when (modulep! :completion company) ;; glslangValidator (unless (executable-find "glslangValidator") (warn! "Couldn't find glslangValidator. GLSL code completion is disabled"))) diff --git a/modules/lang/cc/packages.el b/modules/lang/cc/packages.el index d7741e4de..d4170081c 100644 --- a/modules/lang/cc/packages.el +++ b/modules/lang/cc/packages.el @@ -11,24 +11,24 @@ (package! opencl-mode :pin "15091eff92c33ee0d1ece40eb99299ef79fee92d") (when (package! glsl-mode :pin "9b2e5f28e489a1f73c4aed734105618ac0dc0c43") - (when (featurep! :completion company) + (when (modulep! :completion company) (package! company-glsl :recipe (:host github :repo "Kaali/company-glsl") :pin "404cd0694ab34971f9c01eb22126cd2e7d3f9dc4"))) -(if (featurep! +lsp) - (unless (featurep! :tools lsp +eglot) +(if (modulep! +lsp) + (unless (modulep! :tools lsp +eglot) ;; ccls package is necessary only for lsp-mode. (package! ccls :pin "675a5704c14a27931e835a431beea3631d92e8e6")) (when (package! irony :pin "870d1576fb279bb93f776a71e65f45283c423a9e") (package! irony-eldoc :pin "73e79a89fad982a2ba072f2fcc1b4e41f0aa2978") - (when (featurep! :checkers syntax) + (when (modulep! :checkers syntax) (package! flycheck-irony :pin "42dbecd4a865cabeb301193bb4d660e26ae3befe")) - (when (featurep! :completion company) + (when (modulep! :completion company) (package! company-irony :pin "b44711dfce445610c1ffaec4951c6ff3882b216a") (package! company-irony-c-headers :pin "72c386aeb079fb261d9ec02e39211272f76bbd97"))) (when (package! rtags :pin "db39790fda5c2443bc790b8971ac140914f7e9c2") - (when (featurep! :completion ivy) + (when (modulep! :completion ivy) (package! ivy-rtags)) - (when (featurep! :completion helm) + (when (modulep! :completion helm) (package! helm-rtags)))) diff --git a/modules/lang/clojure/config.el b/modules/lang/clojure/config.el index 545d1bffd..edd5d9d12 100644 --- a/modules/lang/clojure/config.el +++ b/modules/lang/clojure/config.el @@ -14,7 +14,7 @@ (use-package! clojure-mode :hook (clojure-mode . rainbow-delimiters-mode) :config - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook! '(clojure-mode-local-vars-hook clojurec-mode-local-vars-hook clojurescript-mode-local-vars-hook) @@ -48,7 +48,7 @@ (add-transient-hook! #'cider-stacktrace-render-cause (cider--stacktrace-adapt-to-theme)) :config (add-hook 'cider-mode-hook #'eldoc-mode) - (unless (featurep! +lsp) + (unless (modulep! +lsp) (set-lookup-handlers! '(cider-mode cider-repl-mode) :definition #'+clojure-cider-lookup-definition :documentation #'cider-doc)) @@ -82,7 +82,7 @@ ;; See https://github.com/clojure-emacs/cider/issues/1872 cider-repl-pop-to-buffer-on-connect 'display-only) - (when (featurep! +lsp) + (when (modulep! +lsp) (setq cider-eldoc-display-for-symbol-at-point nil cider-font-lock-dynamically nil) (add-hook! 'cider-mode-hook @@ -111,7 +111,7 @@ (evil-make-overriding-map cider--debug-mode-map 'normal) (evil-normalize-keymaps)))) - (when (featurep! :ui modeline +light) + (when (modulep! :ui modeline +light) (defvar-local cider-modeline-icon nil) (defun +clojure--cider-set-modeline (face label) @@ -150,7 +150,7 @@ (+clojure--cider-set-modeline 'success "Cider syncronized")))) ;; Ensure that CIDER is used for sessions in org buffers. - (when (featurep! :lang org) + (when (modulep! :lang org) (after! ob-clojure (setq! org-babel-clojure-backend 'cider))) @@ -221,7 +221,7 @@ "s" #'cider-test-run-ns-tests-with-filters "t" #'cider-test-run-test))) - (:when (featurep! :editor evil +everywhere) + (:when (modulep! :editor evil +everywhere) :map cider-repl-mode-map :i [S-return] #'cider-repl-newline-and-indent :i [M-return] #'cider-repl-return @@ -243,10 +243,10 @@ (use-package! clj-refactor :hook (clojure-mode . clj-refactor-mode) :config - (unless (featurep! +lsp) + (unless (modulep! +lsp) (set-lookup-handlers! 'clj-refactor-mode :references #'cljr-find-usages)) - (when (featurep! +lsp) + (when (modulep! +lsp) (setq cljr-add-ns-to-blank-clj-files nil)) (map! :map clojure-mode-map :localleader @@ -255,6 +255,6 @@ ;; clojure-lsp already uses clj-kondo under the hood (use-package! flycheck-clj-kondo - :when (and (featurep! :checkers syntax) - (not (featurep! +lsp))) + :when (and (modulep! :checkers syntax) + (not (modulep! +lsp))) :after flycheck) diff --git a/modules/lang/clojure/doctor.el b/modules/lang/clojure/doctor.el index 0e973ce24..dff17429e 100644 --- a/modules/lang/clojure/doctor.el +++ b/modules/lang/clojure/doctor.el @@ -1,7 +1,7 @@ ;; -*- lexical-binding: t; no-byte-compile: t; -*- ;;; lang/clojure/doctor.el -(when (and (featurep! :checkers syntax) - (not (featurep! +lsp))) +(when (and (modulep! :checkers syntax) + (not (modulep! +lsp))) (unless (executable-find "clj-kondo") (warn! "Couldn't find clj-kondo. flycheck-clj-kondo will not work."))) diff --git a/modules/lang/clojure/packages.el b/modules/lang/clojure/packages.el index 026f2e797..547b7cd3b 100644 --- a/modules/lang/clojure/packages.el +++ b/modules/lang/clojure/packages.el @@ -17,5 +17,5 @@ (package! clojure-mode :pin "b6f41d74904daa9312648f3a7bea7a72fd8e140b") (package! clj-refactor :pin "f368c56c83843396b160440f472a661a3b639862") (package! cider :pin "b9e1cc26e2afda003a4b6c1f2a26e04f1c45f3d0") -(when (featurep! :checkers syntax) +(when (modulep! :checkers syntax) (package! flycheck-clj-kondo :pin "ff7bed2315755cfe02ef471edf522e27b78cd5ca")) diff --git a/modules/lang/common-lisp/config.el b/modules/lang/common-lisp/config.el index 897a682e7..91a0f5727 100644 --- a/modules/lang/common-lisp/config.el +++ b/modules/lang/common-lisp/config.el @@ -152,7 +152,7 @@ :desc "Toggle (fancy)" "T" #'sly-toggle-fancy-trace :desc "Untrace all" "u" #'sly-untrace-all))) - (when (featurep! :editor evil +everywhere) + (when (modulep! :editor evil +everywhere) (add-hook 'sly-mode-hook #'evil-normalize-keymaps))) diff --git a/modules/lang/coq/config.el b/modules/lang/coq/config.el index 80700aa36..18b2b0147 100644 --- a/modules/lang/coq/config.el +++ b/modules/lang/coq/config.el @@ -71,7 +71,7 @@ (setq company-coq-disabled-features '(hello company-defaults spinner)) - (if (featurep! :completion company) + (if (modulep! :completion company) (define-key coq-mode-map [remap company-complete-common] #'company-indent-or-complete-common) ;; `company-coq''s company defaults impose idle-completion on folks, so diff --git a/modules/lang/crystal/config.el b/modules/lang/crystal/config.el index 036fab212..aceb5ed58 100644 --- a/modules/lang/crystal/config.el +++ b/modules/lang/crystal/config.el @@ -4,7 +4,7 @@ (set-lookup-handlers! 'crystal-mode :definition #'crystal-def-jump :references #'crystal-tool-imp) - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'crystal-mode-local-vars-hook #'lsp! 'append)) (map! :localleader :map crystal-mode-map @@ -16,12 +16,12 @@ (use-package! flycheck-crystal - :when (featurep! :checkers syntax) + :when (modulep! :checkers syntax) :after crystal-mode) (use-package! flycheck-ameba - :when (featurep! :checkers syntax) + :when (modulep! :checkers syntax) :after crystal-mode :config (flycheck-ameba-setup)) diff --git a/modules/lang/crystal/packages.el b/modules/lang/crystal/packages.el index 46b0d9f40..179329deb 100644 --- a/modules/lang/crystal/packages.el +++ b/modules/lang/crystal/packages.el @@ -3,6 +3,6 @@ (package! crystal-mode :pin "96a8058205b24b513d0b9307db32f05e30f9570b") (package! inf-crystal :pin "02007b2a2a3bea44902d7c83c4acba1e39d278e3") -(when (featurep! :checkers syntax) +(when (modulep! :checkers syntax) (package! flycheck-crystal :pin "96a8058205b24b513d0b9307db32f05e30f9570b") (package! flycheck-ameba :pin "0c4925ae0e998818326adcb47ed27ddf9761c7dc")) diff --git a/modules/lang/csharp/config.el b/modules/lang/csharp/config.el index e018a6984..ed9970f7a 100644 --- a/modules/lang/csharp/config.el +++ b/modules/lang/csharp/config.el @@ -32,10 +32,10 @@ :when '(+csharp-sp-point-in-type-p) :post-handlers '(("| " "SPC"))) - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'csharp-mode-local-vars-hook #'lsp! 'append)) - (when (featurep! +tree-sitter) + (when (modulep! +tree-sitter) (add-hook 'csharp-mode-local-vars-hook #'tree-sitter! 'append)) (defadvice! +csharp-disable-clear-string-fences-a (fn &rest args) @@ -49,7 +49,7 @@ or terminating simple string." ;; Unity shaders (use-package! shader-mode - :when (featurep! +unity) + :when (modulep! +unity) :mode "\\.shader\\'" :config (def-project-mode! +csharp-unity-mode @@ -58,7 +58,7 @@ or terminating simple string." (use-package! sharper - :when (featurep! +dotnet) + :when (modulep! +dotnet) :general ("C-c d" #'sharper-main-transient) :config (map! (:map sharper--solution-management-mode-map diff --git a/modules/lang/csharp/doctor.el b/modules/lang/csharp/doctor.el index 35592ca3e..e11ceb459 100644 --- a/modules/lang/csharp/doctor.el +++ b/modules/lang/csharp/doctor.el @@ -1,11 +1,11 @@ ;; -*- lexical-binding: t; no-byte-compile: t; -*- ;;; lang/csharp/doctor.el -(when (and (require 'omnisharp nil t) (not (featurep! +lsp))) +(when (and (require 'omnisharp nil t) (not (modulep! +lsp))) (let ((omnisharp-bin (or omnisharp-server-executable-path (omnisharp--server-installation-path t)))) (unless (file-exists-p omnisharp-bin) (warn! "Omnisharp server isn't installed, completion won't work")))) -(assert! (or (not (featurep! +tree-sitter)) - (featurep! :tools tree-sitter)) +(assert! (or (not (modulep! +tree-sitter)) + (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") diff --git a/modules/lang/csharp/packages.el b/modules/lang/csharp/packages.el index 98fc41cd8..4db62056d 100644 --- a/modules/lang/csharp/packages.el +++ b/modules/lang/csharp/packages.el @@ -4,7 +4,7 @@ (package! csharp-mode :pin "856ecbc0a78ae3bdc2db2ae4d16be43e2d9d9c5e") (package! csproj-mode :pin "a7f0f4610c976a28c41b9b8299892f88b5d0336c") (package! sln-mode :pin "0f91d1b957c7d2a7bab9278ec57b54d57f1dbd9c") -(when (featurep! +unity) +(when (modulep! +unity) (package! shader-mode :pin "d7dc8d0d6fe8914e8b6d5cf2081ad61e6952359c")) -(when (featurep! +dotnet) +(when (modulep! +dotnet) (package! sharper :pin "96edd4a1dbc267afdff0cb97298d1b05b7c2080c")) diff --git a/modules/lang/dart/config.el b/modules/lang/dart/config.el index 90fe2f048..d5b9176c6 100644 --- a/modules/lang/dart/config.el +++ b/modules/lang/dart/config.el @@ -3,7 +3,7 @@ (use-package! dart-mode :defer t :config - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'dart-mode-local-vars-hook #'lsp! 'append)) (set-ligatures! '(dart-mode) ;; Functional @@ -27,7 +27,7 @@ (use-package! flutter - :when (featurep! +flutter) + :when (modulep! +flutter) :defer t :init (map! :after dart-mode @@ -41,7 +41,7 @@ (use-package! lsp-dart - :when (featurep! +lsp) + :when (modulep! +lsp) :defer t :config (map! :map dart-mode-map @@ -55,7 +55,7 @@ (use-package! hover - :when (featurep! +flutter) + :when (modulep! +flutter) :defer t :config (map! :map dart-mode-map diff --git a/modules/lang/dart/doctor.el b/modules/lang/dart/doctor.el index 52b2abda0..74b43a676 100644 --- a/modules/lang/dart/doctor.el +++ b/modules/lang/dart/doctor.el @@ -1,7 +1,7 @@ ;;; lang/dart/doctor.el -*- lexical-binding: t; -*- -(assert! (or (not (featurep! +lsp)) - (featurep! :tools lsp)) +(assert! (or (not (modulep! +lsp)) + (modulep! :tools lsp)) "This module requires (:tools lsp)") (unless (executable-find "dart") diff --git a/modules/lang/dart/packages.el b/modules/lang/dart/packages.el index cee79c45e..814980a02 100644 --- a/modules/lang/dart/packages.el +++ b/modules/lang/dart/packages.el @@ -3,9 +3,9 @@ (package! dart-mode :pin "3bac14200f9f8f8fcebc383087572da5c3823c34") -(when (featurep! +lsp) +(when (modulep! +lsp) (package! lsp-dart :pin "fda433671f38874f0ebe66c43c64fec14af3f492")) -(when (featurep! +flutter) +(when (modulep! +flutter) (package! flutter :pin "08138f8c95488aaf315a1f5d52c33deb8d28672b") (package! hover :pin "4ca0638a14a8b304ac2b46e7b342b8d8732ad199")) diff --git a/modules/lang/dhall/config.el b/modules/lang/dhall/config.el index 11896dca2..072491700 100644 --- a/modules/lang/dhall/config.el +++ b/modules/lang/dhall/config.el @@ -4,7 +4,7 @@ :defer t :config (set-repl-handler! 'dhall-mode #'dhall-repl-show) - (setq dhall-format-at-save (featurep! :editor format +onsave)) + (setq dhall-format-at-save (modulep! :editor format +onsave)) (map! :map dhall-mode-map :localleader "l" #'dhall-lint diff --git a/modules/lang/elixir/config.el b/modules/lang/elixir/config.el index f6cffb5df..93f39e4d1 100644 --- a/modules/lang/elixir/config.el +++ b/modules/lang/elixir/config.el @@ -36,12 +36,12 @@ (sp-local-pair "do " " end" :unless '(sp-in-comment-p sp-in-string-p)) (sp-local-pair "fn " " end" :unless '(sp-in-comment-p sp-in-string-p))) - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'elixir-mode-local-vars-hook #'lsp! 'append) (after! lsp-mode (add-to-list 'lsp-file-watch-ignored-directories "[/\\\\]_build\\'"))) - (when (featurep! +tree-sitter) + (when (modulep! +tree-sitter) (add-hook 'elixir-mode-local-vars-hook #'tree-sitter! 'append)) (after! highlight-numbers @@ -51,7 +51,7 @@ (use-package! flycheck-credo - :when (featurep! :checkers syntax) + :when (modulep! :checkers syntax) :after elixir-mode :config (flycheck-credo-setup)) @@ -79,7 +79,7 @@ (use-package! alchemist-company - :when (featurep! :completion company) + :when (modulep! :completion company) :commands alchemist-company :config (set-company-backend! 'alchemist-mode '(alchemist-company company-yasnippet)) diff --git a/modules/lang/elixir/doctor.el b/modules/lang/elixir/doctor.el index cb0e825e0..2c0306692 100644 --- a/modules/lang/elixir/doctor.el +++ b/modules/lang/elixir/doctor.el @@ -1,6 +1,6 @@ ;; -*- lexical-binding: t; no-byte-compile: t; -*- ;;; lang/elixir/doctor.el -(assert! (or (not (featurep! +tree-sitter)) - (featurep! :tools tree-sitter)) +(assert! (or (not (modulep! +tree-sitter)) + (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") diff --git a/modules/lang/elixir/packages.el b/modules/lang/elixir/packages.el index 4235073b4..7ef95760b 100644 --- a/modules/lang/elixir/packages.el +++ b/modules/lang/elixir/packages.el @@ -5,5 +5,5 @@ (package! elixir-mode :pin "e0d0466d83ec80ddb412bb1473908a21baad1ec3") (package! alchemist :pin "6f99367511ae209f8fe2c990779764bbb4ccb6ed") (package! exunit :pin "0715c2dc2dca0b56c61330eda0690f90cca5f98b") -(when (featurep! :checkers syntax) +(when (modulep! :checkers syntax) (package! flycheck-credo :pin "e88f11ead53805c361ec7706e44c3dfee1daa19f")) diff --git a/modules/lang/elm/config.el b/modules/lang/elm/config.el index 8e216d0f2..7c5d29300 100644 --- a/modules/lang/elm/config.el +++ b/modules/lang/elm/config.el @@ -1,11 +1,11 @@ ;;; lang/elm/config.el -*- lexical-binding: t; -*- (after! elm-mode - (if (featurep! +lsp) + (if (modulep! +lsp) (add-hook 'elm-mode-local-vars-hook #'lsp! 'append) (set-company-backend! 'elm-mode 'company-elm)) - (when (featurep! +tree-sitter) + (when (modulep! +tree-sitter) (add-hook 'elm-mode-local-vars-hook #'tree-sitter! 'append)) (set-repl-handler! 'elm-mode #'run-elm-interactive) @@ -21,6 +21,6 @@ (use-package! flycheck-elm - :when (featurep! :checkers syntax) + :when (modulep! :checkers syntax) :after elm-mode :config (add-to-list 'flycheck-checkers 'elm)) diff --git a/modules/lang/elm/doctor.el b/modules/lang/elm/doctor.el index 73c309eed..37e3272b3 100644 --- a/modules/lang/elm/doctor.el +++ b/modules/lang/elm/doctor.el @@ -1,5 +1,5 @@ ;;; lang/elm/doctor.el -*- lexical-binding: t; -*- -(assert! (or (not (featurep! +tree-sitter)) - (featurep! :tools tree-sitter)) +(assert! (or (not (modulep! +tree-sitter)) + (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") diff --git a/modules/lang/elm/packages.el b/modules/lang/elm/packages.el index da2f82e29..61a99bbc0 100644 --- a/modules/lang/elm/packages.el +++ b/modules/lang/elm/packages.el @@ -2,5 +2,5 @@ ;;; lang/elm/packages.el (package! elm-mode :pin "d4e434fa1857ba2f58d27c7520ebeac0515cd140") -(when (featurep! :checkers syntax) +(when (modulep! :checkers syntax) (package! flycheck-elm :pin "1b60050efd4729bfba548f3e5adbcb58436667cb")) diff --git a/modules/lang/emacs-lisp/config.el b/modules/lang/emacs-lisp/config.el index 786ae10a3..b9a9befbb 100644 --- a/modules/lang/emacs-lisp/config.el +++ b/modules/lang/emacs-lisp/config.el @@ -171,7 +171,7 @@ employed so that flycheck still does *some* helpful linting.") (use-package! flycheck-cask - :when (featurep! :checkers syntax) + :when (modulep! :checkers syntax) :defer t :init (add-hook! 'emacs-lisp-mode-hook @@ -179,7 +179,7 @@ employed so that flycheck still does *some* helpful linting.") (use-package! flycheck-package - :when (featurep! :checkers syntax) + :when (modulep! :checkers syntax) :after flycheck :config (flycheck-package-setup)) diff --git a/modules/lang/emacs-lisp/demos.org b/modules/lang/emacs-lisp/demos.org index 90ffce168..2e43ce4d1 100644 --- a/modules/lang/emacs-lisp/demos.org +++ b/modules/lang/emacs-lisp/demos.org @@ -302,18 +302,18 @@ Or to create aliases for functions that behave differently: :added: pre-3.0.0 :END: #+begin_src emacs-lisp :eval no -(map! :i [tab] (cmds! (and (featurep! :editor snippets) +(map! :i [tab] (cmds! (and (modulep! :editor snippets) (bound-and-true-p yas-minor-mode) (yas-maybe-expand-abbrev-key-filter 'yas-expand)) #'yas-expand - (featurep! :completion company +tng) + (modulep! :completion company +tng) #'company-indent-or-complete-common) :m [tab] (cmds! (and (bound-and-true-p yas-minor-mode) (evil-visual-state-p) (or (eq evil-visual-selection 'line) (not (memq (char-after) (list ?\( ?\[ ?\{ ?\} ?\] ?\)))))) #'yas-insert-snippet - (and (featurep! :editor fold) + (and (modulep! :editor fold) (save-excursion (end-of-line) (invisible-p (point)))) #'+fold/toggle (fboundp 'evil-jump-item) @@ -407,12 +407,12 @@ Or to create aliases for functions that behave differently: :n "M-s" 'some-fn :i "M-o" (cmd! (message "Hi")))) -(map! (:when (featurep! :completion company) ; Conditional loading +(map! (:when (modulep! :completion company) ; Conditional loading :i "C-@" #'+company/complete (:prefix "C-x" ; Use a prefix key :i "C-l" #'+company/whole-lines))) -(map! (:when (featurep! :lang latex) ; local conditional +(map! (:when (modulep! :lang latex) ; local conditional (:map LaTeX-mode-map :localleader ; Use local leader :desc "View" "v" #'TeX-view)) ; Add which-key description diff --git a/modules/lang/emacs-lisp/packages.el b/modules/lang/emacs-lisp/packages.el index 77d0517bd..c5947ff23 100644 --- a/modules/lang/emacs-lisp/packages.el +++ b/modules/lang/emacs-lisp/packages.el @@ -11,7 +11,7 @@ (package! overseer :pin "02d49f582e80e36b4334c9187801c5ecfb027789") (package! elisp-def :pin "dfca043ec0cbead67bd9c526cb009daf771d0fa2") (package! elisp-demos :pin "01c301b516e9949d0239d20f6834afbc9acf0abb") -(when (featurep! :checkers syntax) +(when (modulep! :checkers syntax) (package! flycheck-package :pin "615c1ed8c6fb7c73abec6aaa73d3fef498d231bc") (package! flycheck-cask :pin "4b2ede6362ded4a45678dfbef1876faa42edbd58")) diff --git a/modules/lang/erlang/config.el b/modules/lang/erlang/config.el index 7d604f87f..a686c7c35 100644 --- a/modules/lang/erlang/config.el +++ b/modules/lang/erlang/config.el @@ -5,5 +5,5 @@ :mode ("/rebar\\.config\\(?:\\.script\\)?\\'" . erlang-mode) :mode ("/\\(?:app\\|sys\\)\\.config\\'" . erlang-mode) :config - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'erlang-mode-local-vars-hook #'lsp! 'append))) diff --git a/modules/lang/erlang/doctor.el b/modules/lang/erlang/doctor.el index 90ac156f9..f442e8834 100644 --- a/modules/lang/erlang/doctor.el +++ b/modules/lang/erlang/doctor.el @@ -1,6 +1,6 @@ ;; -*- lexical-binding: t; no-byte-compile: t; -*- ;;; lang/erlang/doctor.el -(assert! (or (not (featurep! +lsp)) - (featurep! :tools lsp)) +(assert! (or (not (modulep! +lsp)) + (modulep! :tools lsp)) "This module requires (:tools lsp)") diff --git a/modules/lang/ess/config.el b/modules/lang/ess/config.el index 7d48da715..07060a774 100644 --- a/modules/lang/ess/config.el +++ b/modules/lang/ess/config.el @@ -10,17 +10,17 @@ (use-package! ess :commands stata SAS :init - (unless (featurep! :lang julia) + (unless (modulep! :lang julia) (add-to-list 'auto-mode-alist '("\\.jl\\'" . ess-julia-mode))) :config (setq ess-offset-continued 'straight - ess-use-flymake (not (featurep! :checkers syntax)) + ess-use-flymake (not (modulep! :checkers syntax)) ess-nuke-trailing-whitespace-p t ess-style 'DEFAULT ess-history-directory (expand-file-name "ess-history/" doom-cache-dir)) (set-docsets! 'ess-r-mode "R") - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'ess-r-mode-local-vars-hook #'lsp! 'append)) (set-repl-handler! 'ess-r-mode #'+ess/open-r-repl) @@ -92,15 +92,15 @@ (use-package! stan-mode - :when (featurep! +stan) + :when (modulep! +stan) :hook (stan-mode . stan-mode-setup) :hook (stan-mode . eldoc-stan-setup) :init (use-package! company-stan - :when (featurep! :completion company) + :when (modulep! :completion company) :hook (stan-mode . company-stan-setup)) (use-package! flycheck-stan - :when (featurep! :checkers syntax) + :when (modulep! :checkers syntax) :hook (stan-mode . flycheck-stan-stanc2-setup) :hook (stan-mode . flycheck-stan-stanc3-setup))) diff --git a/modules/lang/ess/packages.el b/modules/lang/ess/packages.el index 45493ba2b..5bb777b91 100644 --- a/modules/lang/ess/packages.el +++ b/modules/lang/ess/packages.el @@ -6,10 +6,10 @@ (package! polymode :pin "2094c92403fe395dfb2b8b2521da1012a966e9ab") (package! poly-R :pin "e4a39caaf48e1c2e5afab3865644267b10610537") -(when (featurep! +stan) +(when (modulep! +stan) (package! stan-mode :pin "150bbbe5fd3ad2b5a3dbfba9d291e66eeea1a581") (package! eldoc-stan :pin "150bbbe5fd3ad2b5a3dbfba9d291e66eeea1a581") - (when (featurep! :completion company) + (when (modulep! :completion company) (package! company-stan :pin "150bbbe5fd3ad2b5a3dbfba9d291e66eeea1a581")) - (when (featurep! :checkers syntax) + (when (modulep! :checkers syntax) (package! flycheck-stan :pin "150bbbe5fd3ad2b5a3dbfba9d291e66eeea1a581"))) diff --git a/modules/lang/fortran/autoload.el b/modules/lang/fortran/autoload.el index 86bceec67..8bf4443a6 100644 --- a/modules/lang/fortran/autoload.el +++ b/modules/lang/fortran/autoload.el @@ -12,7 +12,7 @@ building will occur with fpm. Otherwise it will default to ifort or gfortran, depending on what feature flags are set." (interactive) (cond ((+fortran--fpm-toml) (+fortran/fpm-build)) - ((featurep! +intel) (+fortran/ifort-compile)) + ((modulep! +intel) (+fortran/ifort-compile)) (t (+fortran/gfortran-compile)))) ;;;###autoload @@ -24,7 +24,7 @@ building will occur with fpm. Otherwise it will default to ifort or gfortran, depending on what feature flags are set." (interactive) (cond ((+fortran--fpm-toml) (+fortran/fpm-run)) - ((featurep! +intel) (+fortran/ifort-run)) + ((modulep! +intel) (+fortran/ifort-run)) (t (+fortran/gfortran-run)))) (defun +fortran--exec-name () diff --git a/modules/lang/fortran/config.el b/modules/lang/fortran/config.el index b51cb031b..a512d940f 100644 --- a/modules/lang/fortran/config.el +++ b/modules/lang/fortran/config.el @@ -8,7 +8,7 @@ :config ;; --- Compilation --- ;; ;; Used by `compile' (SPC c c) - (let ((cmd (cond ((featurep! +intel) "ifort ") + (let ((cmd (cond ((modulep! +intel) "ifort ") (t "gfortran ")))) (setq-hook! 'f90-mode-hook compile-command cmd @@ -16,7 +16,7 @@ (set-popup-rule! "^\\*fortran-compilation" :side 'right :size 0.5 :quit t) ;; --- LSP Configuration --- ;; - (when (featurep! +lsp) + (when (modulep! +lsp) (setq lsp-clients-fortls-args '("--enable_code_actions" "--hover_signature")) (add-hook 'f90-mode-local-vars-hook #'lsp! 'append)) @@ -33,7 +33,7 @@ :desc "build" "b" #'+fortran/build :desc "run" "r" #'+fortran/run) - (when (featurep! +intel) + (when (modulep! +intel) (map! :map f90-mode-map :localleader (:prefix ("i" . "ifort") @@ -57,7 +57,7 @@ ;; --- Compilation --- ;; ;; Used by `compile' (SPC c c) - (let ((cmd (cond ((featurep! +intel) "ifort ") + (let ((cmd (cond ((modulep! +intel) "ifort ") (t "gfortran -std=legacy ")))) (setq-hook! 'fortran-mode-hook compile-command cmd @@ -71,7 +71,7 @@ :desc "compile" "c" #'+fortran/gfortran-compile :desc "run" "r" #'+fortran/gfortran-run)) - (when (featurep! +intel) + (when (modulep! +intel) (map! :map fortran-mode-map :localleader (:prefix ("i" . "ifort") diff --git a/modules/lang/fortran/doctor.el b/modules/lang/fortran/doctor.el index 56373395e..27a12c0c9 100644 --- a/modules/lang/fortran/doctor.el +++ b/modules/lang/fortran/doctor.el @@ -1,22 +1,22 @@ ;; -*- lexical-binding: t; no-byte-compile: t; -*- ;;; lang/fortran/doctor.el -(assert! (or (not (featurep! +lsp)) - (featurep! :tools lsp)) +(assert! (or (not (modulep! +lsp)) + (modulep! :tools lsp)) "This module requires (:tools lsp)") -(when (and (featurep! +intel) +(when (and (modulep! +intel) (not (executable-find "ifort"))) (warn! "Couldn't find Intel ifort - compilation will not work.")) -(when (and (not (featurep! +intel)) +(when (and (not (modulep! +intel)) (not (executable-find "gfortran"))) (warn! "Couldn't find gfortran - compilation will not work.")) (unless (executable-find "fpm") (warn! "Couldn't find fpm - project building/testing will not work.")) -(when (featurep! +lsp) +(when (modulep! +lsp) (unless (executable-find "fortls") (warn! "Couldn't find fortls.")) (unless (executable-find "fprettify") diff --git a/modules/lang/fsharp/config.el b/modules/lang/fsharp/config.el index 257371c49..127f66840 100644 --- a/modules/lang/fsharp/config.el +++ b/modules/lang/fsharp/config.el @@ -3,7 +3,7 @@ (after! fsharp-mode (when (executable-find "dotnet") (setq inferior-fsharp-program "dotnet fsi --readline-")) - (if (featurep! +lsp) + (if (modulep! +lsp) (progn (setq fsharp-ac-intellisense-enabled nil) (add-hook 'fsharp-mode-local-vars-hook #'lsp! 'append)) @@ -16,6 +16,6 @@ "b" #'fsharp-ac/pop-gotodefn-stack ; Useful for re-tracing your steps "e" #'fsharp-eval-region "l" #'fsharp-load-buffer-file - (:unless (featurep! +lsp) + (:unless (modulep! +lsp) "q" #'fsharp-ac/stop-process "t" #'fsharp-ac/show-tooltip-at-point))) diff --git a/modules/lang/gdscript/config.el b/modules/lang/gdscript/config.el index 987642f27..9ab354a7b 100644 --- a/modules/lang/gdscript/config.el +++ b/modules/lang/gdscript/config.el @@ -13,7 +13,7 @@ (set-lookup-handlers! 'gdscript-mode :documentation #'gdscript-docs-browse-symbol-at-point) - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'gdscript-mode-local-vars-hook #'lsp! 'append)) (map! :localleader diff --git a/modules/lang/go/config.el b/modules/lang/go/config.el index 49f1f6996..d29b966ca 100644 --- a/modules/lang/go/config.el +++ b/modules/lang/go/config.el @@ -19,11 +19,11 @@ "gofmt" "goimports")))) - (if (featurep! +lsp) + (if (modulep! +lsp) (add-hook 'go-mode-local-vars-hook #'lsp! 'append) (add-hook 'go-mode-hook #'go-eldoc-setup)) - (when (featurep! +tree-sitter) + (when (modulep! +tree-sitter) (add-hook 'go-mode-local-vars-hook #'tree-sitter! 'append)) (map! :map go-mode-map @@ -70,13 +70,13 @@ (use-package! company-go - :when (featurep! :completion company) - :unless (featurep! +lsp) + :when (modulep! :completion company) + :unless (modulep! +lsp) :after go-mode :config (set-company-backend! 'go-mode 'company-go) (setq company-go-show-annotation t)) (use-package! flycheck-golangci-lint - :when (featurep! :checkers syntax) + :when (modulep! :checkers syntax) :hook (go-mode . flycheck-golangci-lint-setup)) diff --git a/modules/lang/go/doctor.el b/modules/lang/go/doctor.el index 1f8c18ff7..5ce6b331e 100644 --- a/modules/lang/go/doctor.el +++ b/modules/lang/go/doctor.el @@ -1,12 +1,12 @@ ;; -*- lexical-binding: t; no-byte-compile: t; -*- ;;; lang/go/doctor.el -(assert! (or (not (featurep! +lsp)) - (featurep! :tools lsp)) +(assert! (or (not (modulep! +lsp)) + (modulep! :tools lsp)) "This module requires (:tools lsp)") -(assert! (or (not (featurep! +tree-sitter)) - (featurep! :tools tree-sitter)) +(assert! (or (not (modulep! +tree-sitter)) + (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") (unless (executable-find "guru") @@ -21,12 +21,12 @@ (unless (executable-find "gomodifytags") (warn! "Couldn't find gomodifytags. Manipulating struct tags will not work")) -(when (and (featurep! :completion company) - (not (featurep! +lsp))) +(when (and (modulep! :completion company) + (not (modulep! +lsp))) (require 'company-go) (unless (executable-find company-go-gocode-command) (warn! "Couldn't find gocode. Code completion won't work"))) -(when (and (featurep! +lsp) +(when (and (modulep! +lsp) (not (executable-find "gopls"))) (warn! "Couldn't find gopls.")) diff --git a/modules/lang/go/packages.el b/modules/lang/go/packages.el index d5b6abf8c..2d0ab4850 100644 --- a/modules/lang/go/packages.el +++ b/modules/lang/go/packages.el @@ -8,8 +8,8 @@ (package! go-tag :pin "59b243f2fa079d9de9d56f6e2d94397e9560310a") (package! go-gen-test :pin "35df36dcd555233ee1a618c0f6a58ce6db4154d9") -(when (featurep! :completion company) +(when (modulep! :completion company) (package! company-go :pin "31948b463f2fc18f8801e5a8fe511fef300eb3dd")) -(when (featurep! :checkers syntax) +(when (modulep! :checkers syntax) (package! flycheck-golangci-lint :pin "8e446c68311048f0b87febf8ef0379e29d358851")) diff --git a/modules/lang/graphql/config.el b/modules/lang/graphql/config.el index 3fef3b415..4c222f269 100644 --- a/modules/lang/graphql/config.el +++ b/modules/lang/graphql/config.el @@ -13,7 +13,7 @@ '(all-the-icons-fileicon "graphql" :v-adjust -0.05 :face all-the-icons-rhodamine)) (setf (alist-get 'graphql-mode all-the-icons-mode-icon-alist) '(all-the-icons-fileicon "graphql" :v-adjust -0.05 :face all-the-icons-rhodamine))) - (if (featurep! +lsp) + (if (modulep! +lsp) (add-hook 'graphql-mode-local-vars-hook #'lsp! 'append) (set-company-backend! 'graphql-mode 'company-graphql)) diff --git a/modules/lang/graphql/packages.el b/modules/lang/graphql/packages.el index d07466cce..8f13c26e1 100644 --- a/modules/lang/graphql/packages.el +++ b/modules/lang/graphql/packages.el @@ -3,7 +3,7 @@ (package! graphql-mode :pin "9740e4027bd9313697d5cac5caaa5b15626ab1da") (package! graphql-doc :pin "d37140267e0c426c7c18aff31900aa1650257394") -(unless (featurep! +lsp) +(unless (modulep! +lsp) (package! company-graphql :recipe (:host github :repo "thaenalpha/company-graphql") :pin "aed9f5109e877944a895d08fc08bad103f03096b")) diff --git a/modules/lang/haskell/config.el b/modules/lang/haskell/config.el index d0f462efe..4d3888624 100644 --- a/modules/lang/haskell/config.el +++ b/modules/lang/haskell/config.el @@ -10,7 +10,7 @@ (after! haskell-mode (setq haskell-process-suggest-remove-import-lines t ; warnings for redundant imports etc haskell-process-auto-import-loaded-modules t - haskell-process-show-overlays (not (featurep! :checkers syntax))) ; redundant with flycheck + haskell-process-show-overlays (not (modulep! :checkers syntax))) ; redundant with flycheck (set-lookup-handlers! 'haskell-mode :definition #'haskell-mode-jump-to-def-or-tag) @@ -32,7 +32,7 @@ (map! :map haskell-mode-map :n "o" #'+haskell/evil-open-below :n "O" #'+haskell/evil-open-above - (:when (featurep! :tools lookup) + (:when (modulep! :tools lookup) [remap haskell-mode-jump-to-def-or-tag] #'+lookup/definition)) (map! :localleader @@ -44,7 +44,7 @@ (use-package! lsp-haskell - :when (featurep! +lsp) + :when (modulep! +lsp) :after lsp-mode :preface (add-hook 'haskell-mode-local-vars-hook #'lsp! 'append) :config diff --git a/modules/lang/haskell/doctor.el b/modules/lang/haskell/doctor.el index e15c1c435..aa86733dc 100644 --- a/modules/lang/haskell/doctor.el +++ b/modules/lang/haskell/doctor.el @@ -1,8 +1,8 @@ ;; -*- lexical-binding: t; no-byte-compile: t; -*- ;;; lang/haskell/doctor.el -(assert! (or (not (featurep! +lsp)) - (featurep! :tools lsp)) +(assert! (or (not (modulep! +lsp)) + (modulep! :tools lsp)) "This module requires (:tools lsp)") (unless (executable-find "cabal") @@ -11,17 +11,17 @@ (unless (executable-find "hoogle") (warn! "Couldn't find hoogle. Documentation searching will not work.")) -(unless (or (featurep! +lsp) +(unless (or (modulep! +lsp) (executable-find "hlint")) (warn! "Couldn't find hlint. Flycheck may have issues in haskell-mode. Install it or enable +lsp.")) -(when (and (featurep! :editor format) - (not (featurep! +lsp)) +(when (and (modulep! :editor format) + (not (modulep! +lsp)) (not (executable-find "brittany"))) (warn! "Couldn't find brittany. Code formatting will not work. Install it or enable +lsp.")) -(when (and (featurep! +lsp) +(when (and (modulep! +lsp) (not (executable-find "haskell-language-server-wrapper"))) (warn! "Couldn't find haskell-language-server.")) diff --git a/modules/lang/haskell/packages.el b/modules/lang/haskell/packages.el index 6c021ed54..e9ce57d0e 100644 --- a/modules/lang/haskell/packages.el +++ b/modules/lang/haskell/packages.el @@ -3,6 +3,6 @@ (package! haskell-mode :pin "cb573c8db5b856eb37473009f2c62e0717a1cd02") -(when (and (featurep! +lsp) - (not (featurep! :tools lsp +eglot))) +(when (and (modulep! +lsp) + (not (modulep! :tools lsp +eglot))) (package! lsp-haskell :pin "7cf64944ab3a25ea5d6f8d5e0cd33124182df991")) diff --git a/modules/lang/idris/config.el b/modules/lang/idris/config.el index f9e3f7bd2..9864a6ab1 100644 --- a/modules/lang/idris/config.el +++ b/modules/lang/idris/config.el @@ -2,7 +2,7 @@ (after! idris-mode (add-hook 'idris-mode-hook #'turn-on-idris-simple-indent) - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'idris-mode-hook #'lsp! 'append)) (set-repl-handler! 'idris-mode 'idris-pop-to-repl) (set-lookup-handlers! 'idris-mode diff --git a/modules/lang/java/+eclim.el b/modules/lang/java/+eclim.el index 5845b648d..f01093446 100644 --- a/modules/lang/java/+eclim.el +++ b/modules/lang/java/+eclim.el @@ -1,5 +1,5 @@ ;;; lang/java/+eclim.el -*- lexical-binding: t; -*- -;;;###if (featurep! +eclim) +;;;###if (modulep! +eclim) ;; NOTE This submodule is incomplete @@ -44,7 +44,7 @@ (use-package! company-emacs-eclim - :when (featurep! :completion company) + :when (modulep! :completion company) :after java-mode :config (set-company-backend! 'java-mode '(company-emacs-eclim))) diff --git a/modules/lang/java/+lsp.el b/modules/lang/java/+lsp.el index facf78b77..e60f10a8d 100644 --- a/modules/lang/java/+lsp.el +++ b/modules/lang/java/+lsp.el @@ -1,5 +1,5 @@ ;;; lang/java/+lsp.el -*- lexical-binding: t; -*- -;;;###if (and (featurep! +lsp) (not (featurep! :tools lsp +eglot))) +;;;###if (and (modulep! +lsp) (not (modulep! :tools lsp +eglot))) (use-package! lsp-java :after lsp-mode @@ -7,13 +7,13 @@ (setq lsp-java-workspace-dir (concat doom-etc-dir "java-workspace")) (add-hook 'java-mode-local-vars-hook #'lsp! 'append) :config - (when (featurep! :tools debugger +lsp) + (when (modulep! :tools debugger +lsp) (setq lsp-jt-root (concat lsp-java-server-install-dir "java-test/server/") dap-java-test-runner (concat lsp-java-server-install-dir "test-runner/junit-platform-console-standalone.jar")))) (use-package! dap-java - :when (featurep! :tools debugger +lsp) + :when (modulep! :tools debugger +lsp) :commands dap-java-run-test-class dap-java-debug-test-class :init (map! :after cc-mode ; where `java-mode' is defined diff --git a/modules/lang/java/+meghanada.el b/modules/lang/java/+meghanada.el index 94c067d6d..5a4a7963d 100644 --- a/modules/lang/java/+meghanada.el +++ b/modules/lang/java/+meghanada.el @@ -1,12 +1,12 @@ ;;; lang/java/+meghanada.el -*- lexical-binding: t; -*- -;;;###if (featurep! +meghanada) +;;;###if (modulep! +meghanada) (use-package! meghanada :hook (java-mode-local-vars . meghanada-mode) :init (setq meghanada-server-install-dir (concat doom-etc-dir "meghanada-server/") - meghanada-use-company (featurep! :completion company) - meghanada-use-flycheck (featurep! :checkers syntax) + meghanada-use-company (modulep! :completion company) + meghanada-use-flycheck (modulep! :checkers syntax) meghanada-use-eldoc t meghanada-use-auto-start t) diff --git a/modules/lang/java/autoload/lsp.el b/modules/lang/java/autoload/lsp.el index 9ead99284..d43e08d2a 100644 --- a/modules/lang/java/autoload/lsp.el +++ b/modules/lang/java/autoload/lsp.el @@ -1,5 +1,5 @@ ;;; lang/java/autoload/lsp.el -*- lexical-binding: t; -*- -;;;###if (featurep! :tools debugger +lsp) +;;;###if (modulep! :tools debugger +lsp) ;;;###autoload (defun +java/run-test () diff --git a/modules/lang/java/config.el b/modules/lang/java/config.el index 2d1c34735..20af39e04 100644 --- a/modules/lang/java/config.el +++ b/modules/lang/java/config.el @@ -26,11 +26,11 @@ If the depth is 2, the first two directories are removed: net.lissner.game.") (add-hook 'java-mode-hook #'rainbow-delimiters-mode) -(cond ((featurep! +meghanada) (load! "+meghanada")) - ((featurep! :tools lsp +eglot)) - ((featurep! +lsp) (load! "+lsp"))) +(cond ((modulep! +meghanada) (load! "+meghanada")) + ((modulep! :tools lsp +eglot)) + ((modulep! +lsp) (load! "+lsp"))) -(when (featurep! +tree-sitter) +(when (modulep! +tree-sitter) (add-hook 'java-mode-local-vars-hook #'tree-sitter! 'append)) diff --git a/modules/lang/java/doctor.el b/modules/lang/java/doctor.el index 13746350c..9e0a9a1aa 100644 --- a/modules/lang/java/doctor.el +++ b/modules/lang/java/doctor.el @@ -1,17 +1,17 @@ ;; -*- lexical-binding: t; no-byte-compile: t; -*- ;;; lang/java/doctor.el -(assert! (or (not (featurep! +lsp)) - (featurep! :tools lsp)) +(assert! (or (not (modulep! +lsp)) + (modulep! :tools lsp)) "This module requires (:tools lsp)") -(assert! (or (not (featurep! +tree-sitter)) - (featurep! :tools tree-sitter)) +(assert! (or (not (modulep! +tree-sitter)) + (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") (unless (executable-find "javac") (warn! "Couldn't find the javac executable, are you sure the JDK is installed?")) -(when (featurep! :editor format) +(when (modulep! :editor format) (unless (executable-find "clang-format") (warn! "Couldn't find clang-format. Code formatting will not work."))) diff --git a/modules/lang/java/packages.el b/modules/lang/java/packages.el index 0ab3a04cf..b87adfb1a 100644 --- a/modules/lang/java/packages.el +++ b/modules/lang/java/packages.el @@ -4,14 +4,14 @@ (package! android-mode :pin "d5332e339a1f5e30559a53feffb8442ca79265d6") (package! groovy-mode :pin "bf732d367b16887f81d404481c11ed1a58671d4e") -(when (featurep! +meghanada) +(when (modulep! +meghanada) (package! meghanada :pin "59c46cabb7eee715fe810ce59424934a1286df84")) -(when (featurep! +eclim) +(when (modulep! +eclim) (package! eclim :pin "222ddd48fcf0ee01592dec77c58e0cf3f2ea1100") - (when (featurep! :completion company) + (when (modulep! :completion company) (package! company-emacs-eclim :pin "222ddd48fcf0ee01592dec77c58e0cf3f2ea1100"))) -(when (featurep! +lsp) - (unless (featurep! :tools lsp +eglot) +(when (modulep! +lsp) + (unless (modulep! :tools lsp +eglot) (package! lsp-java :pin "0968038b9aea52ef3bf499e597cf3800d913c059"))) diff --git a/modules/lang/javascript/config.el b/modules/lang/javascript/config.el index 971d16220..82b4d94bf 100644 --- a/modules/lang/javascript/config.el +++ b/modules/lang/javascript/config.el @@ -74,7 +74,7 @@ js-switch-indent-offset js2-basic-offset) (use-package! xref-js2 - :when (featurep! :tools lookup) + :when (modulep! :tools lookup) :init (setq xref-js2-search-program 'rg) (set-lookup-handlers! 'rjsx-mode @@ -94,7 +94,7 @@ :hook (typescript-mode . rainbow-delimiters-mode) :hook (typescript-tsx-mode . rainbow-delimiters-mode) :init - (when (featurep! :lang web) + (when (modulep! :lang web) (autoload 'typescript-tsx-mode "typescript-mode" nil t)) ;; REVIEW We associate TSX files with `typescript-tsx-mode' derived from @@ -102,17 +102,17 @@ ;; JSX/TSX. See emacs-typescript/typescript.el#4 (add-to-list 'auto-mode-alist (cons "\\.tsx\\'" - (if (featurep! :lang web) + (if (modulep! :lang web) #'typescript-tsx-mode #'typescript-mode))) - (when (featurep! :checkers syntax) + (when (modulep! :checkers syntax) (after! flycheck (flycheck-add-mode 'javascript-eslint 'web-mode) (flycheck-add-mode 'javascript-eslint 'typescript-mode) (flycheck-add-mode 'javascript-eslint 'typescript-tsx-mode) (flycheck-add-mode 'typescript-tslint 'typescript-tsx-mode) - (unless (featurep! +lsp) + (unless (modulep! +lsp) (after! tide (flycheck-add-next-checker 'typescript-tide '(warning . javascript-eslint) 'append) (flycheck-add-mode 'typescript-tide 'typescript-tsx-mode))) @@ -125,10 +125,10 @@ :config (when (fboundp 'web-mode) (define-derived-mode typescript-tsx-mode web-mode "TypeScript-TSX") - (when (featurep! +lsp) + (when (modulep! +lsp) (after! lsp-mode (add-to-list 'lsp--formatting-indent-alist '(typescript-tsx-mode . typescript-indent-level)))) - (when (featurep! +tree-sitter) + (when (modulep! +tree-sitter) (after! evil-textobj-tree-sitter (pushnew! evil-textobj-tree-sitter-major-mode-language-alist '(typescript-tsx-mode . "tsx"))) (after! tree-sitter @@ -166,7 +166,7 @@ ;; ;;; Tools -(when (featurep! +tree-sitter) +(when (modulep! +tree-sitter) (add-hook! '(js2-mode-local-vars-hook typescript-mode-local-vars-hook typescript-tsx-mode-local-vars-hook @@ -192,7 +192,7 @@ to tide." ;; file-visiting buffer (add-hook 'after-save-hook #'+javascript-init-lsp-or-tide-maybe-h nil 'local) - (or (if (featurep! +lsp) (lsp!)) + (or (if (modulep! +lsp) (lsp!)) ;; fall back to tide (if (executable-find "node") (and (require 'tide nil t) @@ -267,7 +267,7 @@ to tide." (:prefix ("w" . "wrap")) (:prefix ("3" . "ternary")))) :config - (when (featurep! :editor evil +everywhere) + (when (modulep! :editor evil +everywhere) (add-hook 'js2-refactor-mode-hook #'evil-normalize-keymaps) (let ((js2-refactor-mode-map (evil-get-auxiliary-keymap js2-refactor-mode-map 'normal t t))) (js2r-add-keybindings-with-prefix (format "%s r" doom-localleader-key))))) diff --git a/modules/lang/javascript/doctor.el b/modules/lang/javascript/doctor.el index 087bde196..be3415c2d 100644 --- a/modules/lang/javascript/doctor.el +++ b/modules/lang/javascript/doctor.el @@ -1,10 +1,10 @@ ;; -*- lexical-binding: t; no-byte-compile: t; -*- ;;; lang/javascript/doctor.el -(assert! (or (not (featurep! +lsp)) - (featurep! :tools lsp)) +(assert! (or (not (modulep! +lsp)) + (modulep! :tools lsp)) "This module requires (:tools lsp)") -(assert! (or (not (featurep! +tree-sitter)) - (featurep! :tools tree-sitter)) +(assert! (or (not (modulep! +tree-sitter)) + (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") diff --git a/modules/lang/javascript/packages.el b/modules/lang/javascript/packages.el index aa85c35c0..54ab26dab 100644 --- a/modules/lang/javascript/packages.el +++ b/modules/lang/javascript/packages.el @@ -16,5 +16,5 @@ ;; Programming environment (package! tide :pin "b93e555858edc331ba33d1d8bd4582d578c7ca31") -(when (featurep! :tools lookup) +(when (modulep! :tools lookup) (package! xref-js2 :pin "fd6b723e7f1f9793d189a815e1904364dc026b03")) diff --git a/modules/lang/json/config.el b/modules/lang/json/config.el index 1428c55cf..cd789b2a0 100644 --- a/modules/lang/json/config.el +++ b/modules/lang/json/config.el @@ -3,9 +3,9 @@ (use-package! json-mode :mode "\\.js\\(?:on\\|[hl]int\\(?:rc\\)?\\)\\'" :init - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'json-mode-local-vars-hook #'lsp! 'append)) - (when (featurep! +tree-sitter) + (when (modulep! +tree-sitter) (add-hook! '(json-mode-local-vars-hook jsonc-mode-local-vars-hook) :append #'tree-sitter!)) @@ -26,7 +26,7 @@ (use-package! counsel-jq - :when (featurep! :completion ivy) + :when (modulep! :completion ivy) :defer t :init (map! :after json-mode diff --git a/modules/lang/json/doctor.el b/modules/lang/json/doctor.el index ce2226de7..2fa13890b 100644 --- a/modules/lang/json/doctor.el +++ b/modules/lang/json/doctor.el @@ -1,9 +1,9 @@ ;;; lang/json/doctor.el -*- lexical-binding: t; -*- -(when (and (featurep! :completion ivy) +(when (and (modulep! :completion ivy) (not (executable-find "jq"))) (warn! "Couldn't find jq. counsel-jq won't work." )) -(assert! (or (not (featurep! +tree-sitter)) - (featurep! :tools tree-sitter)) +(assert! (or (not (modulep! +tree-sitter)) + (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") diff --git a/modules/lang/json/packages.el b/modules/lang/json/packages.el index 653e5a101..e4b0ff3f8 100644 --- a/modules/lang/json/packages.el +++ b/modules/lang/json/packages.el @@ -3,5 +3,5 @@ (package! json-mode :pin "eedb4560034f795a7950fa07016bd4347c368873") (package! json-snatcher :pin "b28d1c0670636da6db508d03872d96ffddbc10f2") -(when (featurep! :completion ivy) +(when (modulep! :completion ivy) (package! counsel-jq :pin "8cadd2e96470402ede4881b4e955872976443689")) diff --git a/modules/lang/julia/config.el b/modules/lang/julia/config.el index 4602c378e..cb9273922 100644 --- a/modules/lang/julia/config.el +++ b/modules/lang/julia/config.el @@ -5,10 +5,10 @@ :config (set-repl-handler! 'julia-mode #'+julia/open-repl) - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'julia-mode-local-vars-hook #'lsp! 'append)) - (when (featurep! +tree-sitter) + (when (modulep! +tree-sitter) (add-hook 'julia-mode-local-vars-hook #'tree-sitter! 'append)) ;; Borrow matlab.el's fontification of math operators. From @@ -54,7 +54,7 @@ :config (set-popup-rule! "^\\*julia.*\\*$" :ttl nil) - (when (featurep! :ui workspaces) + (when (modulep! :ui workspaces) (defadvice! +julia--namespace-repl-buffer-to-workspace-a (&optional executable-key suffix) "Name for a Julia REPL inferior buffer. Uses workspace name for doom emacs" :override #'julia-repl--inferior-buffer-name @@ -72,8 +72,8 @@ (use-package! lsp-julia - :when (featurep! +lsp) - :unless (featurep! :tools lsp +eglot) + :when (modulep! +lsp) + :unless (modulep! :tools lsp +eglot) :after lsp-mode :preface (setq lsp-julia-default-environment nil) :init @@ -86,8 +86,8 @@ (use-package! eglot-jl - :when (featurep! +lsp) - :when (featurep! :tools lsp +eglot) + :when (modulep! +lsp) + :when (modulep! :tools lsp +eglot) :after eglot :preface ;; Prevent auto-install of LanguageServer.jl diff --git a/modules/lang/julia/doctor.el b/modules/lang/julia/doctor.el index 193faed09..536ff58a2 100644 --- a/modules/lang/julia/doctor.el +++ b/modules/lang/julia/doctor.el @@ -1,14 +1,14 @@ ;;; lang/julia/doctor.el -*- lexical-binding: t; -*- -(assert! (or (not (featurep! +lsp)) - (featurep! :tools lsp)) +(assert! (or (not (modulep! +lsp)) + (modulep! :tools lsp)) "This module requires (:tools lsp)") -(assert! (or (not (featurep! +tree-sitter)) - (featurep! :tools tree-sitter)) +(assert! (or (not (modulep! +tree-sitter)) + (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") -(when (featurep! +lsp) +(when (modulep! +lsp) (let ((args (cond ((require 'eglot-jl nil t) `(,eglot-jl-julia-command diff --git a/modules/lang/julia/packages.el b/modules/lang/julia/packages.el index 76afebd18..94b492ccd 100644 --- a/modules/lang/julia/packages.el +++ b/modules/lang/julia/packages.el @@ -4,7 +4,7 @@ (package! julia-mode :pin "47f43f7d839019cac3ba6559d93b29487ca118cb") (package! julia-repl :pin "6c1d63511fb2b3b3f2e342eff6a375d78be6c12c") -(when (featurep! +lsp) - (if (featurep! :tools lsp +eglot) +(when (modulep! +lsp) + (if (modulep! :tools lsp +eglot) (package! eglot-jl :pin "2e35cf9768d97a0429a72deddbe30d6d7722d454") (package! lsp-julia :pin "d6688bb131ff4a5a0201f6d3826ef0b018265389"))) diff --git a/modules/lang/kotlin/config.el b/modules/lang/kotlin/config.el index 3c95c9b96..23514f267 100644 --- a/modules/lang/kotlin/config.el +++ b/modules/lang/kotlin/config.el @@ -1,7 +1,7 @@ ;;; lang/kotlin/config.el -*- lexical-binding: t; -*- (after! kotlin-mode - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'kotlin-mode-local-vars-hook #'lsp! 'append)) (set-docsets! 'kotlin-mode "Kotlin") (set-repl-handler! 'kotlin-mode #'kotlin-repl) @@ -15,5 +15,5 @@ (use-package! flycheck-kotlin - :when (featurep! :checkers syntax) + :when (modulep! :checkers syntax) :hook (kotlin-mode . flycheck-kotlin-setup)) diff --git a/modules/lang/kotlin/doctor.el b/modules/lang/kotlin/doctor.el index 3e8451a82..837fb8928 100644 --- a/modules/lang/kotlin/doctor.el +++ b/modules/lang/kotlin/doctor.el @@ -3,6 +3,6 @@ (unless (executable-find "ktlint") (warn! "ktlint not found. flycheck-kotlin won't work.")) -(assert! (or (not (featurep! +lsp)) - (featurep! :tools lsp)) +(assert! (or (not (modulep! +lsp)) + (modulep! :tools lsp)) "This module requires (:tools lsp)") diff --git a/modules/lang/kotlin/packages.el b/modules/lang/kotlin/packages.el index 5b4102656..12a1504c1 100644 --- a/modules/lang/kotlin/packages.el +++ b/modules/lang/kotlin/packages.el @@ -3,5 +3,5 @@ (package! kotlin-mode :pin "3e0c34087ba4965a8bf08d3f27325f0a1e631bfb") -(when (featurep! :checkers syntax) +(when (modulep! :checkers syntax) (package! flycheck-kotlin :pin "bf1b398bdde128806a0a7479ebbe369bbaa40dae")) diff --git a/modules/lang/latex/+ref.el b/modules/lang/latex/+ref.el index c4a89e00a..ecfbc58a1 100644 --- a/modules/lang/latex/+ref.el +++ b/modules/lang/latex/+ref.el @@ -21,7 +21,7 @@ ;; This is needed when `reftex-cite-format' is set. See ;; https://superuser.com/a/1386206 LaTeX-reftex-cite-format-auto-activate nil) - (when (featurep! :editor evil) + (when (modulep! :editor evil) (add-hook 'reftex-mode-hook #'evil-normalize-keymaps)) (map! :map reftex-mode-map :localleader diff --git a/modules/lang/latex/+viewers.el b/modules/lang/latex/+viewers.el index d5ee9488f..e4c0787a3 100644 --- a/modules/lang/latex/+viewers.el +++ b/modules/lang/latex/+viewers.el @@ -38,7 +38,7 @@ (add-to-list 'TeX-view-program-selection '(output-pdf "Evince")))) (`pdf-tools - (when (featurep! :tools pdf) + (when (modulep! :tools pdf) (add-to-list 'TeX-view-program-selection '(output-pdf "PDF Tools")) (when IS-MAC ;; PDF Tools isn't in `TeX-view-program-list-builtin' on macs. diff --git a/modules/lang/latex/config.el b/modules/lang/latex/config.el index 4b924d619..3bc13b18b 100644 --- a/modules/lang/latex/config.el +++ b/modules/lang/latex/config.el @@ -98,7 +98,7 @@ If no viewer is found, `latex-preview-pane-mode' is used.") ;; quotes or not, via `+latex-enable-plain-double-quotes'. (sp-local-pair modes "``" nil :unless '(:add sp-in-math-p)))) ;; Hook LSP, if enabled. - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook! '(tex-mode-local-vars-hook latex-mode-local-vars-hook) :append #'lsp!)) @@ -116,7 +116,7 @@ If no viewer is found, `latex-preview-pane-mode' is used.") (use-package! tex-fold - :when (featurep! +fold) + :when (modulep! +fold) :hook (TeX-mode . +latex-TeX-fold-buffer-h) :hook (TeX-mode . TeX-fold-mode) :config @@ -128,7 +128,7 @@ If no viewer is found, `latex-preview-pane-mode' is used.") (advice-add #'cdlatex-math-symbol :after #'+latex-fold-last-macro-a) (advice-add #'cdlatex-math-modify :after #'+latex-fold-last-macro-a) ;; Fold after snippets. - (when (featurep! :editor snippets) + (when (modulep! :editor snippets) (add-hook! 'TeX-fold-mode-hook (defun +latex-fold-snippet-contents-h () (add-hook! 'yas-after-exit-snippet-hook :local @@ -207,7 +207,7 @@ Math faces should stay fixed by the mixed-pitch blacklist, this is mostly for (use-package! cdlatex - :when (featurep! +cdlatex) + :when (modulep! +cdlatex) :hook (LaTeX-mode . cdlatex-mode) :hook (org-mode . org-cdlatex-mode) :config @@ -225,7 +225,7 @@ Math faces should stay fixed by the mixed-pitch blacklist, this is mostly for "<" nil ;; TAB is used for CDLaTeX's snippets and navigation. But we have ;; Yasnippet for that. - (:when (featurep! :editor snippets) + (:when (modulep! :editor snippets) "TAB" nil) ;; AUCTeX takes care of auto-inserting {} on _^ if you want, with ;; `TeX-electric-sub-and-superscript'. @@ -242,7 +242,7 @@ Math faces should stay fixed by the mixed-pitch blacklist, this is mostly for (use-package! auctex-latexmk - :when (featurep! +latexmk) + :when (modulep! +latexmk) :after latex :init ;; Pass the -pdf flag when TeX-PDF-mode is active. @@ -255,12 +255,12 @@ Math faces should stay fixed by the mixed-pitch blacklist, this is mostly for (use-package! evil-tex - :when (featurep! :editor evil +everywhere) + :when (modulep! :editor evil +everywhere) :hook (LaTeX-mode . evil-tex-mode)) (use-package! company-auctex - :when (featurep! :completion company) + :when (modulep! :completion company) :defer t :init (add-to-list '+latex--company-backends #'company-auctex-environments nil #'eq) @@ -268,7 +268,7 @@ Math faces should stay fixed by the mixed-pitch blacklist, this is mostly for (use-package! company-math - :when (featurep! :completion company) + :when (modulep! :completion company) :defer t :init (add-to-list '+latex--company-backends #'+latex-symbols-company-backend nil #'eq)) diff --git a/modules/lang/latex/packages.el b/modules/lang/latex/packages.el index 132c934bd..f92f89033 100644 --- a/modules/lang/latex/packages.el +++ b/modules/lang/latex/packages.el @@ -7,20 +7,20 @@ :pin "830e40a0639aedc6c362a3a01e160aaa8246bb99") (package! adaptive-wrap :pin "0d5b4a07de76d87dd64333a566a8a0a845f2b9f0") (package! latex-preview-pane :pin "5297668a89996b50b2b62f99cba01cc544dbed2e") -(when (featurep! :editor evil +everywhere) +(when (modulep! :editor evil +everywhere) (package! evil-tex :pin "0fa85c3fc88d96621002b5a1b79efcc06776642f")) ;; Optional module features. -(when (featurep! +latexmk) +(when (modulep! +latexmk) (package! auctex-latexmk :pin "4d353522650d7685acbf1d38f7dbc504f734bd84")) -(when (featurep! +cdlatex) +(when (modulep! +cdlatex) (package! cdlatex :pin "8e963c68531f75e459e8ebe7a34fd3ba9d3729a0")) ;; Features according to other user selected options. -(when (featurep! :completion company) +(when (modulep! :completion company) (package! company-auctex :pin "9400a2ec7459dde8cbf1a5d50dfee4e300ed7e18") (package! company-reftex :pin "42eb98c6504e65989635d95ab81b65b9d5798e76") (package! company-math :pin "45778f5731c97a21a83e3b965cbde42018709afd")) diff --git a/modules/lang/lean/config.el b/modules/lang/lean/config.el index 8b9f36848..d706630f3 100644 --- a/modules/lang/lean/config.el +++ b/modules/lang/lean/config.el @@ -29,7 +29,7 @@ (use-package! company-lean - :when (featurep! :completion company) + :when (modulep! :completion company) :after lean-mode :init (advice-add #'company-lean-hook :override #'ignore) diff --git a/modules/lang/lean/packages.el b/modules/lang/lean/packages.el index 4279eb16d..4b298c3ee 100644 --- a/modules/lang/lean/packages.el +++ b/modules/lang/lean/packages.el @@ -3,5 +3,5 @@ (package! lean-mode :pin "c1c68cc946eb31b6ba8faefdceffce1f77ca52df") -(when (featurep! :completion company) +(when (modulep! :completion company) (package! company-lean :pin "c1c68cc946eb31b6ba8faefdceffce1f77ca52df")) diff --git a/modules/lang/ledger/config.el b/modules/lang/ledger/config.el index b9973e33c..8ba41f9d6 100644 --- a/modules/lang/ledger/config.el +++ b/modules/lang/ledger/config.el @@ -38,12 +38,12 @@ (use-package! flycheck-ledger - :when (featurep! :checkers syntax) + :when (modulep! :checkers syntax) :after ledger-mode) (use-package! evil-ledger - :when (featurep! :editor evil +everywhere) + :when (modulep! :editor evil +everywhere) :hook (ledger-mode . evil-ledger-mode) :config (set-evil-initial-state! 'ledger-report-mode 'normal) diff --git a/modules/lang/ledger/packages.el b/modules/lang/ledger/packages.el index aac7ccfd2..81325d772 100644 --- a/modules/lang/ledger/packages.el +++ b/modules/lang/ledger/packages.el @@ -3,8 +3,8 @@ (package! ledger-mode :pin "b55384d9cd14aa0ba3eb100660f929cfa6674558") -(when (featurep! :editor evil) +(when (modulep! :editor evil) (package! evil-ledger :pin "7a9f9f5d39c42fffdba8004f8982642351f2b233")) -(when (featurep! :checkers syntax) +(when (modulep! :checkers syntax) (package! flycheck-ledger :pin "628e25ba66604946085571652a94a54f4d1ad96f")) diff --git a/modules/lang/lua/autoload/lua.el b/modules/lang/lua/autoload/lua.el index 5f90178a5..1830cb9ff 100644 --- a/modules/lang/lua/autoload/lua.el +++ b/modules/lang/lua/autoload/lua.el @@ -17,7 +17,7 @@ Returns nil if 'love' executable can't be found." (if (doom-project-p) (file-name-directory (or (project-file-exists-p! (or "main.lua" "src/main.lua")) - (and (featurep! +moonscript) + (and (modulep! +moonscript) (project-file-exists-p! (or "main.moon" "src/main.moon"))) "")) ;; Since Love2D games are likely to be prototypes, they may not be in a @@ -26,7 +26,7 @@ Returns nil if 'love' executable can't be found." (or (projectile-locate-dominating-file default-directory "main.lua") (when-let (root (projectile-locate-dominating-file default-directory "src/main.lua")) (expand-file-name "src" root)) - (and (featurep! +moonscript) + (and (modulep! +moonscript) (or (projectile-locate-dominating-file default-directory "main.moon") (when-let (root (projectile-locate-dominating-file default-directory "src/main.moon")) (expand-file-name "src" root)))))))) diff --git a/modules/lang/lua/autoload/moonscript.el b/modules/lang/lua/autoload/moonscript.el index a3597db4c..a111fd9c5 100644 --- a/modules/lang/lua/autoload/moonscript.el +++ b/modules/lang/lua/autoload/moonscript.el @@ -1,5 +1,5 @@ ;;; lang/lua/autoload/moonscript.el -*- lexical-binding: t; -*- -;;;###if (featurep! +moonscript) +;;;###if (modulep! +moonscript) ;;;###autoload (defun +lua-moonscript-fix-single-quotes-h () diff --git a/modules/lang/lua/config.el b/modules/lang/lua/config.el index b332826ae..8e9f03520 100644 --- a/modules/lang/lua/config.el +++ b/modules/lang/lua/config.el @@ -18,10 +18,10 @@ (set-repl-handler! 'lua-mode #'+lua/open-repl) (set-company-backend! 'lua-mode '(company-lua company-yasnippet)) - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'lua-mode-local-vars-hook #'lsp! 'append) - (when (featurep! :tools lsp +eglot) + (when (modulep! :tools lsp +eglot) (defvar +lua-lsp-dir (concat doom-etc-dir "lsp/lua-language-server/") "Absolute path to the directory of sumneko's lua-language-server. @@ -34,9 +34,9 @@ lua-language-server.") ;; is a function is to dynamically change when/if `+lua-lsp-dir' does (list (or (executable-find "lua-language-server") (doom-path +lua-lsp-dir - (cond (IS-MAC "bin/macOS") - (IS-LINUX "bin/Linux") - (IS-WINDOWS "bin/Windows")) + (cond ((featurep :os 'macos) "bin/macOS") + ((featurep :os 'linux) "bin/Linux") + ((featurep :os 'windows) "bin/Windows")) "lua-language-server")) "-E" "-e" "LANG=en" (doom-path +lua-lsp-dir "main.lua"))) @@ -45,7 +45,7 @@ lua-language-server.") (use-package! moonscript - :when (featurep! +moonscript) + :when (modulep! +moonscript) :defer t :config (setq-hook! 'moonscript-mode-hook @@ -53,12 +53,12 @@ lua-language-server.") (add-hook! 'moonscript-mode-hook #'+lua-moonscript-fix-single-quotes-h #'+lua-moonscript-fontify-interpolation-h) - (when (featurep! :checkers syntax) + (when (modulep! :checkers syntax) (require 'flycheck-moonscript nil t))) (use-package! fennel-mode - :when (featurep! +fennel) + :when (modulep! +fennel) :defer t :config (set-lookup-handlers! 'fennel-mode diff --git a/modules/lang/lua/packages.el b/modules/lang/lua/packages.el index 915793798..9de8e8ff3 100644 --- a/modules/lang/lua/packages.el +++ b/modules/lang/lua/packages.el @@ -3,15 +3,15 @@ (package! lua-mode :pin "5a9bee8d5fc978dc64fcb677167417010321ba65") -(when (featurep! +moonscript) +(when (modulep! +moonscript) (package! moonscript :pin "56f90471e2ced2b0a177aed4d8c2f854797e9cc7") - (when (featurep! :checkers syntax) + (when (modulep! :checkers syntax) (package! flycheck-moonscript :recipe (:host github :repo "hlissner/emacs-flycheck-moonscript") :pin "fcb99e5efcf31db05f236f02eaa575986a57172d"))) -(when (featurep! +fennel) +(when (modulep! +fennel) (package! fennel-mode :pin "5664357349462d0564c0bb55cb289a6722f0ecbc")) -(when (featurep! :completion company) +(when (modulep! :completion company) (package! company-lua :pin "29f6819de4d691e5fd0b62893a9f4fbc1c6fcb52")) diff --git a/modules/lang/markdown/config.el b/modules/lang/markdown/config.el index a88456db2..6602d1339 100644 --- a/modules/lang/markdown/config.el +++ b/modules/lang/markdown/config.el @@ -68,7 +68,7 @@ capture, the end position, and the output buffer.") :unless '(:add sp-point-before-word-p sp-point-before-same-p)) ;; Highly rust blocks correctly - (when (featurep! :lang rust) + (when (modulep! :lang rust) (add-to-list 'markdown-code-lang-modes '("rust" . rustic-mode))) ;; Don't trigger autofill in code blocks (see `auto-fill-mode') @@ -89,7 +89,7 @@ capture, the end position, and the output buffer.") "o" #'markdown-open "p" #'markdown-preview "e" #'markdown-export - (:when (featurep! +grip) + (:when (modulep! +grip) "p" #'grip-mode) (:prefix ("i" . "insert") :desc "Table Of Content" "T" #'markdown-toc-generate-toc @@ -129,7 +129,7 @@ capture, the end position, and the output buffer.") (use-package! evil-markdown - :when (featurep! :editor evil +everywhere) + :when (modulep! :editor evil +everywhere) :hook (markdown-mode . evil-markdown-mode) :config (add-hook 'evil-markdown-mode-hook #'evil-normalize-keymaps) diff --git a/modules/lang/markdown/doctor.el b/modules/lang/markdown/doctor.el index 5f96fa53e..6d7fe28ff 100644 --- a/modules/lang/markdown/doctor.el +++ b/modules/lang/markdown/doctor.el @@ -17,6 +17,6 @@ (warn! "Couldn't find %S. markdown-preview command won't work" cmd)))))) -(when (featurep! +grip) +(when (modulep! +grip) (unless (executable-find "grip") (warn! "Couldn't find grip. grip-mode will not work"))) diff --git a/modules/lang/markdown/packages.el b/modules/lang/markdown/packages.el index 24e30a412..74714f794 100644 --- a/modules/lang/markdown/packages.el +++ b/modules/lang/markdown/packages.el @@ -5,10 +5,10 @@ (package! markdown-toc :pin "3d724e518a897343b5ede0b976d6fb46c46bcc01") (package! edit-indirect :pin "f80f63822ffae78de38dbe72cacaeb1aaa96c732") -(when (featurep! +grip) +(when (modulep! +grip) (package! grip-mode :pin "6d6ddbe0af39c82a633add8499488ad8dc9e1daa")) -(when (featurep! :editor evil +everywhere) +(when (modulep! :editor evil +everywhere) (package! evil-markdown :recipe (:host github :repo "Somelauw/evil-markdown") :pin "8e6cc68af83914b2fa9fd3a3b8472573dbcef477")) diff --git a/modules/lang/nim/config.el b/modules/lang/nim/config.el index 1c2fd9899..257112e6a 100644 --- a/modules/lang/nim/config.el +++ b/modules/lang/nim/config.el @@ -34,6 +34,6 @@ windows." (use-package! flycheck-nim - :when (featurep! :checkers syntax) + :when (modulep! :checkers syntax) :after nim-mode) diff --git a/modules/lang/nim/packages.el b/modules/lang/nim/packages.el index 017868b9f..e90c69ebc 100644 --- a/modules/lang/nim/packages.el +++ b/modules/lang/nim/packages.el @@ -5,5 +5,5 @@ (package! nim-mode :pin "744e076f0bea1c5ddc49f92397d9aa98ffa7eff8") -(when (featurep! :checkers syntax) +(when (modulep! :checkers syntax) (package! flycheck-nim :pin "ddfade51001571c2399f78bcc509e0aa8eb752a4")) diff --git a/modules/lang/nix/autoload.el b/modules/lang/nix/autoload.el index 8832aa6f7..9b0a8b520 100644 --- a/modules/lang/nix/autoload.el +++ b/modules/lang/nix/autoload.el @@ -27,14 +27,14 @@ (save-excursion (skip-chars-forward "^ ") (point)))))) - (cond ((featurep! :completion helm) + (cond ((modulep! :completion helm) (require 'helm-nixos-options) ;; REVIEW We reimplment `helm-nixos-options' so we can supply ;; `initial-input'. Maybe use `helm-attrset' instead? (helm :sources `(,(helm-source-nixos-options-search)) :buffer "*helm-nixos-options*" :input initial-input)) - ((featurep! :completion ivy) + ((modulep! :completion ivy) (require 'nixos-options) (ivy-read "NixOS options: " nixos-options diff --git a/modules/lang/nix/config.el b/modules/lang/nix/config.el index 0222b3e5e..af2f254e0 100644 --- a/modules/lang/nix/config.el +++ b/modules/lang/nix/config.el @@ -15,7 +15,7 @@ ;; than js2-mode, and its extra features aren't needed there. (add-to-list 'auto-mode-alist (cons "/flake\\.lock\\'" - (if (featurep! :lang json) + (if (modulep! :lang json) 'json-mode 'js-mode))) :config @@ -29,9 +29,9 @@ ;; dreadfully slow. It can still be invoked manually.. (setq-hook! 'nix-mode-hook company-idle-delay nil) - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'nix-mode-local-vars-hook #'lsp! 'append)) - (when (featurep! +tree-sitter) + (when (modulep! +tree-sitter) (add-hook 'nix-mode-local-vars-hook #'tree-sitter! 'append)) (map! :localleader diff --git a/modules/lang/nix/doctor.el b/modules/lang/nix/doctor.el index d79f06880..043ce4c8c 100644 --- a/modules/lang/nix/doctor.el +++ b/modules/lang/nix/doctor.el @@ -7,6 +7,6 @@ (unless (executable-find "nixfmt") (warn! "Couldn't find nixfmt. nix-format-buffer won't work.")) -(assert! (or (not (featurep! +tree-sitter)) - (featurep! :tools tree-sitter)) +(assert! (or (not (modulep! +tree-sitter)) + (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") diff --git a/modules/lang/nix/packages.el b/modules/lang/nix/packages.el index 3f7b21180..038f03626 100644 --- a/modules/lang/nix/packages.el +++ b/modules/lang/nix/packages.el @@ -4,8 +4,8 @@ (package! nix-mode :pin "20ee8d88900b169831d6b0783bd82d2625e940c7") (package! nix-update :pin "fc6c39c2da3fcfa62f4796816c084a6389c8b6e7") -(when (featurep! :completion company) +(when (modulep! :completion company) (package! company-nixos-options :pin "053a2d5110ce05b7f99bcc2ac4804b70cbe87916")) -(when (featurep! :completion helm) +(when (modulep! :completion helm) (package! helm-nixos-options :pin "053a2d5110ce05b7f99bcc2ac4804b70cbe87916")) diff --git a/modules/lang/ocaml/config.el b/modules/lang/ocaml/config.el index 53762934a..22d3ac30e 100644 --- a/modules/lang/ocaml/config.el +++ b/modules/lang/ocaml/config.el @@ -3,7 +3,7 @@ ;; ;;; Packages -(when (featurep! +lsp) +(when (modulep! +lsp) (add-hook! '(tuareg-mode-local-vars-hook reason-mode-local-vars-hook) :append #'lsp!)) @@ -29,7 +29,7 @@ "a" #'tuareg-find-alternate-file) (use-package! utop - :when (featurep! :tools eval) + :when (modulep! :tools eval) :hook (tuareg-mode-local-vars . +ocaml-init-utop-h) :init (set-repl-handler! 'tuareg-mode #'utop) @@ -42,7 +42,7 @@ (use-package! merlin - :unless (featurep! +lsp) + :unless (modulep! +lsp) :hook (tuareg-mode-local-vars . +ocaml-init-merlin-h) :init (defun +ocaml-init-merlin-h () @@ -64,7 +64,7 @@ "t" #'merlin-type-enclosing) (use-package! flycheck-ocaml - :when (featurep! :checkers syntax) + :when (modulep! :checkers syntax) :hook (merlin-mode . +ocaml-init-flycheck-h) :config (defun +ocaml-init-flycheck-h () @@ -78,14 +78,14 @@ :hook (merlin-mode . merlin-eldoc-setup)) (use-package! merlin-iedit - :when (featurep! :editor multiple-cursors) + :when (modulep! :editor multiple-cursors) :defer t :init (map! :map tuareg-mode-map :v "R" #'merlin-iedit-occurrences)) (use-package! merlin-imenu - :when (featurep! :emacs imenu) + :when (modulep! :emacs imenu) :hook (merlin-mode . merlin-use-merlin-imenu))) @@ -101,7 +101,7 @@ (use-package! ocamlformat - :when (featurep! :editor format) + :when (modulep! :editor format) :commands ocamlformat :hook (tuareg-mode-local-vars . +ocaml-init-ocamlformat-h) :config @@ -121,5 +121,5 @@ (setq +format-with 'ocamlformat)))) ;; Tree sitter -(eval-when! (featurep! +tree-sitter) +(eval-when! (modulep! +tree-sitter) (add-hook! 'tuareg-mode-local-vars-hook #'tree-sitter!)) diff --git a/modules/lang/ocaml/doctor.el b/modules/lang/ocaml/doctor.el index 712931aba..07facc1d3 100644 --- a/modules/lang/ocaml/doctor.el +++ b/modules/lang/ocaml/doctor.el @@ -1,12 +1,12 @@ ;; -*- lexical-binding: t; no-byte-compile: t; -*- ;;; lang/ocaml/doctor.el -(assert! (or (not (featurep! +lsp)) - (featurep! :tools lsp)) +(assert! (or (not (modulep! +lsp)) + (modulep! :tools lsp)) "This module requires (:tools lsp)") -(assert! (or (not (featurep! +tree-sitter)) - (featurep! :tools tree-sitter)) +(assert! (or (not (modulep! +tree-sitter)) + (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") (unless (executable-find "ocamlmerlin") @@ -16,13 +16,13 @@ (unless (executable-find "ocp-indent") (warn! "Couldn't find ocp-indent. Auto-indentation will be less precise")) -(when (featurep! :tools eval) +(when (modulep! :tools eval) (unless (executable-find "utop") (warn! "Couldn't find utop. REPL won't be available"))) (unless (executable-find "dune") (warn! "Couldn't find dune. Won't be able to highlight dune files")) -(when (featurep! :editor format) +(when (modulep! :editor format) (unless (executable-find "ocamlformat") (warn! "Couldn't find ocamlformat. Code-formatting will be unavailable"))) diff --git a/modules/lang/ocaml/packages.el b/modules/lang/ocaml/packages.el index a6e89d578..4aca200f7 100644 --- a/modules/lang/ocaml/packages.el +++ b/modules/lang/ocaml/packages.el @@ -3,19 +3,19 @@ (package! tuareg :pin "ad8a688b7e2aeeafc320a845f86cdd9aa7c971ce") -(unless (featurep! +lsp) +(unless (modulep! +lsp) (package! merlin :pin "be753d9412387aedcf32aba88a1be9bcd33d97ba") (package! merlin-eldoc :pin "db7fab1eddfe34781b7e79694f8923b285698032") (package! merlin-company :pin "be753d9412387aedcf32aba88a1be9bcd33d97ba") - (when (featurep! :checkers syntax) + (when (modulep! :checkers syntax) (package! flycheck-ocaml :pin "77f8ddbd9bfc3a11957ac7ec7e45d5fa9179b192"))) (package! ocp-indent :pin "7c4d434132cebc15a8213c8be9e7323692eb0a2b") -(when (featurep! :tools eval) +(when (modulep! :tools eval) (package! utop :pin "bbd9a6ed45c8de8d50adcd5d4d845bdba212db63")) -(when (featurep! :editor format) +(when (modulep! :editor format) (package! ocamlformat :recipe (:host github :repo "ocaml-ppx/ocamlformat" :files ("emacs/*.el")) :pin "9cbd8150c28f70ba6315c347a833a4ac8c85c481")) diff --git a/modules/lang/org/autoload/contrib-ipython.el b/modules/lang/org/autoload/contrib-ipython.el index e729a0711..2399a159a 100644 --- a/modules/lang/org/autoload/contrib-ipython.el +++ b/modules/lang/org/autoload/contrib-ipython.el @@ -1,5 +1,5 @@ ;;; lang/org/autoload/contrib-ipython.el -*- lexical-binding: t; -*- -;;;###if (featurep! +ipython) +;;;###if (modulep! +ipython) ;;;###autoload (defun +org-ob-ipython-initiate-session-a (&optional session params) @@ -115,7 +115,7 @@ This function is called by `org-babel-execute-src-block'." (cdr (assoc :pydir (nth 2 info)))))) (ob-ipython-mode 1) ;; hack on company mode to use company-capf rather than company-anaconda - (when (featurep! :completion company) + (when (modulep! :completion company) (setq-local company-backends '(company-capf company-dabbrev diff --git a/modules/lang/org/autoload/contrib-present.el b/modules/lang/org/autoload/contrib-present.el index 64eac3f82..2462037ff 100644 --- a/modules/lang/org/autoload/contrib-present.el +++ b/modules/lang/org/autoload/contrib-present.el @@ -1,5 +1,5 @@ ;;; lang/org/autoload/contrib-present.el -*- lexical-binding: t; -*- -;;;###if (featurep! +present) +;;;###if (modulep! +present) ;; ;;; Helpers diff --git a/modules/lang/org/autoload/contrib-roam2.el b/modules/lang/org/autoload/contrib-roam2.el index 50fcd956c..ca56f22df 100644 --- a/modules/lang/org/autoload/contrib-roam2.el +++ b/modules/lang/org/autoload/contrib-roam2.el @@ -1,5 +1,5 @@ ;;; lang/org/autoload/contrib-roam2.el -*- lexical-binding: t; -*- -;;;###if (featurep! +roam2) +;;;###if (modulep! +roam2) ;;; Custom node accessors ;;;###autoload (autoload 'org-roam-node-doom-filetitle "lang/org/autoload/contrib-roam2" nil t) diff --git a/modules/lang/org/autoload/org.el b/modules/lang/org/autoload/org.el index c563a1df0..9d1eab904 100644 --- a/modules/lang/org/autoload/org.el +++ b/modules/lang/org/autoload/org.el @@ -437,7 +437,7 @@ Made for `org-tab-first-hook' in evil-mode." (defun +org-yas-expand-maybe-h () "Expand a yasnippet snippet, if trigger exists at point or region is active. Made for `org-tab-first-hook'." - (when (and (featurep! :editor snippets) + (when (and (modulep! :editor snippets) (require 'yasnippet nil t) (bound-and-true-p yas-minor-mode)) (and (let ((major-mode (cond ((org-in-src-block-p t) diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index b1792d3d8..641cd77e6 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -478,7 +478,7 @@ relative to `org-directory', unless it is an absolute path." :after #'org-capture-refile (+org-capture-cleanup-frame-h)) - (when (featurep! :ui doom-dashboard) + (when (modulep! :ui doom-dashboard) (add-hook '+doom-dashboard-inhibit-functions #'+org-capture-frame-p))) @@ -514,7 +514,8 @@ relative to `org-directory', unless it is an absolute path." :face (lambda (path) (if (or (file-remote-p path) ;; filter out network shares on windows (slow) - (and IS-WINDOWS (string-prefix-p "\\\\" path)) + (and (featurep :os 'windows) + (string-prefix-p "\\\\" path)) (file-exists-p path)) 'org-link '(warning org-link)))) @@ -599,15 +600,15 @@ relative to `org-directory', unless it is an absolute path." org-html-validation-link nil org-latex-prefer-user-labels t) - (when (featurep! :lang markdown) + (when (modulep! :lang markdown) (add-to-list 'org-export-backends 'md)) (use-package! ox-hugo - :when (featurep! +hugo) + :when (modulep! +hugo) :after ox) (use-package! ox-pandoc - :when (featurep! +pandoc) + :when (modulep! +pandoc) :when (executable-find "pandoc") :after ox :init @@ -847,7 +848,7 @@ between the two." [C-return] #'+org/insert-item-below [C-S-return] #'+org/insert-item-above [C-M-return] #'org-insert-subheading - (:when IS-MAC + (:when (featurep :os 'macos) [s-return] #'+org/insert-item-below [s-S-return] #'+org/insert-item-above [s-M-return] #'org-insert-subheading) @@ -863,13 +864,13 @@ between the two." "," #'org-switchb "." #'org-goto "@" #'org-cite-insert - (:when (featurep! :completion ivy) + (:when (modulep! :completion ivy) "." #'counsel-org-goto "/" #'counsel-org-goto-all) - (:when (featurep! :completion helm) + (:when (modulep! :completion helm) "." #'helm-org-in-buffer-headings "/" #'helm-org-agenda-files-headings) - (:when (featurep! :completion vertico) + (:when (modulep! :completion vertico) "." #'consult-org-heading "/" #'consult-org-agenda) "A" #'org-archive-subtree @@ -900,7 +901,7 @@ between the two." "u" #'org-attach-url "s" #'org-attach-set-directory "S" #'org-attach-sync - (:when (featurep! +dragndrop) + (:when (modulep! +dragndrop) "c" #'org-download-screenshot "p" #'org-download-clipboard "P" #'org-download-yank)) @@ -926,7 +927,7 @@ between the two." (:prefix ("t" . "toggle") "f" #'org-table-toggle-formula-debugger "o" #'org-table-toggle-coordinate-overlays) - (:when (featurep! +gnuplot) + (:when (modulep! +gnuplot) "p" #'org-plot/gnuplot)) (:prefix ("c" . "clock") "c" #'org-clock-cancel @@ -951,13 +952,13 @@ between the two." "T" #'org-time-stamp-inactive) (:prefix ("g" . "goto") "g" #'org-goto - (:when (featurep! :completion ivy) + (:when (modulep! :completion ivy) "g" #'counsel-org-goto "G" #'counsel-org-goto-all) - (:when (featurep! :completion helm) + (:when (modulep! :completion helm) "g" #'helm-org-in-buffer-headings "G" #'helm-org-agenda-files-headings) - (:when (featurep! :completion vertico) + (:when (modulep! :completion vertico) "g" #'consult-org-heading "G" #'consult-org-agenda) "c" #'org-clock-goto @@ -1107,7 +1108,7 @@ between the two." (use-package! org-pdftools - :when (featurep! :tools pdf) + :when (modulep! :tools pdf) :commands org-pdftools-export :init (after! org @@ -1137,7 +1138,7 @@ between the two." (use-package! evil-org - :when (featurep! :editor evil +everywhere) + :when (modulep! :editor evil +everywhere) :hook (org-mode . evil-org-mode) :hook (org-capture-mode . evil-insert-state) :hook (doom-docs-org-mode . evil-org-mode) @@ -1219,7 +1220,7 @@ between the two." (use-package! evil-org-agenda - :when (featurep! :editor evil +everywhere) + :when (modulep! :editor evil +everywhere) :hook (org-agenda-mode . evil-org-agenda-mode) :config (evil-org-agenda-set-keys) @@ -1304,7 +1305,7 @@ between the two." "Advise `server-visit-files' to load `org-protocol' lazily." :around #'server-visit-files (if (not (cl-loop with protocol = - (if IS-WINDOWS + (if (featurep :os 'windows) ;; On Windows, the file arguments for `emacsclient' ;; get funnelled through `expand-file-path' by ;; `server-process-filter'. This substitutes diff --git a/modules/lang/org/contrib/brain.el b/modules/lang/org/contrib/brain.el index 6f0edfcba..57033c6cb 100644 --- a/modules/lang/org/contrib/brain.el +++ b/modules/lang/org/contrib/brain.el @@ -1,5 +1,5 @@ ;;; lang/org/contrib/brain.el -*- lexical-binding: t; -*- -;;;###if (featurep! +brain) +;;;###if (modulep! +brain) (use-package! org-brain :defer t @@ -18,7 +18,7 @@ org-capture-templates :key #'car :test #'equal) - (when (featurep! :editor evil +everywhere) + (when (modulep! :editor evil +everywhere) ;; TODO Make a proper evil keybind scheme for org-brain ;; REVIEW This should be handled upstream by evil-collection (set-evil-initial-state! diff --git a/modules/lang/org/contrib/dragndrop.el b/modules/lang/org/contrib/dragndrop.el index e07bbef76..e233619b3 100644 --- a/modules/lang/org/contrib/dragndrop.el +++ b/modules/lang/org/contrib/dragndrop.el @@ -1,5 +1,5 @@ ;;; lang/org/contrib/dragndrop.el -*- lexical-binding: t; -*- -;;;###if (featurep! +dragndrop) +;;;###if (modulep! +dragndrop) (use-package! org-download :commands diff --git a/modules/lang/org/contrib/ipython.el b/modules/lang/org/contrib/ipython.el index 361811583..c8047cf37 100644 --- a/modules/lang/org/contrib/ipython.el +++ b/modules/lang/org/contrib/ipython.el @@ -1,5 +1,5 @@ ;;; lang/org/contrib/babel.el -*- lexical-binding: t; -*- -;;;###if (featurep! +ipython) +;;;###if (modulep! +ipython) (use-package! ob-ipython :defer t diff --git a/modules/lang/org/contrib/journal.el b/modules/lang/org/contrib/journal.el index f5a5775cf..c40f81326 100644 --- a/modules/lang/org/contrib/journal.el +++ b/modules/lang/org/contrib/journal.el @@ -1,5 +1,5 @@ ;;; lang/org/contrib/journal.el -*- lexical-binding: t; -*- -;;;###if (featurep! +journal) +;;;###if (modulep! +journal) (use-package! org-journal :defer t diff --git a/modules/lang/org/contrib/jupyter.el b/modules/lang/org/contrib/jupyter.el index dbd1a0376..3dbe480b2 100644 --- a/modules/lang/org/contrib/jupyter.el +++ b/modules/lang/org/contrib/jupyter.el @@ -1,5 +1,5 @@ ;;; lang/org/contrib/jupyter.el -*- lexical-binding: t; -*- -;;;###if (featurep! +jupyter) +;;;###if (modulep! +jupyter) (use-package! ob-jupyter :defer t diff --git a/modules/lang/org/contrib/noter.el b/modules/lang/org/contrib/noter.el index 33b36edf0..813c447f7 100644 --- a/modules/lang/org/contrib/noter.el +++ b/modules/lang/org/contrib/noter.el @@ -1,5 +1,5 @@ ;;; lang/org/contrib/noter.el -*- lexical-binding: t; -*- -;;;###if (featurep! +noter) +;;;###if (modulep! +noter) (use-package! org-noter :defer t diff --git a/modules/lang/org/contrib/pomodoro.el b/modules/lang/org/contrib/pomodoro.el index cac4b8511..951a69ee8 100644 --- a/modules/lang/org/contrib/pomodoro.el +++ b/modules/lang/org/contrib/pomodoro.el @@ -1,5 +1,5 @@ ;;; lang/org/contrib/pomodoro.el -*- lexical-binding: t; -*- -;;;###if (featurep! +pomodoro) +;;;###if (modulep! +pomodoro) (after! org-pomodoro ;; prefer PulseAudio to ALSA in $current_year diff --git a/modules/lang/org/contrib/present.el b/modules/lang/org/contrib/present.el index b29b4a8ce..dd126b0d5 100644 --- a/modules/lang/org/contrib/present.el +++ b/modules/lang/org/contrib/present.el @@ -1,5 +1,5 @@ ;;; lang/org/contrib/present.el -*- lexical-binding: t; -*- -;;;###if (featurep! +present) +;;;###if (modulep! +present) (defvar +org-present-text-scale 5 "The `text-scale-amount' for `org-tree-slide-mode'.") @@ -40,7 +40,7 @@ headings as titles, and you have more freedom to place them wherever you like.") (add-hook 'org-tree-slide-play-hook #'+org-present-hide-blocks-h) (add-hook 'org-tree-slide-stop-hook #'+org-present-hide-blocks-h) - (when (featurep! :editor evil) + (when (modulep! :editor evil) (map! :map org-tree-slide-mode-map :n [C-right] #'org-tree-slide-move-next-tree :n [C-left] #'org-tree-slide-move-previous-tree) diff --git a/modules/lang/org/contrib/pretty.el b/modules/lang/org/contrib/pretty.el index 64a081267..ba12e7d45 100644 --- a/modules/lang/org/contrib/pretty.el +++ b/modules/lang/org/contrib/pretty.el @@ -1,5 +1,5 @@ ;;; lang/org/contrib/pretty.el -*- lexical-binding: t; -*- -;;;###if (featurep! +pretty) +;;;###if (modulep! +pretty) (after! org (setq org-highlight-latex-and-related '(native script entities))) diff --git a/modules/lang/org/contrib/roam.el b/modules/lang/org/contrib/roam.el index 9d8791142..b6150e5c7 100644 --- a/modules/lang/org/contrib/roam.el +++ b/modules/lang/org/contrib/roam.el @@ -1,5 +1,5 @@ ;;; lang/org/contrib/roam.el -*- lexical-binding: t; -*- -;;;###if (featurep! +roam) +;;;###if (modulep! +roam) (defvar +org-roam-open-buffer-on-find-file t "If non-nil, open the org-roam buffer when opening an org roam file.") @@ -67,9 +67,9 @@ org-roam-link-use-custom-faces 'everywhere org-roam-completion-everywhere t org-roam-completion-system - (cond ((featurep! :completion helm) 'helm) - ((featurep! :completion ivy) 'ivy) - ((featurep! :completion ido) 'ido) + (cond ((modulep! :completion helm) 'helm) + ((modulep! :completion ivy) 'ivy) + ((modulep! :completion ido) 'ido) ('default))) ;; Normally, the org-roam buffer doesn't open until you explicitly call diff --git a/modules/lang/org/contrib/roam2.el b/modules/lang/org/contrib/roam2.el index 0f5d6780b..2aee84126 100644 --- a/modules/lang/org/contrib/roam2.el +++ b/modules/lang/org/contrib/roam2.el @@ -1,5 +1,5 @@ ;;; lang/org/contrib/roam2.el -*- lexical-binding: t; -*- -;;;###if (featurep! +roam2) +;;;###if (modulep! +roam2) (defvar +org-roam-auto-backlinks-buffer nil "If non-nil, open and close the org-roam backlinks buffer automatically. @@ -160,7 +160,7 @@ In case of failure, fail gracefully." "r" #'org-roam-ref-add "R" #'org-roam-ref-remove)) - (when (featurep! :editor evil +everywhere) + (when (modulep! :editor evil +everywhere) (add-hook! 'org-roam-mode-hook (defun +org-roam-detach-magit-section-mode-map-h () "Detach `magit-section-mode-map' from `org-roam-mode-map'. diff --git a/modules/lang/org/doctor.el b/modules/lang/org/doctor.el index d96e1c721..cb31b084f 100644 --- a/modules/lang/org/doctor.el +++ b/modules/lang/org/doctor.el @@ -1,19 +1,19 @@ ;; -*- lexical-binding: t; no-byte-compile: t; -*- ;;; lang/org/doctor.el -(when (featurep! +gnuplot) +(when (modulep! +gnuplot) (unless (executable-find "gnuplot") (warn! "Couldn't find gnuplot. org-plot/gnuplot will not work"))) -(when (featurep! +roam) +(when (modulep! +roam) (unless (executable-find "sqlite3") (warn! "Couldn't find the sqlite3 executable. org-roam will not work."))) -(when (or (featurep! +roam) - (featurep! +roam2)) +(when (or (modulep! +roam) + (modulep! +roam2)) (unless (executable-find "dot") (warn! "Couldn't find the dot executable (from graphviz). org-roam will not be able to generate graph visualizations."))) -(when (featurep! +dragndrop) +(when (modulep! +dragndrop) (when IS-MAC (unless (executable-find "pngpaste") (warn! "Couldn't find the pngpaste executable. org-download-clipboard will not work."))) diff --git a/modules/lang/org/packages.el b/modules/lang/org/packages.el index 11f33bed2..2da88f484 100644 --- a/modules/lang/org/packages.el +++ b/modules/lang/org/packages.el @@ -42,38 +42,38 @@ (package! toc-org :pin "bf2e4b358efbd860ecafe6e74776de0885d9d100") (package! org-cliplink :pin "13e0940b65d22bec34e2de4bc8cba1412a7abfbc") -(when (featurep! :editor evil +everywhere) +(when (modulep! :editor evil +everywhere) (package! evil-org :recipe (:host github :repo "hlissner/evil-org-mode") :pin "a9706da260c45b98601bcd72b1d2c0a24a017700")) -(when (featurep! :tools pdf) +(when (modulep! :tools pdf) (package! org-pdftools :pin "967f48fb5038bba32915ee9da8dc4e8b10ba3376")) -(when (featurep! :tools magit) +(when (modulep! :tools magit) (package! orgit :pin "b33b916915db5f91d2c9da4cb1a2457ccbb09332") - (when (featurep! :tools magit +forge) + (when (modulep! :tools magit +forge) (package! orgit-forge :pin "8baf1dee795f026d4555687022487fab89c9bcdf"))) -(when (featurep! +brain) +(when (modulep! +brain) (package! org-brain :pin "46ca9f766322cff31279ecdf02251ff24a0e9431")) -(when (featurep! +dragndrop) +(when (modulep! +dragndrop) (package! org-download :pin "947ca223643d28e189480e607df68449c15786cb")) -(when (featurep! +gnuplot) +(when (modulep! +gnuplot) (package! gnuplot :pin "7138b139d2dca9683f1a81325c643b2744aa1ea3") (package! gnuplot-mode :pin "601f6392986f0cba332c87678d31ae0d0a496ce7")) -(when (featurep! +ipython) ; DEPRECATED +(when (modulep! +ipython) ; DEPRECATED (package! ob-ipython :pin "7147455230841744fb5b95dcbe03320313a77124")) -(when (featurep! +jupyter) +(when (modulep! +jupyter) (package! jupyter :pin "7d20c0aee2f9c896215f35232905b23532ef04c5")) -(when (featurep! +journal) +(when (modulep! +journal) (package! org-journal :pin "839a2e19865a03bec30ef32431f981f33880a754")) -(when (featurep! +noter) +(when (modulep! +noter) (package! org-noter :pin "9ead81d42dd4dd5074782d239b2efddf9b8b7b3d")) -(when (featurep! +pomodoro) +(when (modulep! +pomodoro) (package! org-pomodoro :pin "3f5bcfb80d61556d35fc29e5ddb09750df962cc6")) -(when (featurep! +pretty) +(when (modulep! +pretty) (package! org-appear :pin "60ba267c5da336e75e603f8c7ab3f44e6f4e4dac") (package! org-superstar :pin "03be6c0a3081c46a59b108deb8479ee24a6d86c0") (package! org-fancy-priorities :pin "7f677c6c14ecf05eab8e0efbfe7f1b00ae68eb1d")) -(when (featurep! +present) +(when (modulep! +present) (package! centered-window :recipe (:host github :repo "anler/centered-window-mode") :pin "80965f6c6afe8d918481433984b493de72af5399") @@ -84,11 +84,11 @@ :files ("css" "dist" "js" "plugin")) :pin "e219184f37a71c406e41d55ac3212eb79797f0aa")) (cond - ((featurep! +roam) + ((modulep! +roam) (package! org-roam :recipe (:host github :repo "org-roam/org-roam-v1") :pin "946a879a4a18756a0508afba1e0b0fe070c6a8b4")) - ((featurep! +roam2) + ((modulep! +roam2) (package! org-roam ;; FIXME A :recipe isn't strictly necessary, but without it, our package ;; bumper fails to distinguish between org-roam v1 and v2. @@ -97,37 +97,37 @@ ;;; Babel (package! ob-async :pin "9aac486073f5c356ada20e716571be33a350a982") -(when (featurep! :lang crystal) +(when (modulep! :lang crystal) (package! ob-crystal :pin "d84c1adee4b269cdba06a97caedb8071561a09af")) -(when (featurep! :lang elixir) +(when (modulep! :lang elixir) (package! ob-elixir :pin "8990a8178b2f7bd93504a9ab136622aab6e82e32")) -(when (featurep! :lang fsharp) +(when (modulep! :lang fsharp) (package! ob-fsharp :recipe (:host github :repo "elken/ob-fsharp") :pin "ca3d4568da6c82ff32a8d289743b059d9f909c67")) -(when (featurep! :lang go) +(when (modulep! :lang go) (package! ob-go :pin "2067ed55f4c1d33a43cb3f6948609d240a8915f5")) -(when (featurep! :lang graphql) +(when (modulep! :lang graphql) (package! ob-graphql :pin "7c35419f9eec5dc44967cbcfa13c7135b9a96bfc")) -(when (featurep! :lang hy) +(when (modulep! :lang hy) (package! ob-hy :pin "a42ecaf440adc03e279afe43ee5ef6093ddd542a")) -(when (featurep! :lang nim) +(when (modulep! :lang nim) (package! ob-nim :pin "6fd060a3ecd38be37e4ec2261cd65760a3c35a91")) -(when (featurep! :lang racket) +(when (modulep! :lang racket) (package! ob-racket :recipe (:host github :repo "DEADB17/ob-racket") :pin "d8fd51bddb019b0eb68755255f88fc800cfe03cb")) -(when (featurep! :lang rest) +(when (modulep! :lang rest) (package! ob-restclient :pin "3ac834b02b8276aae1b760312612c3b940598f90")) -(when (featurep! :lang scala) +(when (modulep! :lang scala) (package! ob-ammonite :pin "39937dff395e70aff76a4224fa49cf2ec6c57cca")) ;;; Export -(when (featurep! +pandoc) +(when (modulep! +pandoc) (package! ox-pandoc :pin "f8eac5e5692fc44a4724ada43191e7c28a1ccf30")) -(when (featurep! +hugo) +(when (modulep! +hugo) (package! ox-hugo :recipe (:host github :repo "kaushalmodi/ox-hugo" :nonrecursive t) :pin "97ff24fe0b8d29c503b88eea69235b02ae71beb0")) -(when (featurep! :lang rst) +(when (modulep! :lang rst) (package! ox-rst :pin "99fa790da55b57a3f2e9aa187493ba434a64250e")) diff --git a/modules/lang/php/config.el b/modules/lang/php/config.el index 8f91c182b..f1f83ee32 100644 --- a/modules/lang/php/config.el +++ b/modules/lang/php/config.el @@ -49,7 +49,7 @@ :return "return" :yield "use") - (if (not (featurep! +lsp)) + (if (not (modulep! +lsp)) ;; `+php-company-backend' uses `company-phpactor', `php-extras-company' or ;; `company-dabbrev-code', in that order. (when +php--company-backends @@ -60,7 +60,7 @@ (setq lsp-clients-php-server-command "php-language-server.php")) (add-hook 'php-mode-local-vars-hook #'lsp! 'append)) - (when (featurep! +tree-sitter) + (when (modulep! +tree-sitter) (add-hook 'php-mode-local-vars-hook #'tree-sitter! 'append)) ;; Use the smallest `sp-max-pair-length' for optimum `smartparens' performance @@ -79,7 +79,7 @@ (use-package! phpactor - :unless (featurep! +lsp) + :unless (modulep! +lsp) :after php-mode :init (add-to-list '+php--company-backends #'company-phpactor nil 'eq) @@ -136,7 +136,7 @@ (use-package! hack-mode - :when (featurep! +hack) + :when (modulep! +hack) :mode "\\.hh$") diff --git a/modules/lang/php/doctor.el b/modules/lang/php/doctor.el index 95b984ce9..94f240ac5 100644 --- a/modules/lang/php/doctor.el +++ b/modules/lang/php/doctor.el @@ -1,10 +1,10 @@ ;; -*- lexical-binding: t; no-byte-compile: t; -*- ;;; lang/php/doctor.el -(assert! (or (not (featurep! +lsp)) - (featurep! :tools lsp)) +(assert! (or (not (modulep! +lsp)) + (modulep! :tools lsp)) "This module requires (:tools lsp)") -(assert! (or (not (featurep! +tree-sitter)) - (featurep! :tools tree-sitter)) +(assert! (or (not (modulep! +tree-sitter)) + (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") diff --git a/modules/lang/php/packages.el b/modules/lang/php/packages.el index 2df38492b..817448e06 100644 --- a/modules/lang/php/packages.el +++ b/modules/lang/php/packages.el @@ -10,17 +10,17 @@ (package! phpunit :pin "fe6bc91c3bd8b329c6d26ad883a025f06b5121ee") (package! composer :pin "7c7f89df226cac69664d7eca5e913b544dc475c5") -(when (featurep! +hack) +(when (modulep! +hack) (package! hack-mode :recipe (:host github :repo "hhvm/hack-mode") :pin "a522f61c088ee2a13ab17f289a3131329e59badf")) -(unless (featurep! +lsp) +(unless (modulep! +lsp) (package! phpactor :pin "34195f1533209e2ffd0f898a69c7db2bffd1eabe") - (when (featurep! :completion company) + (when (modulep! :completion company) (package! company-phpactor :pin "34195f1533209e2ffd0f898a69c7db2bffd1eabe"))) -(when (featurep! :editor format) +(when (modulep! :editor format) (package! php-cs-fixer :pin "7e12a1af5d65cd8a801eeb5564c6268a4e190c0c")) ;; For building php-extras diff --git a/modules/lang/plantuml/config.el b/modules/lang/plantuml/config.el index c488ffca3..3b076f091 100644 --- a/modules/lang/plantuml/config.el +++ b/modules/lang/plantuml/config.el @@ -15,7 +15,7 @@ (use-package! flycheck-plantuml - :when (featurep! :checkers syntax) + :when (modulep! :checkers syntax) :after plantuml-mode :config (flycheck-plantuml-setup)) diff --git a/modules/lang/plantuml/packages.el b/modules/lang/plantuml/packages.el index ae59c9812..359a51311 100644 --- a/modules/lang/plantuml/packages.el +++ b/modules/lang/plantuml/packages.el @@ -2,7 +2,7 @@ ;;; lang/plantuml/packages.el (package! plantuml-mode :pin "ea45a13707abd2a70df183f1aec6447197fc9ccc") -(when (featurep! :checkers syntax) +(when (modulep! :checkers syntax) (package! flycheck-plantuml :pin "183be89e1dbba0b38237dd198dff600e0790309d")) ;; ob-plantuml is provided by org-plus-contrib diff --git a/modules/lang/purescript/config.el b/modules/lang/purescript/config.el index 7221da13f..9ffa90be3 100644 --- a/modules/lang/purescript/config.el +++ b/modules/lang/purescript/config.el @@ -1,7 +1,7 @@ ;;; lang/purescript/config.el -*- lexical-binding: t; -*- (after! purescript-mode - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'purescript-mode-local-vars-hook #'lsp! 'append)) (add-hook! 'purescript-mode-hook @@ -33,6 +33,6 @@ :hook (purescript-mode . psc-ide-mode) :config (remove-hook 'company-backends 'company-psc-ide-backend) - (when (featurep! :checkers syntax) + (when (modulep! :checkers syntax) (psc-ide-flycheck-setup)) (set-company-backend! 'purescript-mode 'company-psc-ide-backend)) diff --git a/modules/lang/python/autoload/conda.el b/modules/lang/python/autoload/conda.el index b11a43760..2c4799d19 100644 --- a/modules/lang/python/autoload/conda.el +++ b/modules/lang/python/autoload/conda.el @@ -1,5 +1,5 @@ ;;; lang/python/autoload/conda.el -*- lexical-binding: t; -*- -;;;###if (featurep! +conda) +;;;###if (modulep! +conda) ;;;###autoload (defun +python/set-conda-home () diff --git a/modules/lang/python/autoload/pyenv.el b/modules/lang/python/autoload/pyenv.el index 0bc5b33cc..a129cd5b4 100644 --- a/modules/lang/python/autoload/pyenv.el +++ b/modules/lang/python/autoload/pyenv.el @@ -1,5 +1,5 @@ ;;; lang/python/autoload/pyenv.el -*- lexical-binding: t; -*- -;;;###if (featurep! +pyenv) +;;;###if (modulep! +pyenv) ;;;###autoload (defvar +pyenv--version nil) diff --git a/modules/lang/python/config.el b/modules/lang/python/config.el index a807f0097..e954687a7 100644 --- a/modules/lang/python/config.el +++ b/modules/lang/python/config.el @@ -20,13 +20,13 @@ (setq python-environment-directory doom-cache-dir python-indent-guess-indent-offset-verbose nil) - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'python-mode-local-vars-hook #'lsp! 'append) ;; Use "mspyls" in eglot if in PATH (when (executable-find "Microsoft.Python.LanguageServer") (set-eglot-client! 'python-mode '("Microsoft.Python.LanguageServer")))) - (when (featurep! +tree-sitter) + (when (modulep! +tree-sitter) (add-hook 'python-mode-local-vars-hook #'tree-sitter! 'append)) :config (set-repl-handler! 'python-mode #'+python/open-repl @@ -82,7 +82,7 @@ (setq-local flycheck-python-flake8-executable "flake8")))) ;; Affects pyenv and conda - (when (featurep! :ui modeline) + (when (modulep! :ui modeline) (advice-add #'pythonic-activate :after-while #'+modeline-update-env-in-all-windows-h) (advice-add #'pythonic-deactivate :after #'+modeline-clear-env-in-all-windows-h)) @@ -311,7 +311,7 @@ (use-package! pyvenv :after python :init - (when (featurep! :ui modeline) + (when (modulep! :ui modeline) (add-hook 'pyvenv-post-activate-hooks #'+modeline-update-env-in-all-windows-h) (add-hook 'pyvenv-pre-deactivate-hooks #'+modeline-clear-env-in-all-windows-h)) :config @@ -323,7 +323,7 @@ (use-package! pyenv-mode - :when (featurep! +pyenv) + :when (modulep! +pyenv) :after python :config (when (executable-find "pyenv") @@ -334,7 +334,7 @@ (use-package! conda - :when (featurep! +conda) + :when (modulep! +conda) :after python :config ;; The location of your anaconda home will be guessed from a list of common @@ -373,7 +373,7 @@ (use-package! poetry - :when (featurep! +poetry) + :when (modulep! +poetry) :after python :init (setq poetry-tracking-strategy 'switch-buffer) @@ -381,7 +381,7 @@ (use-package! cython-mode - :when (featurep! +cython) + :when (modulep! +cython) :mode "\\.p\\(yx\\|x[di]\\)\\'" :config (setq cython-default-compile-format "cython -a %s") @@ -392,8 +392,8 @@ (use-package! flycheck-cython - :when (featurep! +cython) - :when (featurep! :checkers syntax) + :when (modulep! +cython) + :when (modulep! :checkers syntax) :after cython-mode) @@ -418,16 +418,16 @@ ;; ;;; LSP -(eval-when! (and (featurep! +lsp) - (not (featurep! :tools lsp +eglot))) +(eval-when! (and (modulep! +lsp) + (not (modulep! :tools lsp +eglot))) (use-package! lsp-python-ms - :unless (featurep! +pyright) + :unless (modulep! +pyright) :after lsp-mode :preface (after! python (setq lsp-python-ms-python-executable-cmd python-shell-interpreter))) (use-package! lsp-pyright - :when (featurep! +pyright) + :when (modulep! +pyright) :after lsp-mode)) diff --git a/modules/lang/python/doctor.el b/modules/lang/python/doctor.el index b45f14f24..65928df91 100644 --- a/modules/lang/python/doctor.el +++ b/modules/lang/python/doctor.el @@ -1,40 +1,40 @@ ;;; lang/python/doctor.el -*- lexical-binding: t; -*- -(assert! (or (not (featurep! +lsp)) - (featurep! :tools lsp)) +(assert! (or (not (modulep! +lsp)) + (modulep! :tools lsp)) "This module requires (:tools lsp)") -(assert! (or (not (featurep! +tree-sitter)) - (featurep! :tools tree-sitter)) +(assert! (or (not (modulep! +tree-sitter)) + (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") (if (not (or (executable-find "python") (executable-find "python3"))) (error! "Couldn't find python in your PATH") - (unless (featurep! +lsp) + (unless (modulep! +lsp) (unless (or (zerop (shell-command "python -c 'import setuptools'")) (zerop (shell-command "python3 -c 'import setuptools'"))) (warn! "setuptools wasn't detected, which anaconda-mode requires")))) -(when (featurep! +pyenv) +(when (modulep! +pyenv) (if (not (executable-find "pyenv")) (warn! "Couldn't find pyenv in your PATH") (unless (split-string (shell-command-to-string "pyenv versions --bare") "\n" t) (warn! "No versions of python are available via pyenv, did you forget to install one?")))) -(when (featurep! +conda) +(when (modulep! +conda) (unless (executable-find "conda") (warn! "Couldn't find conda in your PATH"))) -(when (featurep! +poetry) +(when (modulep! +poetry) (if (not (executable-find "poetry")) (warn! "Couldn't find poetry in your PATH"))) -(when (featurep! +cython) +(when (modulep! +cython) (unless (executable-find "cython") (warn! "Couldn't find cython. cython-mode will not work."))) -(when (featurep! +ipython) +(when (modulep! +ipython) (unless (executable-find "ipython") (warn! "Couldn't find ipython in your PATH"))) @@ -50,7 +50,7 @@ (unless (executable-find "isort") (warn! "Couldn't find isort. Import sorting will not work.")) -(when (featurep! :editor format) +(when (modulep! :editor format) (unless (executable-find "pyflakes") (warn! "Couldn't find pyflakes. Import management will not work.")) (unless (executable-find "black") diff --git a/modules/lang/python/packages.el b/modules/lang/python/packages.el index dbdbb3f0e..043b37a3b 100644 --- a/modules/lang/python/packages.el +++ b/modules/lang/python/packages.el @@ -3,31 +3,31 @@ ;; Major modes (package! pip-requirements :pin "216cd1690f80cc965d4ae47b8753fc185f778ff6") -(when (featurep! +cython) +(when (modulep! +cython) (package! cython-mode :pin "8afd932c28d08428d45bba03d6b642093e4c973b") - (when (featurep! :checkers syntax) + (when (modulep! :checkers syntax) (package! flycheck-cython :pin "ecc4454d35ab5317ab66a04406f36f0c1dbc0b76"))) ;; LSP -(when (featurep! +lsp) - (unless (featurep! :tools lsp +eglot) - (if (featurep! +pyright) +(when (modulep! +lsp) + (unless (modulep! :tools lsp +eglot) + (if (modulep! +pyright) (package! lsp-pyright :pin "c745228f39fdb35372b29b909f25fa6c98dc7c88") (package! lsp-python-ms :pin "f8e7c4bcaefbc3fd96e1ca53d17589be0403b828")))) ;; Programming environment (package! anaconda-mode :pin "160e4e7185881233d96da6722332bd6d038187a9") -(when (featurep! :completion company) +(when (modulep! :completion company) (package! company-anaconda :pin "da1566db41a68809ef7f91ebf2de28118067c89b")) ;; Environment management (package! pipenv :pin "3af159749824c03f59176aff7f66ddd6a5785a10") (package! pyvenv :pin "31ea715f2164dd611e7fc77b26390ef3ca93509b") -(when (featurep! +pyenv) +(when (modulep! +pyenv) (package! pyenv-mode :pin "b818901b8eac0e260ced66a6a5acabdbf6f5ba99")) -(when (featurep! +conda) +(when (modulep! +conda) (package! conda :pin "a65ed0084876366fd1b238bb2b8b36ee75ac98d8")) -(when (featurep! +poetry) +(when (modulep! +poetry) (package! poetry :pin "5b9ef569d629d79820e73b5380e54e443ba90616")) ;; Testing frameworks diff --git a/modules/lang/racket/config.el b/modules/lang/racket/config.el index c5a0d5052..2d890879b 100644 --- a/modules/lang/racket/config.el +++ b/modules/lang/racket/config.el @@ -26,20 +26,20 @@ #'rainbow-delimiters-mode #'highlight-quoted-mode) - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'racket-mode-local-vars-hook #'lsp! 'append)) - (when (featurep! +xp) + (when (modulep! +xp) (add-hook 'racket-mode-local-vars-hook #'racket-xp-mode) ;; Both flycheck and racket-xp produce error popups, but racket-xp's are ;; higher quality so disable flycheck's: - (when (featurep! :checkers syntax) + (when (modulep! :checkers syntax) (add-hook! 'racket-xp-mode-hook (defun +racket-disable-flycheck-h () (cl-pushnew 'racket flycheck-disabled-checkers))))) - (unless (or (featurep! :editor parinfer) - (featurep! :editor lispy)) + (unless (or (modulep! :editor parinfer) + (modulep! :editor lispy)) (add-hook 'racket-mode-hook #'racket-smart-open-bracket-mode)) (map! (:map racket-xp-mode-map diff --git a/modules/lang/raku/config.el b/modules/lang/raku/config.el index fcdaad0c7..87b8a015d 100644 --- a/modules/lang/raku/config.el +++ b/modules/lang/raku/config.el @@ -9,5 +9,5 @@ (use-package! flycheck-raku - :when (featurep! :checkers syntax) + :when (modulep! :checkers syntax) :after raku-mode) diff --git a/modules/lang/raku/packages.el b/modules/lang/raku/packages.el index 7a3a621e7..f8055282c 100644 --- a/modules/lang/raku/packages.el +++ b/modules/lang/raku/packages.el @@ -3,7 +3,7 @@ (package! raku-mode :pin "977b14a7c1295ebf2aad2f807d3f8e7c27aeb47f") -(when (featurep! :checkers syntax) +(when (modulep! :checkers syntax) (package! flycheck-raku :recipe (:host github :repo "widefox/flycheck-raku") :pin "b1acccd6e9d9753022571ee96d18b8e9f3227c65")) diff --git a/modules/lang/rest/config.el b/modules/lang/rest/config.el index 129f937fe..fe3634a64 100644 --- a/modules/lang/rest/config.el +++ b/modules/lang/rest/config.el @@ -30,16 +30,16 @@ certs, rather than reject them silently." (use-package! company-restclient - :when (featurep! :completion company) + :when (modulep! :completion company) :after restclient :config (set-company-backend! 'restclient-mode 'company-restclient)) (use-package! restclient-jq - :when (featurep! +jq) + :when (modulep! +jq) :after restclient) (use-package! jq-mode - :when (featurep! +jq) + :when (modulep! +jq) :after restclient-jq) diff --git a/modules/lang/rest/packages.el b/modules/lang/rest/packages.el index 96e00e869..c1443c000 100644 --- a/modules/lang/rest/packages.el +++ b/modules/lang/rest/packages.el @@ -2,9 +2,9 @@ ;;; lang/rest/packages.el (package! restclient :pin "9e2cfa86529133eba6c9ef53794be182f15e4c21") -(when (featurep! :completion company) +(when (modulep! :completion company) (package! company-restclient :pin "e5a3ec54edb44776738c13e13e34c85b3085277b")) -(when (featurep! +jq) +(when (modulep! +jq) (package! jq-mode :pin "071c1c29bac30351ad338136f2b625e5601365cd") (package! restclient-jq :pin "ae79e7dd283890072da69b8f48aeec1afd0d9442")) diff --git a/modules/lang/ruby/config.el b/modules/lang/ruby/config.el index 9a8841fac..61f2d46d1 100644 --- a/modules/lang/ruby/config.el +++ b/modules/lang/ruby/config.el @@ -18,10 +18,10 @@ (set-electric! 'ruby-mode :words '("else" "end" "elsif")) (set-repl-handler! 'ruby-mode #'inf-ruby) - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'ruby-mode-local-vars-hook #'lsp! 'append)) - (when (featurep! +tree-sitter) + (when (modulep! +tree-sitter) (add-hook 'ruby-mode-local-vars-hook #'tree-sitter! 'append)) (after! inf-ruby @@ -58,7 +58,7 @@ ;; the GC, so increase the amount of data Emacs reads from it at a time. (setq-hook! '(robe-mode-hook inf-ruby-mode-hook) read-process-output-max (* 1024 1024))) - (when (featurep! :editor evil) + (when (modulep! :editor evil) (add-hook 'robe-mode-hook #'evil-normalize-keymaps)) (map! :localleader :map robe-mode-map @@ -122,7 +122,7 @@ "o" #'bundle-open)) (use-package! chruby - :when (featurep! +chruby) + :when (modulep! +chruby) :hook (ruby-mode . chruby-use-corresponding) :config (setq rspec-use-rvm nil @@ -140,7 +140,7 @@ :mode ("/\\.rspec\\'" . text-mode) :init (setq rspec-use-spring-when-possible nil) - (when (featurep! :editor evil) + (when (modulep! :editor evil) (add-hook 'rspec-mode-hook #'evil-normalize-keymaps)) :config (set-popup-rule! "^\\*\\(rspec-\\)?compilation" :size 0.3 :ttl nil :select t) @@ -170,7 +170,7 @@ (use-package! minitest :defer t :config - (when (featurep! :editor evil) + (when (modulep! :editor evil) (add-hook 'minitest-mode-hook #'evil-normalize-keymaps)) (map! :localleader :map minitest-mode-map @@ -182,18 +182,18 @@ (use-package! projectile-rails - :when (featurep! +rails) + :when (modulep! +rails) :hook ((ruby-mode inf-ruby-mode projectile-rails-server-mode) . projectile-rails-mode) :hook (projectile-rails-server-mode . doom-mark-buffer-as-real-h) :hook (projectile-rails-mode . auto-insert-mode) :init (setq auto-insert-query nil) (setq inf-ruby-console-environment "development") - (when (featurep! :lang web) + (when (modulep! :lang web) (add-hook 'web-mode-hook #'projectile-rails-mode)) :config (set-popup-rule! "^\\*\\(projectile-\\)?rails" :ttl nil) - (when (featurep! :editor evil) + (when (modulep! :editor evil) (add-hook 'projectile-rails-mode-hook #'evil-normalize-keymaps)) (map! :localleader :map projectile-rails-mode-map diff --git a/modules/lang/ruby/doctor.el b/modules/lang/ruby/doctor.el index df74e9063..dfc0ecd66 100644 --- a/modules/lang/ruby/doctor.el +++ b/modules/lang/ruby/doctor.el @@ -1,20 +1,20 @@ ;;; lang/ruby/doctor.el -*- lexical-binding: t; -*- -(assert! (or (not (featurep! +lsp)) - (featurep! :tools lsp)) +(assert! (or (not (modulep! +lsp)) + (modulep! :tools lsp)) "This module requires (:tools lsp)") -(assert! (or (not (featurep! +tree-sitter)) - (featurep! :tools tree-sitter)) +(assert! (or (not (modulep! +tree-sitter)) + (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") (unless (executable-find "ruby") (warn! "Ruby isn't installed.")) -(when (and (executable-find "rbenv") (featurep! +rbenv)) +(when (and (executable-find "rbenv") (modulep! +rbenv)) (unless (split-string (shell-command-to-string "rbenv versions --bare") "\n" t) (warn! "No versions of ruby are available via rbenv, did you forget to install one?"))) -(when (and (executable-find "chruby") (featurep! +chruby)) +(when (and (executable-find "chruby") (modulep! +chruby)) (unless (split-string (shell-command-to-string "chruby") "\n" t) (warn! "No versions of ruby are available via chruby, did you forget to install one?"))) diff --git a/modules/lang/ruby/packages.el b/modules/lang/ruby/packages.el index f694dd1ff..9b302163f 100644 --- a/modules/lang/ruby/packages.el +++ b/modules/lang/ruby/packages.el @@ -7,7 +7,7 @@ ;; REPL (package! inf-ruby :pin "dbf4386bac12f1733257db6105e3f1fca05ffb79") -(when (featurep! :completion company) +(when (modulep! :completion company) (package! company-inf-ruby :pin "fe3e4863bc971fbb81edad447efad5795ead1b17")) ;; Programming environment @@ -19,11 +19,11 @@ (package! rake :pin "452ea0caca33376487103c64177c295ed2960cca") ;; Environment management -(when (featurep! +rbenv) +(when (modulep! +rbenv) (package! rbenv :pin "2ea1a5bdc1266caef1dd77700f2c8f42429b03f1")) -(when (featurep! +rvm) +(when (modulep! +rvm) (package! rvm :pin "c1f2642434b0f68d9baa0687127079ecd884ba12")) -(when (featurep! +chruby) +(when (modulep! +chruby) (package! chruby :pin "42bc6d521f832eca8e2ba210f30d03ad5529788f")) ;; Testing frameworks @@ -31,6 +31,6 @@ (package! minitest :pin "ddd152c990a528ad09a696bfad23afa4330ea4d7") ;; Rails -(when (featurep! +rails) +(when (modulep! +rails) (package! projectile-rails :pin "772f4766b5d1159a395b93459f07d5f1f6c02f4e") (package! inflections :pin "55caa66a7cc6e0b1a76143fd40eff38416928941")) diff --git a/modules/lang/rust/config.el b/modules/lang/rust/config.el index 4af8a0e6a..c93e4d326 100644 --- a/modules/lang/rust/config.el +++ b/modules/lang/rust/config.el @@ -40,16 +40,16 @@ (setq rustic-babel-format-src-block nil rustic-format-trigger nil) - (if (not (featurep! +lsp)) + (if (not (modulep! +lsp)) (after! rustic-flycheck (add-to-list 'flycheck-checkers 'rustic-clippy)) (setq rustic-lsp-client - (if (featurep! :tools lsp +eglot) + (if (modulep! :tools lsp +eglot) 'eglot 'lsp-mode)) (add-hook 'rustic-mode-local-vars-hook #'rustic-setup-lsp 'append)) - (when (featurep! +tree-sitter) + (when (modulep! +tree-sitter) (add-hook 'rustic-mode-local-vars-hook #'tree-sitter! 'append)) ;; HACK If lsp/eglot isn't available, it attempts to install lsp-mode via @@ -79,7 +79,7 @@ (use-package! racer - :unless (featurep! +lsp) + :unless (modulep! +lsp) :hook (rustic-mode-local-vars . racer-mode) :config (set-lookup-handlers! 'rustic-mode diff --git a/modules/lang/rust/doctor.el b/modules/lang/rust/doctor.el index 70a5d2bc7..a7e3ee467 100644 --- a/modules/lang/rust/doctor.el +++ b/modules/lang/rust/doctor.el @@ -1,12 +1,12 @@ ;; -*- lexical-binding: t; no-byte-compile: t; -*- ;;; lang/rust/doctor.el -(assert! (or (not (featurep! +lsp)) - (featurep! :tools lsp)) +(assert! (or (not (modulep! +lsp)) + (modulep! :tools lsp)) "This module requires (:tools lsp)") -(assert! (or (not (featurep! +tree-sitter)) - (featurep! :tools tree-sitter)) +(assert! (or (not (modulep! +tree-sitter)) + (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") (unless (executable-find "rustc") @@ -15,7 +15,7 @@ (unless (executable-find "cargo") (warn! "Couldn't find cargo binary")) -(if (featurep! +lsp) +(if (modulep! +lsp) (when (require 'rustic nil t) (pcase rustic-lsp-server (`rust-analyzer diff --git a/modules/lang/rust/packages.el b/modules/lang/rust/packages.el index 21518eca7..5de32ac8a 100644 --- a/modules/lang/rust/packages.el +++ b/modules/lang/rust/packages.el @@ -2,5 +2,5 @@ ;;; lang/rust/packages.el (package! rustic :pin "6eec9713876d698510ee3715698fd42c1571e307") -(unless (featurep! +lsp) +(unless (modulep! +lsp) (package! racer :pin "1e63e98626737ea9b662d4a9b1ffd6842b1c648c")) diff --git a/modules/lang/scala/config.el b/modules/lang/scala/config.el index 6bc663a42..c78a23b3f 100644 --- a/modules/lang/scala/config.el +++ b/modules/lang/scala/config.el @@ -15,11 +15,11 @@ (setq-hook! 'scala-mode-hook comment-line-break-function #'+scala-comment-indent-new-line-fn) - (when (featurep! +lsp) + (when (modulep! +lsp) (setq-hook! 'scala-mode-hook lsp-enable-indentation nil) (add-hook 'scala-mode-local-vars-hook #'lsp! 'append)) - (when (featurep! +tree-sitter) + (when (modulep! +tree-sitter) (add-hook 'scala-mode-local-vars-hook #'tree-sitter! 'append)) (set-ligatures! 'scala-mode diff --git a/modules/lang/scala/doctor.el b/modules/lang/scala/doctor.el index 76d3c6a05..6c975ca18 100644 --- a/modules/lang/scala/doctor.el +++ b/modules/lang/scala/doctor.el @@ -1,13 +1,13 @@ ;;; lang/scala/doctor.el -*- lexical-binding: t; -*- -(assert! (or (not (featurep! +lsp)) - (featurep! :tools lsp)) +(assert! (or (not (modulep! +lsp)) + (modulep! :tools lsp)) "This module requires (:tools lsp)") -(assert! (or (not (featurep! +tree-sitter)) - (featurep! :tools tree-sitter)) +(assert! (or (not (modulep! +tree-sitter)) + (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") -(if (and (featurep! +lsp) +(if (and (modulep! +lsp) (not (executable-find "metals-emacs"))) (warn! "metals-emacs isn't installed")) diff --git a/modules/lang/scala/packages.el b/modules/lang/scala/packages.el index bd676ec17..6513b2ca1 100644 --- a/modules/lang/scala/packages.el +++ b/modules/lang/scala/packages.el @@ -4,5 +4,5 @@ (package! sbt-mode :pin "9fe1e8807c22cc1dc56a6233e000969518907f4d") (package! scala-mode :pin "598cb680f321d9609295aa9b4679040cc703b602") -(when (featurep! +lsp) +(when (modulep! +lsp) (package! lsp-metals :pin "097d6021a4ff0eae704cc3074e064c9509c5cafc")) diff --git a/modules/lang/scheme/config.el b/modules/lang/scheme/config.el index f43a53bdd..889a9d36a 100644 --- a/modules/lang/scheme/config.el +++ b/modules/lang/scheme/config.el @@ -70,12 +70,12 @@ (use-package! flycheck-guile - :when (featurep! +guile) - :when (featurep! :checkers syntax) + :when (modulep! +guile) + :when (modulep! :checkers syntax) :after geiser) ;; Add Guix channels to Guile load path -(when (and (featurep! +guile) (executable-find "guix")) +(when (and (modulep! +guile) (executable-find "guix")) (after! geiser-guile (add-to-list 'geiser-guile-load-path (expand-file-name "~/.config/guix/current/share/guile/site/3.0")))) diff --git a/modules/lang/scheme/packages.el b/modules/lang/scheme/packages.el index 1fbe0e813..bf26ee60f 100644 --- a/modules/lang/scheme/packages.el +++ b/modules/lang/scheme/packages.el @@ -3,25 +3,25 @@ (when (package! geiser :pin "9507e81a075351d090fd1f4f708efd05d6470cba") (package! macrostep-geiser :pin "f6a2d5bb96ade4f23df557649af87ebd0cc45125") - (when (featurep! +chez) + (when (modulep! +chez) (package! geiser-chez :pin "48427d4aecc6fed751d266673f1ce2ad57ddbcfc")) - (when (featurep! +chibi) + (when (modulep! +chibi) (package! geiser-chibi :pin "5a6a5a580ea45cd4974df21629a8d50cbe3d6e99")) - (when (featurep! +chicken) + (when (modulep! +chicken) (package! geiser-chicken :pin "79a9ac78f4df7c9ec1f918313c543c116dbb8b70")) - (when (featurep! +gambit) + (when (modulep! +gambit) (package! geiser-gambit :pin "381d74ca5059b44fe3d8b5daf42214019c6d1a88")) - (when (featurep! +gauche) + (when (modulep! +gauche) (package! geiser-gauche :pin "fd52cbaed9b0a0d0f10e87674b5747e5ee44ebc9")) - (when (featurep! +guile) + (when (modulep! +guile) (package! geiser-guile :pin "c641fcc50b6b86ca95743122b5206cdcd475f96e") - (when (featurep! :checkers syntax) + (when (modulep! :checkers syntax) (package! flycheck-guile :recipe (:host github :repo "flatwhatson/flycheck-guile") :pin "e46d6e5453dd7471309fae6549445c48e6d8f340"))) - (when (featurep! +kawa) + (when (modulep! +kawa) (package! geiser-kawa :pin "5896b19642923f74f718eb68d447560b2d26d797")) - (when (featurep! +mit) + (when (modulep! +mit) (package! geiser-mit :pin "4e90e9ae815e89f3540fb9644e6016c663ef5765")) - (when (featurep! +racket) + (when (modulep! +racket) (package! geiser-racket :pin "22e56ce80389544d3872cf4beb4008fb514b2218"))) diff --git a/modules/lang/sh/config.el b/modules/lang/sh/config.el index c9425ee72..34b7032d5 100755 --- a/modules/lang/sh/config.el +++ b/modules/lang/sh/config.el @@ -37,10 +37,10 @@ ;; Other :dot "." :dot "source") - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'sh-mode-local-vars-hook #'lsp! 'append)) - (when (featurep! +tree-sitter) + (when (modulep! +tree-sitter) (add-hook 'sh-mode-local-vars-hook #'tree-sitter! 'append)) (setq sh-indent-after-continuation 'always) @@ -76,8 +76,8 @@ (sp-local-pair 'sh-mode "`" "`" :unless '(sp-point-before-word-p sp-point-before-same-p))) (use-package! company-shell - :when (featurep! :completion company) - :unless (featurep! +lsp) + :when (modulep! :completion company) + :unless (modulep! +lsp) :after sh-script :config (set-company-backend! 'sh-mode '(company-shell company-files)) @@ -86,13 +86,13 @@ company-shell-dont-fetch-meta IS-MAC)) (use-package! fish-mode - :when (featurep! +fish) + :when (modulep! +fish) :defer t :config (set-formatter! 'fish-mode #'fish_indent)) (use-package! powershell - :when (featurep! +powershell) + :when (modulep! +powershell) :defer t :config - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'powershell-mode-local-vars-hook #'lsp! 'append))) diff --git a/modules/lang/sh/doctor.el b/modules/lang/sh/doctor.el index 86ba585a2..14f4d0e78 100644 --- a/modules/lang/sh/doctor.el +++ b/modules/lang/sh/doctor.el @@ -1,13 +1,13 @@ ;;; lang/sh/doctor.el -*- lexical-binding: t; -*- -(when (featurep! :checkers syntax) +(when (modulep! :checkers syntax) (unless (executable-find "shellcheck") (warn! "Couldn't find shellcheck. Shell script linting will not work"))) -(when (featurep! :editor format) +(when (modulep! :editor format) (unless (executable-find "shfmt") (warn! "Couldn't find shfmt. Code formatting will not work."))) -(assert! (or (not (featurep! +tree-sitter)) - (featurep! :tools tree-sitter)) +(assert! (or (not (modulep! +tree-sitter)) + (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") diff --git a/modules/lang/sh/packages.el b/modules/lang/sh/packages.el index 08f219025..277e24097 100644 --- a/modules/lang/sh/packages.el +++ b/modules/lang/sh/packages.el @@ -1,11 +1,11 @@ ;; -*- no-byte-compile: t; -*- ;;; lang/sh/packages.el -(when (featurep! :completion company) +(when (modulep! :completion company) (package! company-shell :pin "a77f4de75912aa87314cde92c603b831d5050246")) -(when (featurep! +fish) +(when (modulep! +fish) (package! fish-mode :pin "a7c953b1491ac3a3e00a7b560f2c9f46b3cb5c04")) -(when (featurep! +powershell) +(when (modulep! +powershell) (package! powershell :pin "ce1f0ae0b2e41cd0934a9dfbf2ff016b1d14e9c0")) diff --git a/modules/lang/sml/config.el b/modules/lang/sml/config.el index db09119d1..7a5d69e04 100644 --- a/modules/lang/sml/config.el +++ b/modules/lang/sml/config.el @@ -23,7 +23,7 @@ (use-package! company-mlton - :when (featurep! :completion company) + :when (modulep! :completion company) :hook (sml-mode . company-mlton-init) :config (set-company-backend! 'sml-mode company-mlton-grouped-backend)) diff --git a/modules/lang/sml/packages.el b/modules/lang/sml/packages.el index a5c76f7ef..a8401c15e 100644 --- a/modules/lang/sml/packages.el +++ b/modules/lang/sml/packages.el @@ -2,7 +2,7 @@ ;;; lang/sml/packages.el (package! sml-mode :pin "0338e9729bce469ad401b4af1b11fd4aeaf93242") -(when (featurep! :completion company) +(when (modulep! :completion company) (package! company-mlton :recipe (:host github :repo "MatthewFluet/company-mlton" :files ("*.el" "*.basis")) :pin "9b09d209b4767a2af24784fb5321390ed1d445bf")) diff --git a/modules/lang/solidity/config.el b/modules/lang/solidity/config.el index eb8f318cd..e5e072c0c 100644 --- a/modules/lang/solidity/config.el +++ b/modules/lang/solidity/config.el @@ -9,7 +9,7 @@ (set-company-backend! 'solidity-mode 'company-solidity) (use-package! solidity-flycheck ; included with solidity-mode - :when (featurep! :checkers syntax) + :when (modulep! :checkers syntax) :config (setq flycheck-solidity-solc-addstd-contracts t) (when (funcall flycheck-executable-find solidity-solc-path) @@ -18,5 +18,5 @@ (add-to-list 'flycheck-checkers 'solium-checker nil #'eq))) (use-package! company-solidity - :when (featurep! :completion company) + :when (modulep! :completion company) :config (delq! 'company-solidity company-backends))) diff --git a/modules/lang/solidity/packages.el b/modules/lang/solidity/packages.el index 7af32f2a3..6eff2296a 100644 --- a/modules/lang/solidity/packages.el +++ b/modules/lang/solidity/packages.el @@ -2,7 +2,7 @@ ;;; lang/solidity/packages.el (package! solidity-mode :pin "20fb77e089e10187b37ae1a94153017b82ed2a0a") -(when (featurep! :completion company) +(when (modulep! :completion company) (package! company-solidity)) -(when (featurep! :checkers syntax) +(when (modulep! :checkers syntax) (package! solidity-flycheck)) diff --git a/modules/lang/swift/config.el b/modules/lang/swift/config.el index 7f38cab96..2e721ec18 100644 --- a/modules/lang/swift/config.el +++ b/modules/lang/swift/config.el @@ -3,27 +3,27 @@ (after! swift-mode (set-repl-handler! 'swift-mode #'run-swift) - (when (featurep! +tree-sitter) + (when (modulep! +tree-sitter) (add-hook 'swift-mode-local-vars-hook #'tree-sitter! 'append))) (use-package! flycheck-swift - :when (featurep! :checkers syntax) - :unless (featurep! +lsp) + :when (modulep! :checkers syntax) + :unless (modulep! +lsp) :after swift-mode :config (flycheck-swift-setup)) (use-package! company-sourcekit - :when (featurep! :completion company) - :unless (featurep! +lsp) + :when (modulep! :completion company) + :unless (modulep! +lsp) :after swift-mode :config (set-company-backend! 'swift-mode '(company-sourcekit company-yasnippet))) (use-package! lsp-sourcekit - :when (featurep! +lsp) + :when (modulep! +lsp) :after swift-mode :init (add-hook 'swift-mode-local-vars-hook #'lsp! 'append) :config diff --git a/modules/lang/swift/doctor.el b/modules/lang/swift/doctor.el index c5efe98bc..15b420de4 100644 --- a/modules/lang/swift/doctor.el +++ b/modules/lang/swift/doctor.el @@ -1,5 +1,5 @@ ;;; lang/swift/doctor.el -*- lexical-binding: t; -*- -(assert! (or (not (featurep! +tree-sitter)) - (featurep! :tools tree-sitter)) +(assert! (or (not (modulep! +tree-sitter)) + (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") diff --git a/modules/lang/swift/packages.el b/modules/lang/swift/packages.el index 6102903d5..fe8330b3d 100644 --- a/modules/lang/swift/packages.el +++ b/modules/lang/swift/packages.el @@ -3,9 +3,9 @@ (package! swift-mode :pin "0d1ef0ef183398143b13fb8c76c1284df0d5e616") -(if (featurep! +lsp) +(if (modulep! +lsp) (package! lsp-sourcekit :pin "97ff36b228a61e69734c7180f33cc6951b1a600f") - (when (featurep! :completion company) + (when (modulep! :completion company) (package! company-sourcekit :pin "a1860ad4dd3a542acd2fa0dfac2a388cbdf4af0c")) - (when (featurep! :checkers syntax) + (when (modulep! :checkers syntax) (package! flycheck-swift :pin "4c5ad401252400a78da395fd56a71e67ff8c2761"))) diff --git a/modules/lang/terra/packages.el b/modules/lang/terra/packages.el index 6e8969983..8ce7731ad 100644 --- a/modules/lang/terra/packages.el +++ b/modules/lang/terra/packages.el @@ -5,5 +5,5 @@ :recipe (:host github :repo "StanfordLegion/terra-mode") :pin "ceef8cae5bddc70ee3d5d4d00aa323e3cd6a11be") -(when (featurep! :completion company) +(when (modulep! :completion company) (package! company-lua :pin "29f6819de4d691e5fd0b62893a9f4fbc1c6fcb52")) diff --git a/modules/lang/web/+css.el b/modules/lang/web/+css.el index 89bb548de..fdcc4c744 100644 --- a/modules/lang/web/+css.el +++ b/modules/lang/web/+css.el @@ -46,14 +46,14 @@ If set to `nil', disable all the above behaviors.") "rb" #'+css/toggle-inline-or-block) (use-package! counsel-css - :when (featurep! :completion ivy) + :when (modulep! :completion ivy) :hook (css-mode . counsel-css-imenu-setup) :init (map! :map (css-mode-map scss-mode-map less-css-mode-map) :localleader ";" #'counsel-css)) (use-package! helm-css-scss - :when (featurep! :completion helm) + :when (modulep! :completion helm) :defer t :init (map! :map (css-mode-map scss-mode-map less-css-mode-map) @@ -71,12 +71,12 @@ If set to `nil', disable all the above behaviors.") ;; ;;; Tools -(when (featurep! +lsp) +(when (modulep! +lsp) (add-hook! '(css-mode-local-vars-hook scss-mode-local-vars-hook sass-mode-local-vars-hook less-css-mode-local-vars-hook) :append #'lsp!)) -(when (featurep! +tree-sitter) +(when (modulep! +tree-sitter) (add-hook 'css-mode-local-vars-hook #'tree-sitter! 'append)) diff --git a/modules/lang/web/+html.el b/modules/lang/web/+html.el index a1efe6fdc..4de11db36 100644 --- a/modules/lang/web/+html.el +++ b/modules/lang/web/+html.el @@ -163,13 +163,13 @@ (set-company-backend! 'slim-mode 'company-web-slim)) -(when (featurep! +lsp) +(when (modulep! +lsp) (add-hook! '(html-mode-local-vars-hook web-mode-local-vars-hook nxml-mode-local-vars-hook) :append #'lsp!)) -(when (featurep! +tree-sitter) +(when (modulep! +tree-sitter) (add-hook! '(html-mode-local-vars-hook mhtml-mode-local-vars-hook) :append #'tree-sitter!)) diff --git a/modules/lang/web/autoload/evil.el b/modules/lang/web/autoload/evil.el index ebbd100fa..4290d48b2 100644 --- a/modules/lang/web/autoload/evil.el +++ b/modules/lang/web/autoload/evil.el @@ -1,5 +1,5 @@ ;;; lang/html/autoload/evil.el -*- lexical-binding: t; -*- -;;;###if (featurep! :editor evil) +;;;###if (modulep! :editor evil) ;;;###autoload (autoload '+web:encode-html-entities "lang/web/autoload/evil" nil t) (evil-define-operator +web:encode-html-entities (beg end &optional bang input) diff --git a/modules/lang/web/autoload/html.el b/modules/lang/web/autoload/html.el index 572d30bac..28655a11e 100644 --- a/modules/lang/web/autoload/html.el +++ b/modules/lang/web/autoload/html.el @@ -127,7 +127,7 @@ snippet, or `emmet-expand-yas'/`emmet-expand-line', depending on whether (not (or (memq (char-after) (list ?\n ?\s ?\t)) (eobp)))) #'indent-for-tab-command) - ((featurep! :editor snippets) + ((modulep! :editor snippets) (require 'yasnippet) (if (yas--templates-for-key-at-point) #'yas-expand diff --git a/modules/lang/web/config.el b/modules/lang/web/config.el index 2185048c0..c9fcc4ef8 100644 --- a/modules/lang/web/config.el +++ b/modules/lang/web/config.el @@ -40,7 +40,7 @@ :modes '(php-mode web-mode css-mode haml-mode pug-mode) :files (or "wp-config.php" "wp-config-sample.php")) -(when (featurep! :lang javascript) +(when (modulep! :lang javascript) (def-project-mode! +web-angularjs-mode :modes '(+javascript-npm-mode) :when (+javascript-npm-dep-p '(angular @angular/core)) diff --git a/modules/lang/web/doctor.el b/modules/lang/web/doctor.el index 575bdccb4..782e15350 100644 --- a/modules/lang/web/doctor.el +++ b/modules/lang/web/doctor.el @@ -1,11 +1,11 @@ ;;; lang/web/doctor.el -*- lexical-binding: t; -*- -(assert! (or (not (featurep! +lsp)) - (featurep! :tools lsp)) +(assert! (or (not (modulep! +lsp)) + (modulep! :tools lsp)) "This module requires (:tools lsp)") -(assert! (or (not (featurep! +tree-sitter)) - (featurep! :tools tree-sitter)) +(assert! (or (not (modulep! +tree-sitter)) + (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") (unless (executable-find "js-beautify") diff --git a/modules/lang/web/packages.el b/modules/lang/web/packages.el index 9241d76d0..0f04a3a15 100644 --- a/modules/lang/web/packages.el +++ b/modules/lang/web/packages.el @@ -7,7 +7,7 @@ (package! pug-mode :pin "73f8c2f95eba695f701df20c8436f49abadebdc1") (package! slim-mode :pin "3636d18ab1c8b316eea71c4732eb44743e2ded87") (when (package! web-mode :pin "efa853e5cfff8e0bcacbda9d1c6696b33da91b03") - (when (featurep! :completion company) + (when (modulep! :completion company) (package! company-web :pin "863fb84b81ed283474e50330cd8d27b1ca0d74f1"))) ;; +css.el @@ -18,7 +18,7 @@ (package! stylus-mode :pin "1ad7c51f3c6a6ae64550d9510c5e4e8470014375") (package! sws-mode :pin "1ad7c51f3c6a6ae64550d9510c5e4e8470014375") (package! rainbow-mode :pin "949166cc0146bc9fabf74ce70c1c4a097f4cffd4") -(when (featurep! :completion ivy) +(when (modulep! :completion ivy) (package! counsel-css :pin "8e9c0515fc952452eee786d8ebb43d48ea86c9f8")) -(when (featurep! :completion helm) +(when (modulep! :completion helm) (package! helm-css-scss :pin "48b996f73af1fef8d6e88a1c545d98f8c50b0cf3")) diff --git a/modules/lang/yaml/config.el b/modules/lang/yaml/config.el index 29cdd96ce..9ebb79637 100644 --- a/modules/lang/yaml/config.el +++ b/modules/lang/yaml/config.el @@ -3,7 +3,7 @@ (use-package! yaml-mode :mode "Procfile\\'" :init - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'yaml-mode-local-vars-hook #'lsp! 'append)) :config (setq-hook! 'yaml-mode-hook tab-width yaml-indent-offset)) diff --git a/modules/lang/zig/config.el b/modules/lang/zig/config.el index 5a5c1d385..94aaaf232 100644 --- a/modules/lang/zig/config.el +++ b/modules/lang/zig/config.el @@ -12,13 +12,13 @@ :config (setq zig-format-on-save nil) ; rely on :editor format instead - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'zig-mode-local-vars-hook #'lsp! 'append)) - (when (featurep! +tree-sitter) + (when (modulep! +tree-sitter) (add-hook 'zig-mode-local-vars-hook #'tree-sitter! 'append)) - (when (featurep! :checkers syntax) + (when (modulep! :checkers syntax) (flycheck-define-checker zig "A zig syntax checker using zig's `ast-check` command." :command ("zig" "ast-check" (eval (buffer-file-name))) diff --git a/modules/lang/zig/doctor.el b/modules/lang/zig/doctor.el index cfa477cdd..361e4d69c 100644 --- a/modules/lang/zig/doctor.el +++ b/modules/lang/zig/doctor.el @@ -1,17 +1,17 @@ ;; -*- lexical-binding: t; no-byte-compile: t; -*- ;;; lang/zig/doctor.el -(assert! (or (not (featurep! +lsp)) - (featurep! :tools lsp)) +(assert! (or (not (modulep! +lsp)) + (modulep! :tools lsp)) "This module requires (:tools lsp)") -(assert! (or (not (featurep! +tree-sitter)) - (featurep! :tools tree-sitter)) +(assert! (or (not (modulep! +tree-sitter)) + (modulep! :tools tree-sitter)) "This module requires (:tools tree-sitter)") (unless (executable-find "zig") (warn! "Couldn't find zig binary")) -(when (featurep! +lsp) +(when (modulep! +lsp) (unless (executable-find "zls") (warn! "Couldn't find zls binary"))) diff --git a/modules/os/tty/config.el b/modules/os/tty/config.el index 6fe259be2..674c00fea 100644 --- a/modules/os/tty/config.el +++ b/modules/os/tty/config.el @@ -24,7 +24,7 @@ (add-hook! 'tty-setup-hook (defun doom-init-clipboard-in-tty-emacs-h () ;; Fix the clipboard in tty Emacs by... - (if (featurep! +osc) + (if (modulep! +osc) ;; ...communicating with the clibpoard through OSC escape codes (must ;; use a terminal that supports it) (and (require 'clipetty nil t) diff --git a/modules/os/tty/packages.el b/modules/os/tty/packages.el index 6a13e4062..2a30f68ea 100644 --- a/modules/os/tty/packages.el +++ b/modules/os/tty/packages.el @@ -1,7 +1,7 @@ ;; -*- no-byte-compile: t; -*- ;;; os/tty/packages.el -(if (featurep! +osc) +(if (modulep! +osc) (package! clipetty :recipe (:host github :repo "spudlyo/clipetty") :pin "01b39044b9b65fa4ea7d3166f8b1ffab6f740362") diff --git a/modules/term/eshell/autoload/company.el b/modules/term/eshell/autoload/company.el index 22dfd6b4c..82f122fcf 100644 --- a/modules/term/eshell/autoload/company.el +++ b/modules/term/eshell/autoload/company.el @@ -1,5 +1,5 @@ ;;; term/eshell/autoload/company.el -*- lexical-binding: t; -*- -;;;###if (featurep! :completion company) +;;;###if (modulep! :completion company) ;; REVIEW Refactor me diff --git a/modules/term/eshell/autoload/eshell.el b/modules/term/eshell/autoload/eshell.el index aa7704593..bc83ee5d4 100644 --- a/modules/term/eshell/autoload/eshell.el +++ b/modules/term/eshell/autoload/eshell.el @@ -148,7 +148,7 @@ Once the eshell process is killed, the previous frame layout is restored." (defun +eshell/search-history () "Search the eshell command history with helm, ivy or `eshell-list-history'." (interactive) - (cond ((featurep! :completion ivy) + (cond ((modulep! :completion ivy) (require 'em-hist) (let* ((ivy-completion-beg (eshell-bol)) (ivy-completion-end (point-at-eol)) @@ -163,9 +163,9 @@ Once the eshell process is killed, the previous frame layout is restored." (ring-elements eshell-history-ring))) :initial-input input :action #'ivy-completion-in-region-action))) - ((featurep! :completion helm) + ((modulep! :completion helm) (helm-eshell-history)) - ((featurep! :completion vertico) + ((modulep! :completion vertico) (forward-char 1) ;; Move outside of read only prompt text. (consult-history)) ((eshell-list-history)))) diff --git a/modules/term/eshell/autoload/evil.el b/modules/term/eshell/autoload/evil.el index e024063fa..40ce7a956 100644 --- a/modules/term/eshell/autoload/evil.el +++ b/modules/term/eshell/autoload/evil.el @@ -1,5 +1,5 @@ ;;; term/eshell/autoload/evil.el -*- lexical-binding: t; -*- -;;;###if (featurep! :editor evil) +;;;###if (modulep! :editor evil) ;;;###autoload (autoload '+eshell:run "term/eshell/autoload/evil" nil t) (evil-define-command +eshell:run (command bang) diff --git a/modules/term/eshell/config.el b/modules/term/eshell/config.el index ac95ddbd1..8f733ee2e 100644 --- a/modules/term/eshell/config.el +++ b/modules/term/eshell/config.el @@ -86,7 +86,7 @@ You should use `set-eshell-alias!' to change this.") (add-hook 'eshell-mode-hook #'smartparens-mode) ;; Persp-mode/workspaces integration - (when (featurep! :ui workspaces) + (when (modulep! :ui workspaces) (add-hook 'persp-activated-functions #'+eshell-switch-workspace-fn) (add-hook 'persp-before-switch-functions #'+eshell-save-workspace-fn)) diff --git a/modules/tools/ansible/config.el b/modules/tools/ansible/config.el index efef20a50..23ee62e19 100644 --- a/modules/tools/ansible/config.el +++ b/modules/tools/ansible/config.el @@ -7,7 +7,7 @@ :config (setq ansible-section-face 'font-lock-variable-name-face ansible-task-label-face 'font-lock-doc-face) - (when (featurep! :completion company) + (when (modulep! :completion company) (set-company-backend! 'ansible 'company-ansible)) (map! :map ansible-key-map :localleader diff --git a/modules/tools/ansible/packages.el b/modules/tools/ansible/packages.el index 88cfab9ac..2726bd4a3 100644 --- a/modules/tools/ansible/packages.el +++ b/modules/tools/ansible/packages.el @@ -6,5 +6,5 @@ (package! jinja2-mode :pin "03e5430a7efe1d163a16beaf3c82c5fd2c2caee1") (package! yaml-mode :pin "535273d5a1eb76999d20afbcf4d9f056d8ffd2da") -(when (featurep! :completion company) +(when (modulep! :completion company) (package! company-ansible :pin "79dd421b161efa49fbdffad57fa40edb41f484a3")) diff --git a/modules/tools/biblio/config.el b/modules/tools/biblio/config.el index e8d7a9d03..2cc83f60e 100644 --- a/modules/tools/biblio/config.el +++ b/modules/tools/biblio/config.el @@ -17,7 +17,7 @@ (use-package! citar - :when (featurep! :completion vertico) + :when (modulep! :completion vertico) :no-require :config (setq org-cite-insert-processor 'citar @@ -25,7 +25,7 @@ org-cite-activate-processor 'citar)) (use-package! citar-embark - :when (featurep! :completion vertico) + :when (modulep! :completion vertico) :after citar embark :config (citar-embark-mode)) @@ -39,8 +39,8 @@ ;;; Third-party (use-package! bibtex-completion - :when (or (featurep! :completion ivy) - (featurep! :completion helm)) + :when (or (modulep! :completion ivy) + (modulep! :completion helm)) :defer t :config (setq bibtex-completion-additional-search-fields '(keywords) @@ -50,7 +50,7 @@ (use-package! ivy-bibtex - :when (featurep! :completion ivy) + :when (modulep! :completion ivy) :defer t :config (add-to-list 'ivy-re-builders-alist '(ivy-bibtex . ivy--regex-plus))) diff --git a/modules/tools/biblio/packages.el b/modules/tools/biblio/packages.el index 433ab7256..35fd8a450 100644 --- a/modules/tools/biblio/packages.el +++ b/modules/tools/biblio/packages.el @@ -1,13 +1,13 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/biblio/packages.el -(when (featurep! :completion ivy) +(when (modulep! :completion ivy) (package! bibtex-completion :pin "ce8c17690ddad73d01531084b282f221f8eb6669") (package! ivy-bibtex :pin "ce8c17690ddad73d01531084b282f221f8eb6669")) -(when (featurep! :completion helm) +(when (modulep! :completion helm) (package! bibtex-completion :pin "ce8c17690ddad73d01531084b282f221f8eb6669") (package! helm-bibtex :pin "ce8c17690ddad73d01531084b282f221f8eb6669")) -(when (featurep! :completion vertico) +(when (modulep! :completion vertico) (package! citar :pin "146f2cb5a31d4968ec17f39f189e4ea131ccaf56") (package! citar-embark :pin "146f2cb5a31d4968ec17f39f189e4ea131ccaf56")) diff --git a/modules/tools/debugger/autoload/evil.el b/modules/tools/debugger/autoload/evil.el index 90d87553a..a5e13767e 100644 --- a/modules/tools/debugger/autoload/evil.el +++ b/modules/tools/debugger/autoload/evil.el @@ -1,5 +1,5 @@ ;; tools/debugger/autoload/evil.el -*- lexical-binding: t; -*- -;;;###if (featurep! :editor evil) +;;;###if (modulep! :editor evil) ;;;###autoload (autoload '+debugger:start "tools/debugger/autoload/evil" nil t) (evil-define-command +debugger:start (&optional path) diff --git a/modules/tools/debugger/config.el b/modules/tools/debugger/config.el index ddacbf65e..8a24fc6a6 100644 --- a/modules/tools/debugger/config.el +++ b/modules/tools/debugger/config.el @@ -109,7 +109,7 @@ (use-package! dap-mode - :when (and (featurep! +lsp) (not (featurep! :tools lsp +eglot))) + :when (and (modulep! +lsp) (not (modulep! :tools lsp +eglot))) :hook (dap-mode . dap-tooltip-mode) :init (setq dap-breakpoints-file (concat doom-etc-dir "dap-breakpoints") @@ -155,6 +155,6 @@ (use-package! dap-ui - :when (featurep! +lsp) + :when (modulep! +lsp) :hook (dap-mode . dap-ui-mode) :hook (dap-ui-mode . dap-ui-controls-mode)) diff --git a/modules/tools/debugger/doctor.el b/modules/tools/debugger/doctor.el index 5583b0efd..3515725bb 100644 --- a/modules/tools/debugger/doctor.el +++ b/modules/tools/debugger/doctor.el @@ -1,4 +1,4 @@ ;;; tools/debugger/doctor.el -*- lexical-binding: t; -*- -(when (and (featurep! +lsp) (featurep! :tools lsp +eglot)) +(when (and (modulep! +lsp) (modulep! :tools lsp +eglot)) (warn! "+lsp flag is not compatible with :tools (lsp +eglot). Choose only one of (eglot or dap-mode) please")) diff --git a/modules/tools/debugger/packages.el b/modules/tools/debugger/packages.el index a7df83b8f..45d772e3b 100644 --- a/modules/tools/debugger/packages.el +++ b/modules/tools/debugger/packages.el @@ -2,9 +2,9 @@ ;;; tools/debugger/packages.el (when (package! realgud :pin "3c88611c4ed59069093187c2a039b8d05cbe53e8") - (when (featurep! :lang javascript) + (when (modulep! :lang javascript) (package! realgud-trepan-ni :pin "0ec088ea343835e24ae73da09bea96bfb02a3130"))) -(when (featurep! +lsp) +(when (modulep! +lsp) (package! dap-mode :pin "50c2a99059da03ac5274d6794ea4758ddf253dc1") (package! posframe :pin "0d23bc5f7cfac00277d83ae7ba52c48685bcbc68")) diff --git a/modules/tools/docker/config.el b/modules/tools/docker/config.el index 83f3ac53d..5f520a7d6 100644 --- a/modules/tools/docker/config.el +++ b/modules/tools/docker/config.el @@ -3,5 +3,5 @@ (after! dockerfile-mode (set-docsets! 'dockerfile-mode "Docker") - (when (featurep! +lsp) + (when (modulep! +lsp) (add-hook 'dockerfile-mode-local-vars-hook #'lsp! 'append))) diff --git a/modules/tools/eval/autoload/evil.el b/modules/tools/eval/autoload/evil.el index 13085c6bc..1aa335a08 100644 --- a/modules/tools/eval/autoload/evil.el +++ b/modules/tools/eval/autoload/evil.el @@ -1,5 +1,5 @@ ;; tools/eval/autoload/evil.el -*- lexical-binding: t; -*- -;;;###if (featurep! :editor evil) +;;;###if (modulep! :editor evil) ;;;###autoload (autoload '+eval:region "tools/eval/autoload/evil" nil t) (evil-define-operator +eval:region (beg end) diff --git a/modules/tools/eval/config.el b/modules/tools/eval/config.el index 280bcd348..433eddb6a 100644 --- a/modules/tools/eval/config.el +++ b/modules/tools/eval/config.el @@ -71,7 +71,7 @@ buffer rather than an overlay on the line at point or the minibuffer.") ;; Display evaluation results in an overlay at the end of the current line. If ;; the output is more than `+eval-popup-min-lines' (4) lines long, it is ;; displayed in a popup. - (when (featurep! +overlay) + (when (modulep! +overlay) (defadvice! +eval--show-output-in-overlay-a (fn) :filter-return #'quickrun--make-sentinel (lambda (process event) @@ -97,5 +97,5 @@ buffer rather than an overlay on the line at point or the minibuffer.") (use-package! eros - :when (featurep! +overlay) + :when (modulep! +overlay) :hook (emacs-lisp-mode . eros-mode)) diff --git a/modules/tools/eval/packages.el b/modules/tools/eval/packages.el index 2679c8938..68cdce725 100644 --- a/modules/tools/eval/packages.el +++ b/modules/tools/eval/packages.el @@ -2,5 +2,5 @@ ;;; tools/eval/packages.el (package! quickrun :pin "314beae43cac2e4943e9ed4850e8e147bc3d2fac") -(when (featurep! +overlay) +(when (modulep! +overlay) (package! eros :pin "dd8910279226259e100dab798b073a52f9b4233a")) diff --git a/modules/tools/gist/autoload/evil.el b/modules/tools/gist/autoload/evil.el index de7f4d2f1..654d658ee 100644 --- a/modules/tools/gist/autoload/evil.el +++ b/modules/tools/gist/autoload/evil.el @@ -1,5 +1,5 @@ ;;; tools/gist/autoload/evil.el -*- lexical-binding: t; -*- -;;;###if (featurep! :editor evil) +;;;###if (modulep! :editor evil) ;;;###autoload (autoload '+gist:send "tools/gist/autoload/evil" nil t) (evil-define-operator +gist:send (bang) diff --git a/modules/tools/lookup/autoload/docsets.el b/modules/tools/lookup/autoload/docsets.el index 8a60325fc..fc5f1a29c 100644 --- a/modules/tools/lookup/autoload/docsets.el +++ b/modules/tools/lookup/autoload/docsets.el @@ -1,5 +1,5 @@ ;;; tools/lookup/autoload/docsets.el -*- lexical-binding: t; -*- -;;;###if (featurep! +docsets) +;;;###if (modulep! +docsets) (defvar dash-docs-docsets nil) @@ -102,7 +102,7 @@ installed with `dash-docs-install-docset'." (cl-remove-if-not #'dash-docs-docset-path (or docsets dash-docs-docsets)))) (query (doom-thing-at-point-or-region query))) (doom-log "Searching docsets %s" dash-docs-docsets) - (cond ((featurep! :completion vertico) + (cond ((modulep! :completion vertico) (dash-docs-initialize-debugging-buffer) (dash-docs-create-buffer-connections) (dash-docs-create-common-connections) @@ -118,9 +118,9 @@ installed with `dash-docs-install-docset'." :initial query) (user-error "Aborted")))) (dash-docs-browse-url (cdr (assoc result (funcall sink nil)))))) - ((featurep! :completion ivy) + ((modulep! :completion ivy) (counsel-dash query)) - ((featurep! :completion helm) + ((modulep! :completion helm) (helm-dash query)) ((user-error "No dash backend is installed, enable ivy or helm."))))) diff --git a/modules/tools/lookup/autoload/evil.el b/modules/tools/lookup/autoload/evil.el index f0bf8dd1c..ae507ad3e 100644 --- a/modules/tools/lookup/autoload/evil.el +++ b/modules/tools/lookup/autoload/evil.el @@ -1,5 +1,5 @@ ;;; tools/lookup/autoload/evil.el -*- lexical-binding: t; -*- -;;;###if (featurep! :editor evil) +;;;###if (modulep! :editor evil) ;;;###autoload (autoload '+lookup:online "tools/lookup/autoload/evil" nil t) (evil-define-command +lookup:online (query &optional bang) diff --git a/modules/tools/lookup/autoload/lookup.el b/modules/tools/lookup/autoload/lookup.el index e3496d53c..54f8ebb56 100644 --- a/modules/tools/lookup/autoload/lookup.el +++ b/modules/tools/lookup/autoload/lookup.el @@ -240,13 +240,13 @@ Will return nil if neither is available. These require ripgrep to be installed." (unless identifier (let ((query (rxt-quote-pcre identifier))) (ignore-errors - (cond ((featurep! :completion ivy) + (cond ((modulep! :completion ivy) (+ivy-file-search :query query) t) - ((featurep! :completion helm) + ((modulep! :completion helm) (+helm-file-search :query query) t) - ((featurep! :completion vertico) + ((modulep! :completion vertico) (+vertico-file-search :query query) t)))))) @@ -278,10 +278,10 @@ otherwise falling back to ffap.el (find-file-at-point)." (or (file-exists-p guess) (ffap-url-p guess))) (find-file-at-point guess)) - ((and (featurep! :completion ivy) + ((and (modulep! :completion ivy) (doom-project-p)) (counsel-file-jump guess (doom-project-root))) - ((and (featurep! :completion vertico) + ((and (modulep! :completion vertico) (doom-project-p)) (+vertico/find-file-in (doom-project-root) guess)) ((find-file-at-point (ffap-prompter guess)))) diff --git a/modules/tools/lookup/config.el b/modules/tools/lookup/config.el index ac1721761..96edaad55 100644 --- a/modules/tools/lookup/config.el +++ b/modules/tools/lookup/config.el @@ -28,7 +28,7 @@ ("Wolfram alpha" "https://wolframalpha.com/input/?i=%s") ("Wikipedia" "https://wikipedia.org/search-redirect.php?language=en&go=Go&search=%s") ("MDN" "https://developer.mozilla.org/en-US/search?q=%s")) - (when (featurep! :lang rust) + (when (modulep! :lang rust) '(("Rust Docs" "https://doc.rust-lang.org/std/?search=%s")))) "An alist that maps online resources to either: @@ -110,7 +110,7 @@ If the argument is interactive (satisfies `commandp'), it is called with argument: the identifier at point. See `set-lookup-handlers!' about adding to this list.") -(defvar +lookup-dictionary-prefer-offline (featurep! +offline) +(defvar +lookup-dictionary-prefer-offline (modulep! +offline) "If non-nil, look up dictionaries online. Setting this to nil will force it to use offline backends, which may be less @@ -132,8 +132,8 @@ Dictionary.app behind the scenes to get definitions.") dumb-jump-prefer-searcher 'rg dumb-jump-aggressive nil dumb-jump-selector - (cond ((featurep! :completion ivy) 'ivy) - ((featurep! :completion helm) 'helm) + (cond ((modulep! :completion ivy) 'ivy) + ((modulep! :completion helm) 'helm) ('popup))) (add-hook 'dumb-jump-after-jump-hook #'better-jumper-set-jump)) @@ -157,12 +157,12 @@ Dictionary.app behind the scenes to get definitions.") (funcall fn))) ;; This integration is already built into evil - (unless (featurep! :editor evil) + (unless (modulep! :editor evil) ;; Use `better-jumper' instead of xref's marker stack (advice-add #'xref-push-marker-stack :around #'doom-set-jump-a)) (use-package! ivy-xref - :when (featurep! :completion ivy) + :when (modulep! :completion ivy) :config (set-popup-rule! "^\\*xref\\*$" :ignore t) (setq xref-show-definitions-function #'ivy-xref-show-defs @@ -178,10 +178,10 @@ Dictionary.app behind the scenes to get definitions.") (funcall fn fetcher alist))) (use-package! helm-xref - :when (featurep! :completion helm)) + :when (modulep! :completion helm)) (use-package! consult-xref - :when (featurep! :completion vertico) + :when (modulep! :completion vertico) :defer t :init (setq xref-show-xrefs-function #'consult-xref @@ -192,7 +192,7 @@ Dictionary.app behind the scenes to get definitions.") ;;; Dash docset integration (use-package! dash-docs - :when (featurep! +docsets) + :when (modulep! +docsets) :defer t :init (add-hook '+lookup-documentation-functions #'+lookup-dash-docsets-backend-fn) @@ -202,9 +202,9 @@ Dictionary.app behind the scenes to get definitions.") dash-docs-min-length 2 dash-docs-browser-func #'eww) - (cond ((featurep! :completion helm) + (cond ((modulep! :completion helm) (require 'helm-dash nil t)) - ((featurep! :completion ivy) + ((modulep! :completion ivy) (require 'counsel-dash nil t)))) @@ -212,7 +212,7 @@ Dictionary.app behind the scenes to get definitions.") ;;; Dictionary integration (use-package! define-word - :when (featurep! +dictionary) + :when (modulep! +dictionary) :unless IS-MAC :defer t :config diff --git a/modules/tools/lookup/doctor.el b/modules/tools/lookup/doctor.el index 71e1015bf..f7378320f 100644 --- a/modules/tools/lookup/doctor.el +++ b/modules/tools/lookup/doctor.el @@ -1,5 +1,5 @@ ;;; tools/lookup/doctor.el -*- lexical-binding: t; -*- -(when (featurep! +docsets) +(when (modulep! +docsets) (unless (executable-find "sqlite3") (warn! "Couldn't find the sqlite3 executable. dash-docs will not work."))) diff --git a/modules/tools/lookup/packages.el b/modules/tools/lookup/packages.el index 68e48fd46..c9fe599be 100644 --- a/modules/tools/lookup/packages.el +++ b/modules/tools/lookup/packages.el @@ -4,31 +4,31 @@ ;; HACK `dumb-jump' uses the `helm-build-sync-source' macro, but this requires ;; helm be loaded before `dumb-jump' is byte-compiled during installation. ;; To ensure this, we declare helm before dumb-jump. -(when (featurep! :completion helm) +(when (modulep! :completion helm) (package! helm)) ;; (package! dumb-jump :pin "1dd583011f4025b1b8c75fd785691851b6c5dfa3") -(when (featurep! :completion ivy) +(when (modulep! :completion ivy) (package! ivy-xref :pin "a82e8e117d2dd62c28b6a3e3d6e4cfb11c0bda38")) -(when (featurep! :completion helm) +(when (modulep! :completion helm) (package! helm-xref :pin "ea0e4ed8a9baf236e4085cbc7178241f109a53fa")) ;; For dictionary and online lookup (package! request :pin "38ed1d2e64138eb16a9d8ed2987cff2e01b4a93b") -(when (featurep! +docsets) +(when (modulep! +docsets) (package! dash-docs :pin "29848b6b347ac520f7646c200ed2ec36cea3feda") - (when (featurep! :completion helm) + (when (modulep! :completion helm) (package! helm-dash :pin "7f853bd34da666f0e9a883011c80f451b06f6c59")) - (when (featurep! :completion ivy) + (when (modulep! :completion ivy) (package! counsel-dash :pin "370d5f6f14b5294d0eb717f7b2a6a8e93df1ed24"))) -(when (featurep! +dictionary) +(when (modulep! +dictionary) (if IS-MAC (package! osx-dictionary :pin "1a4479d9f44ef1e6e5f7643c172c32f6fe6cce21") (package! define-word :pin "31a8c67405afa99d0e25e7c86a4ee7ef84a808fe") (package! powerthesaurus :pin "88bc5229cba1604c8f74db0a1456d99259d538cc") - (when (featurep! +offline) + (when (modulep! +offline) (package! wordnut :pin "feac531404041855312c1a046bde7ea18c674915") (package! synosaurus :pin "14d34fc92a77c3a916b4d58400424c44ae99cd81")))) diff --git a/modules/tools/lsp/+eglot.el b/modules/tools/lsp/+eglot.el index c2dcf9aa3..48dc8c5ee 100644 --- a/modules/tools/lsp/+eglot.el +++ b/modules/tools/lsp/+eglot.el @@ -11,7 +11,7 @@ ;; NOTE We disable eglot-auto-display-help-buffer because :select t in ;; its popup rule causes eglot to steal focus too often. eglot-auto-display-help-buffer nil) - (when (featurep! :checkers syntax) + (when (modulep! :checkers syntax) (setq eglot-stay-out-of '(flymake))) :config @@ -25,7 +25,7 @@ (add-to-list 'doom-debug-variables '(eglot-events-buffer-size . 0)) - (when (featurep! :checkers syntax) + (when (modulep! :checkers syntax) (after! flycheck (load! "autoload/flycheck-eglot"))) @@ -52,6 +52,6 @@ server getting expensively restarted when reverting buffers." (use-package! consult-eglot :defer t - :when (featurep! :completion vertico) + :when (modulep! :completion vertico) :init (map! :map eglot-mode-map [remap xref-find-apropos] #'consult-eglot-symbols)) diff --git a/modules/tools/lsp/+lsp.el b/modules/tools/lsp/+lsp.el index ce6c434c9..79b22463a 100644 --- a/modules/tools/lsp/+lsp.el +++ b/modules/tools/lsp/+lsp.el @@ -1,7 +1,7 @@ ;;; tools/lsp/+lsp.el -*- lexical-binding: t; -*- (defvar +lsp-company-backends - (if (featurep! :editor snippets) + (if (modulep! :editor snippets) '(:separate company-capf company-yasnippet) 'company-capf) "The backends to prepend to `company-backends' in `lsp-mode' buffers. @@ -35,7 +35,7 @@ Can be a list of backends; accepts any value `company-backends' accepts.") (setq lsp-headerline-breadcrumb-enable nil) ;; Let doom bind the lsp keymap. - (when (featurep! :config default +bindings) + (when (modulep! :config default +bindings) (setq lsp-keymap-prefix nil)) :config @@ -86,7 +86,7 @@ Can be a list of backends; accepts any value `company-backends' accepts.") (lsp--info "Could not guess project root.")))) #'+lsp-optimization-mode) - (when (featurep! :completion company) + (when (modulep! :completion company) (add-hook! 'lsp-completion-mode-hook (defun +lsp-init-company-backends-h () (when lsp-completion-mode @@ -121,7 +121,7 @@ server getting expensively restarted when reverting buffers." (+lsp-optimization-mode -1)))) lsp--cur-workspace)))) - (when (featurep! :ui modeline +light) + (when (modulep! :ui modeline +light) (defvar-local lsp-modeline-icon nil) (add-hook! '(lsp-before-initialize-hook @@ -154,14 +154,14 @@ instead is more sensible." (apply fn args))) :config - (when (featurep! +peek) + (when (modulep! +peek) (set-lookup-handlers! 'lsp-ui-mode :definition 'lsp-ui-peek-find-definitions :implementations 'lsp-ui-peek-find-implementation :references 'lsp-ui-peek-find-references :async t)) - (setq lsp-ui-peek-enable (featurep! +peek) + (setq lsp-ui-peek-enable (modulep! +peek) lsp-ui-doc-max-height 8 lsp-ui-doc-max-width 72 ; 150 (default) is too wide lsp-ui-doc-delay 0.75 ; 0.2 (default) is too naggy @@ -184,17 +184,17 @@ instead is more sensible." (use-package! helm-lsp - :when (featurep! :completion helm) + :when (modulep! :completion helm) :commands helm-lsp-workspace-symbol helm-lsp-global-workspace-symbol) (use-package! lsp-ivy - :when (featurep! :completion ivy) + :when (modulep! :completion ivy) :commands lsp-ivy-workspace-symbol lsp-ivy-global-workspace-symbol) (use-package! consult-lsp :defer t - :when (featurep! :completion vertico) + :when (modulep! :completion vertico) :init (map! :map lsp-mode-map [remap xref-find-apropos] #'consult-lsp-symbols)) diff --git a/modules/tools/lsp/autoload/common.el b/modules/tools/lsp/autoload/common.el index cfa8c9a2e..d91f3d235 100644 --- a/modules/tools/lsp/autoload/common.el +++ b/modules/tools/lsp/autoload/common.el @@ -4,7 +4,7 @@ (defun lsp! () "Dispatch to call the currently used lsp client entrypoint" (interactive) - (if (featurep! +eglot) + (if (modulep! +eglot) (eglot-ensure) (unless (bound-and-true-p lsp-mode) (lsp-deferred)))) diff --git a/modules/tools/lsp/autoload/eglot.el b/modules/tools/lsp/autoload/eglot.el index 6f7fd029e..559f3262a 100644 --- a/modules/tools/lsp/autoload/eglot.el +++ b/modules/tools/lsp/autoload/eglot.el @@ -1,5 +1,5 @@ ;;; tools/lsp/autoload/eglot.el -*- lexical-binding: t; -*- -;;;###if (featurep! +eglot) +;;;###if (modulep! +eglot) ;;;###autodef (defun set-eglot-client! (mode server-call) diff --git a/modules/tools/lsp/autoload/lsp-mode.el b/modules/tools/lsp/autoload/lsp-mode.el index 774c7b3b8..d769a26b8 100644 --- a/modules/tools/lsp/autoload/lsp-mode.el +++ b/modules/tools/lsp/autoload/lsp-mode.el @@ -1,5 +1,5 @@ ;;; tools/lsp/autoload/lsp-mode.el -*- lexical-binding: t; -*- -;;;###if (not (featurep! +eglot)) +;;;###if (not (modulep! +eglot)) ;;;###autodef (defun set-lsp-priority! (client priority) diff --git a/modules/tools/lsp/config.el b/modules/tools/lsp/config.el index 896cbc9cc..cc64003b6 100644 --- a/modules/tools/lsp/config.el +++ b/modules/tools/lsp/config.el @@ -42,6 +42,6 @@ killing and opening many LSP/eglot-powered buffers.") ;; ;;; Implementations -(if (featurep! +eglot) +(if (modulep! +eglot) (load! "+eglot") (load! "+lsp")) diff --git a/modules/tools/lsp/doctor.el b/modules/tools/lsp/doctor.el index 798a23826..1739bfddb 100644 --- a/modules/tools/lsp/doctor.el +++ b/modules/tools/lsp/doctor.el @@ -1,7 +1,7 @@ ;;; tools/lsp/doctor.el -*- lexical-binding: t; -*- -(assert! (not (and (featurep! +eglot) - (featurep! +peek))) +(assert! (not (and (modulep! +eglot) + (modulep! +peek))) "+eglot and +peek flags are not compatible. Peek uses lsp-mode, while Eglot is another package altogether for LSP.") (unless (executable-find "npm") diff --git a/modules/tools/lsp/packages.el b/modules/tools/lsp/packages.el index e853fb7bc..8192df2e3 100644 --- a/modules/tools/lsp/packages.el +++ b/modules/tools/lsp/packages.el @@ -1,16 +1,16 @@ ;; -*- no-byte-compile: t; -*- ;;; tools/lsp/packages.el -(if (featurep! +eglot) +(if (modulep! +eglot) (progn (package! eglot :pin "bd970be047aba4513c2970b9ff2d842f0472cb0e") - (when (featurep! :completion vertico) + (when (modulep! :completion vertico) (package! consult-eglot :pin "0da8801dd8435160ce1f62ad8066bd52e38f5cbd"))) (package! lsp-mode :pin "3fa645c0397b8f438f2db2dd288b899ba330d410") (package! lsp-ui :pin "0a6368d38dc32e52abcbd52b63d1e557e42c66e6") - (when (featurep! :completion ivy) + (when (modulep! :completion ivy) (package! lsp-ivy :pin "3e87441a625d65ced5a208a0b0442d573596ffa3")) - (when (featurep! :completion helm) + (when (modulep! :completion helm) (package! helm-lsp :pin "c2c6974dadfac459b1a69a1217441283874cea92")) - (when (featurep! :completion vertico) + (when (modulep! :completion vertico) (package! consult-lsp :pin "19606a03cf854e1b0930c4526ed92c4560dccdc2"))) diff --git a/modules/tools/magit/config.el b/modules/tools/magit/config.el index bc4cb643e..d2e16736a 100644 --- a/modules/tools/magit/config.el +++ b/modules/tools/magit/config.el @@ -145,14 +145,14 @@ Only has an effect in GUI Emacs.") (use-package! forge - :when (featurep! +forge) + :when (modulep! +forge) ;; We defer loading even further because forge's dependencies will try to ;; compile emacsql, which is a slow and blocking operation. :after-call magit-status :commands forge-create-pullreq forge-create-issue :preface (setq forge-database-file (concat doom-etc-dir "forge/forge-database.sqlite")) - (setq forge-add-default-bindings (not (featurep! :editor evil +everywhere))) + (setq forge-add-default-bindings (not (modulep! :editor evil +everywhere))) :config ;; All forge list modes are derived from `forge-topic-list-mode' (map! :map forge-topic-list-mode-map :n "q" #'kill-current-buffer) @@ -189,7 +189,7 @@ ensure it is built when we actually use Forge." (use-package! code-review - :when (featurep! +forge) + :when (modulep! +forge) :after magit :init ;; TODO This needs to either a) be cleaned up or better b) better map things @@ -223,7 +223,7 @@ ensure it is built when we actually use Forge." (use-package! evil-collection-magit - :when (featurep! :editor evil +everywhere) + :when (modulep! :editor evil +everywhere) :defer t :init (defvar evil-collection-magit-use-z-for-folds t) :config @@ -287,7 +287,7 @@ ensure it is built when we actually use Forge." (use-package! evil-collection-magit-section - :when (featurep! :editor evil +everywhere) + :when (modulep! :editor evil +everywhere) :defer t :init (defvar evil-collection-magit-section-use-z-for-folds evil-collection-magit-use-z-for-folds) diff --git a/modules/tools/magit/packages.el b/modules/tools/magit/packages.el index 088715a02..8e28403a3 100644 --- a/modules/tools/magit/packages.el +++ b/modules/tools/magit/packages.el @@ -3,7 +3,7 @@ (when (package! magit :pin "c1fb53d3de6390961ccd8dfb1cc135383508d0fc") (package! compat :pin "cc1924fd8b3f9b75b26bf93f084ea938c06f9615") - (when (featurep! +forge) + (when (modulep! +forge) (package! forge :pin "36208c43bf41782cfe81fccc904f8adbe57818e1")) (package! magit-gitflow :pin "cc41b561ec6eea947fe9a176349fb4f771ed865b") (package! magit-todos :pin "67fd80c2f10aec4d5b2a24b5d3d53c08cc1f05dc") diff --git a/modules/tools/pass/autoload/consult.el b/modules/tools/pass/autoload/consult.el index 878d8e913..b58b8a6cf 100644 --- a/modules/tools/pass/autoload/consult.el +++ b/modules/tools/pass/autoload/consult.el @@ -1,5 +1,5 @@ ;;; tools/pass/autoload/consult.el -*- lexical-binding: t; -*- -;;;###if (featurep! :completion vertico) +;;;###if (modulep! :completion vertico) ;;;###autoload (defun +pass/consult (arg pass) diff --git a/modules/tools/pass/autoload/ivy.el b/modules/tools/pass/autoload/ivy.el index 99e578ddb..0e88b4b39 100644 --- a/modules/tools/pass/autoload/ivy.el +++ b/modules/tools/pass/autoload/ivy.el @@ -1,5 +1,5 @@ ;;; tools/pass/autoload/ivy.el -*- lexical-binding: t; -*- -;;;###if (featurep! :completion ivy) +;;;###if (modulep! :completion ivy) ;;;###autoload (defun +pass/ivy (arg) diff --git a/modules/tools/pass/config.el b/modules/tools/pass/config.el index 15303d80e..aa593b077 100644 --- a/modules/tools/pass/config.el +++ b/modules/tools/pass/config.el @@ -29,5 +29,5 @@ ;; Is built into Emacs 26+ -(when (featurep! +auth) +(when (modulep! +auth) (auth-source-pass-enable)) diff --git a/modules/tools/pass/packages.el b/modules/tools/pass/packages.el index a55fad8aa..401fa6806 100644 --- a/modules/tools/pass/packages.el +++ b/modules/tools/pass/packages.el @@ -5,7 +5,7 @@ (package! password-store :pin "c4d8a1d815e79ddd89a85d3e36a41d29f0475771") (package! password-store-otp :pin "be3a00a981921ed1b2f78012944dc25eb5a0beca") -(when (featurep! :completion ivy) +(when (modulep! :completion ivy) (package! ivy-pass :pin "5b523de1151f2109fdd6a8114d0af12eef83d3c5")) -(when (featurep! :completion helm) +(when (modulep! :completion helm) (package! helm-pass :pin "4ce46f1801f2e76e53482c65aa0619d427a3fbf9")) diff --git a/modules/tools/rgb/autoload.el b/modules/tools/rgb/autoload.el index 1036cd106..cc392df02 100644 --- a/modules/tools/rgb/autoload.el +++ b/modules/tools/rgb/autoload.el @@ -1,5 +1,5 @@ ;;; tools/rgb/autoload.el -*- lexical-binding: t; -*- -;;;###if (featurep! :ui hydra) +;;;###if (modulep! :ui hydra) ;;;###autoload (autoload '+rgb/kurecolor-hydra/body "tools/rgb/autoload" nil t) (defhydra +rgb/kurecolor-hydra (:color pink :hint nil) diff --git a/modules/tools/taskrunner/autoload.el b/modules/tools/taskrunner/autoload.el index da91b970a..bbc09d0d1 100644 --- a/modules/tools/taskrunner/autoload.el +++ b/modules/tools/taskrunner/autoload.el @@ -5,5 +5,5 @@ "Invokes `ivy-taskrunner' or `helm-tasksrunner', depending on which is available." (interactive) - (cond ((featurep! :completion ivy) (ivy-taskrunner)) - ((featurep! :completion helm) (helm-taskrunner)))) + (cond ((modulep! :completion ivy) (ivy-taskrunner)) + ((modulep! :completion helm) (helm-taskrunner)))) diff --git a/modules/tools/taskrunner/config.el b/modules/tools/taskrunner/config.el index 2ec44668c..318da3653 100644 --- a/modules/tools/taskrunner/config.el +++ b/modules/tools/taskrunner/config.el @@ -4,11 +4,11 @@ (set-popup-rule! taskrunner--buffer-name-regexp :quit t)) (use-package! helm-taskrunner - :when (featurep! :completion helm) + :when (modulep! :completion helm) :defer t :config (helm-taskrunner-minor-mode +1)) (use-package! ivy-taskrunner - :when (featurep! :completion ivy) + :when (modulep! :completion ivy) :defer t :config (ivy-taskrunner-minor-mode +1)) diff --git a/modules/tools/taskrunner/packages.el b/modules/tools/taskrunner/packages.el index 91d6da641..284de40fc 100644 --- a/modules/tools/taskrunner/packages.el +++ b/modules/tools/taskrunner/packages.el @@ -3,12 +3,12 @@ (package! taskrunner :pin "716323aff410b4d864d137c9ebe4bbb5b8587f5e") -(when (featurep! :completion helm) +(when (modulep! :completion helm) (package! helm-taskrunner :pin "70ef8117aafdc01a1f06151a82cecb9a2fcf4d32" :recipe (:host github :repo "emacs-taskrunner/helm-taskrunner"))) -(when (featurep! :completion ivy) +(when (modulep! :completion ivy) (package! ivy-taskrunner :pin "c731ee6279f65061ef70e79d3818ea1d9678e6da" :recipe (:host github :repo "emacs-taskrunner/ivy-taskrunner"))) diff --git a/modules/tools/terraform/config.el b/modules/tools/terraform/config.el index 280de98ef..093ee7313 100644 --- a/modules/tools/terraform/config.el +++ b/modules/tools/terraform/config.el @@ -3,7 +3,7 @@ (defvar +terraform-runner (if (executable-find "terragrunt") "terragrunt" "terraform") "The default runner - terraform or terragrunt") -(when (featurep! +lsp) +(when (modulep! +lsp) (add-hook 'terraform-mode-local-vars-hook #'lsp! 'append)) (after! terraform-mode @@ -18,7 +18,7 @@ :desc "plan" "p" (cmd! (compile (format "%s plan" +terraform-runner))))) (use-package! company-terraform - :when (featurep! :completion company) + :when (modulep! :completion company) :after terraform-mode :config (set-company-backend! 'terraform-mode 'company-terraform)) diff --git a/modules/tools/terraform/packages.el b/modules/tools/terraform/packages.el index 66e955b2b..d834707f2 100644 --- a/modules/tools/terraform/packages.el +++ b/modules/tools/terraform/packages.el @@ -2,5 +2,5 @@ ;;; tools/terraform/packages.el (package! terraform-mode :pin "e560caaa9d9a11b0868adf6d9dcae5ebb5055730") -(when (featurep! :completion company) +(when (modulep! :completion company) (package! company-terraform :pin "8d5a16d1bbeeb18ca49a8fd57b5d8cd30c8b8dc7")) diff --git a/modules/tools/tmux/autoload/evil.el b/modules/tools/tmux/autoload/evil.el index 58fe5574f..da823d736 100644 --- a/modules/tools/tmux/autoload/evil.el +++ b/modules/tools/tmux/autoload/evil.el @@ -1,5 +1,5 @@ ;;; tools/tmux/autoload/evil.el -*- lexical-binding: t; -*- -;;;###if (featurep! :editor evil) +;;;###if (modulep! :editor evil) ;;;###autoload (autoload '+tmux:run "tools/tmux/autoload/evil" nil t) (evil-define-command +tmux:run (bang &optional command) diff --git a/modules/tools/tree-sitter/config.el b/modules/tools/tree-sitter/config.el index e331d8059..def0ce5d2 100644 --- a/modules/tools/tree-sitter/config.el +++ b/modules/tools/tree-sitter/config.el @@ -21,7 +21,7 @@ If nil, it is disabled in all modes") (use-package! evil-textobj-tree-sitter - :when (featurep! :editor evil +everywhere) + :when (modulep! :editor evil +everywhere) :defer t :init (after! tree-sitter (require 'evil-textobj-tree-sitter)) :config diff --git a/modules/tools/tree-sitter/packages.el b/modules/tools/tree-sitter/packages.el index b8fdc5e7c..e3a00b248 100644 --- a/modules/tools/tree-sitter/packages.el +++ b/modules/tools/tree-sitter/packages.el @@ -7,6 +7,6 @@ (package! tree-sitter-langs :pin "deb2d8674be8f777ace50e15c7c041aeddb1d0b2") -(when (featurep! :editor evil +everywhere) +(when (modulep! :editor evil +everywhere) (package! evil-textobj-tree-sitter :pin "9dce8dab68c954ae32095328cf898eb856fc341a")) diff --git a/modules/ui/doom-dashboard/config.el b/modules/ui/doom-dashboard/config.el index 254062ce2..7d2d43d74 100644 --- a/modules/ui/doom-dashboard/config.el +++ b/modules/ui/doom-dashboard/config.el @@ -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)))) diff --git a/modules/ui/doom/config.el b/modules/ui/doom/config.el index f4619b221..0e4d50c92 100644 --- a/modules/ui/doom/config.el +++ b/modules/ui/doom/config.el @@ -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))) diff --git a/modules/ui/emoji/config.el b/modules/ui/emoji/config.el index e4133ed2d..ff1b3d9f4 100644 --- a/modules/ui/emoji/config.el +++ b/modules/ui/emoji/config.el @@ -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)) diff --git a/modules/ui/ligatures/autoload/install.el b/modules/ui/ligatures/autoload/install.el index e2727017e..fd7d096d2 100644 --- a/modules/ui/ligatures/autoload/install.el +++ b/modules/ui/ligatures/autoload/install.el @@ -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. diff --git a/modules/ui/ligatures/config.el b/modules/ui/ligatures/config.el index 42b7af1f4..8a38bc944 100644 --- a/modules/ui/ligatures/config.el +++ b/modules/ui/ligatures/config.el @@ -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"))))) diff --git a/modules/ui/modeline/+light.el b/modules/ui/modeline/+light.el index f82f847d3..17e32c8fc 100644 --- a/modules/ui/modeline/+light.el +++ b/modules/ui/modeline/+light.el @@ -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)) diff --git a/modules/ui/modeline/autoload.el b/modules/ui/modeline/autoload.el index 437390db3..265b5124b 100644 --- a/modules/ui/modeline/autoload.el +++ b/modules/ui/modeline/autoload.el @@ -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 diff --git a/modules/ui/modeline/config.el b/modules/ui/modeline/config.el index 5797b9e87..5bad71a0a 100644 --- a/modules/ui/modeline/config.el +++ b/modules/ui/modeline/config.el @@ -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))) diff --git a/modules/ui/modeline/packages.el b/modules/ui/modeline/packages.el index 00ace0d60..da15ff83d 100644 --- a/modules/ui/modeline/packages.el +++ b/modules/ui/modeline/packages.el @@ -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")) diff --git a/modules/ui/ophints/config.el b/modules/ui/ophints/config.el index faf383cc3..563fc06b7 100644 --- a/modules/ui/ophints/config.el +++ b/modules/ui/ophints/config.el @@ -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 diff --git a/modules/ui/ophints/packages.el b/modules/ui/ophints/packages.el index a2daf3e69..bc45d3b84 100644 --- a/modules/ui/ophints/packages.el +++ b/modules/ui/ophints/packages.el @@ -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")) diff --git a/modules/ui/popup/+hacks.el b/modules/ui/popup/+hacks.el index 7729dc9dd..8cc6a5fa6 100644 --- a/modules/ui/popup/+hacks.el +++ b/modules/ui/popup/+hacks.el @@ -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 diff --git a/modules/ui/popup/config.el b/modules/ui/popup/config.el index 63e310e58..76fce31a6 100644 --- a/modules/ui/popup/config.el +++ b/modules/ui/popup/config.el @@ -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) diff --git a/modules/ui/tabs/autoload.el b/modules/ui/tabs/autoload.el index d20a977bf..bfa39857c 100644 --- a/modules/ui/tabs/autoload.el +++ b/modules/ui/tabs/autoload.el @@ -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) diff --git a/modules/ui/treemacs/config.el b/modules/ui/treemacs/config.el index 4cbfd9c8a..2a898ff25 100644 --- a/modules/ui/treemacs/config.el +++ b/modules/ui/treemacs/config.el @@ -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)) diff --git a/modules/ui/treemacs/doctor.el b/modules/ui/treemacs/doctor.el index 255732fb4..b22d8cf62 100644 --- a/modules/ui/treemacs/doctor.el +++ b/modules/ui/treemacs/doctor.el @@ -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.") diff --git a/modules/ui/treemacs/packages.el b/modules/ui/treemacs/packages.el index 4e6caee1e..32d2be2e1 100644 --- a/modules/ui/treemacs/packages.el +++ b/modules/ui/treemacs/packages.el @@ -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")) diff --git a/modules/ui/vc-gutter/autoload/diff-hl.el b/modules/ui/vc-gutter/autoload/diff-hl.el index f22f8aab5..80ec98003 100644 --- a/modules/ui/vc-gutter/autoload/diff-hl.el +++ b/modules/ui/vc-gutter/autoload/diff-hl.el @@ -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) diff --git a/modules/ui/vc-gutter/autoload/git-gutter.el b/modules/ui/vc-gutter/autoload/git-gutter.el index 64fbedfad..7d0899f2f 100644 --- a/modules/ui/vc-gutter/autoload/git-gutter.el +++ b/modules/ui/vc-gutter/autoload/git-gutter.el @@ -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) diff --git a/modules/ui/vc-gutter/config.el b/modules/ui/vc-gutter/config.el index bc40589b6..f64a77828 100644 --- a/modules/ui/vc-gutter/config.el +++ b/modules/ui/vc-gutter/config.el @@ -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) diff --git a/modules/ui/vc-gutter/packages.el b/modules/ui/vc-gutter/packages.el index a07b00947..e7a655b1e 100644 --- a/modules/ui/vc-gutter/packages.el +++ b/modules/ui/vc-gutter/packages.el @@ -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")) diff --git a/modules/ui/window-select/config.el b/modules/ui/window-select/config.el index acf459da4..12dbe280e 100644 --- a/modules/ui/window-select/config.el +++ b/modules/ui/window-select/config.el @@ -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) diff --git a/modules/ui/window-select/packages.el b/modules/ui/window-select/packages.el index 4a820eb2a..27f7c9d5d 100644 --- a/modules/ui/window-select/packages.el +++ b/modules/ui/window-select/packages.el @@ -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")) diff --git a/modules/ui/workspaces/autoload/evil.el b/modules/ui/workspaces/autoload/evil.el index ceaa051c9..32e559d5a 100644 --- a/modules/ui/workspaces/autoload/evil.el +++ b/modules/ui/workspaces/autoload/evil.el @@ -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) diff --git a/modules/ui/workspaces/autoload/workspaces.el b/modules/ui/workspaces/autoload/workspaces.el index e59611ae3..b4b4a3a91 100644 --- a/modules/ui/workspaces/autoload/workspaces.el +++ b/modules/ui/workspaces/autoload/workspaces.el @@ -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 diff --git a/modules/ui/workspaces/config.el b/modules/ui/workspaces/config.el index d71cf124e..36f531758 100644 --- a/modules/ui/workspaces/config.el +++ b/modules/ui/workspaces/config.el @@ -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))))