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
|
@ -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)))
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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 ()
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
||||
|
|
|
@ -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.")))
|
||||
|
|
|
@ -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")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue