refactor: deprecate featurep! for modulep!
featurep! will be renamed modulep! in the future, so it's been deprecated. They have identical interfaces, and can be replaced without issue. featurep! was never quite the right name for this macro. It implied that it had some connection to featurep, which it doesn't (only that it was similar in purpose; still, Doom modules are not features). To undo such implications and be consistent with its namespace (and since we're heading into a storm of breaking changes with the v3 release anyway), now was the best opportunity to begin the transition.
This commit is contained in:
parent
0407621aff
commit
ad6a3d0f33
316 changed files with 1109 additions and 1103 deletions
|
@ -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)))
|
||||
|
|
|
@ -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)")
|
||||
|
|
|
@ -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"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue