mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
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:
@ -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!))
|
||||
|
@ -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")))
|
||||
|
@ -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"))
|
||||
|
Reference in New Issue
Block a user