refactor: deprecate featurep! for modulep!

featurep! will be renamed modulep! in the future, so it's been
deprecated. They have identical interfaces, and can be replaced without
issue.

featurep! was never quite the right name for this macro. It implied that
it had some connection to featurep, which it doesn't (only that it was
similar in purpose; still, Doom modules are not features). To undo such
implications and be consistent with its namespace (and since we're
heading into a storm of breaking changes with the v3 release anyway),
now was the best opportunity to begin the transition.
This commit is contained in:
Henrik Lissner 2022-08-12 20:29:19 +02:00
parent 0407621aff
commit ad6a3d0f33
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
316 changed files with 1109 additions and 1103 deletions

View file

@ -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))