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
|
@ -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))
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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))))
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -42,6 +42,6 @@ killing and opening many LSP/eglot-powered buffers.")
|
|||
;;
|
||||
;;; Implementations
|
||||
|
||||
(if (featurep! +eglot)
|
||||
(if (modulep! +eglot)
|
||||
(load! "+eglot")
|
||||
(load! "+lsp"))
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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")))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue