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
|
@ -17,7 +17,7 @@ Returns nil if 'love' executable can't be found."
|
|||
(if (doom-project-p)
|
||||
(file-name-directory
|
||||
(or (project-file-exists-p! (or "main.lua" "src/main.lua"))
|
||||
(and (featurep! +moonscript)
|
||||
(and (modulep! +moonscript)
|
||||
(project-file-exists-p! (or "main.moon" "src/main.moon")))
|
||||
""))
|
||||
;; Since Love2D games are likely to be prototypes, they may not be in a
|
||||
|
@ -26,7 +26,7 @@ Returns nil if 'love' executable can't be found."
|
|||
(or (projectile-locate-dominating-file default-directory "main.lua")
|
||||
(when-let (root (projectile-locate-dominating-file default-directory "src/main.lua"))
|
||||
(expand-file-name "src" root))
|
||||
(and (featurep! +moonscript)
|
||||
(and (modulep! +moonscript)
|
||||
(or (projectile-locate-dominating-file default-directory "main.moon")
|
||||
(when-let (root (projectile-locate-dominating-file default-directory "src/main.moon"))
|
||||
(expand-file-name "src" root))))))))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; lang/lua/autoload/moonscript.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! +moonscript)
|
||||
;;;###if (modulep! +moonscript)
|
||||
|
||||
;;;###autoload
|
||||
(defun +lua-moonscript-fix-single-quotes-h ()
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
(set-repl-handler! 'lua-mode #'+lua/open-repl)
|
||||
(set-company-backend! 'lua-mode '(company-lua company-yasnippet))
|
||||
|
||||
(when (featurep! +lsp)
|
||||
(when (modulep! +lsp)
|
||||
(add-hook 'lua-mode-local-vars-hook #'lsp! 'append)
|
||||
|
||||
(when (featurep! :tools lsp +eglot)
|
||||
(when (modulep! :tools lsp +eglot)
|
||||
(defvar +lua-lsp-dir (concat doom-etc-dir "lsp/lua-language-server/")
|
||||
"Absolute path to the directory of sumneko's lua-language-server.
|
||||
|
||||
|
@ -34,9 +34,9 @@ lua-language-server.")
|
|||
;; is a function is to dynamically change when/if `+lua-lsp-dir' does
|
||||
(list (or (executable-find "lua-language-server")
|
||||
(doom-path +lua-lsp-dir
|
||||
(cond (IS-MAC "bin/macOS")
|
||||
(IS-LINUX "bin/Linux")
|
||||
(IS-WINDOWS "bin/Windows"))
|
||||
(cond ((featurep :os 'macos) "bin/macOS")
|
||||
((featurep :os 'linux) "bin/Linux")
|
||||
((featurep :os 'windows) "bin/Windows"))
|
||||
"lua-language-server"))
|
||||
"-E" "-e" "LANG=en"
|
||||
(doom-path +lua-lsp-dir "main.lua")))
|
||||
|
@ -45,7 +45,7 @@ lua-language-server.")
|
|||
|
||||
|
||||
(use-package! moonscript
|
||||
:when (featurep! +moonscript)
|
||||
:when (modulep! +moonscript)
|
||||
:defer t
|
||||
:config
|
||||
(setq-hook! 'moonscript-mode-hook
|
||||
|
@ -53,12 +53,12 @@ lua-language-server.")
|
|||
(add-hook! 'moonscript-mode-hook
|
||||
#'+lua-moonscript-fix-single-quotes-h
|
||||
#'+lua-moonscript-fontify-interpolation-h)
|
||||
(when (featurep! :checkers syntax)
|
||||
(when (modulep! :checkers syntax)
|
||||
(require 'flycheck-moonscript nil t)))
|
||||
|
||||
|
||||
(use-package! fennel-mode
|
||||
:when (featurep! +fennel)
|
||||
:when (modulep! +fennel)
|
||||
:defer t
|
||||
:config
|
||||
(set-lookup-handlers! 'fennel-mode
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
|
||||
(package! lua-mode :pin "5a9bee8d5fc978dc64fcb677167417010321ba65")
|
||||
|
||||
(when (featurep! +moonscript)
|
||||
(when (modulep! +moonscript)
|
||||
(package! moonscript :pin "56f90471e2ced2b0a177aed4d8c2f854797e9cc7")
|
||||
(when (featurep! :checkers syntax)
|
||||
(when (modulep! :checkers syntax)
|
||||
(package! flycheck-moonscript
|
||||
:recipe (:host github :repo "hlissner/emacs-flycheck-moonscript")
|
||||
:pin "fcb99e5efcf31db05f236f02eaa575986a57172d")))
|
||||
|
||||
(when (featurep! +fennel)
|
||||
(when (modulep! +fennel)
|
||||
(package! fennel-mode :pin "5664357349462d0564c0bb55cb289a6722f0ecbc"))
|
||||
|
||||
(when (featurep! :completion company)
|
||||
(when (modulep! :completion company)
|
||||
(package! company-lua :pin "29f6819de4d691e5fd0b62893a9f4fbc1c6fcb52"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue