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
|
@ -18,10 +18,10 @@
|
|||
(set-electric! 'ruby-mode :words '("else" "end" "elsif"))
|
||||
(set-repl-handler! 'ruby-mode #'inf-ruby)
|
||||
|
||||
(when (featurep! +lsp)
|
||||
(when (modulep! +lsp)
|
||||
(add-hook 'ruby-mode-local-vars-hook #'lsp! 'append))
|
||||
|
||||
(when (featurep! +tree-sitter)
|
||||
(when (modulep! +tree-sitter)
|
||||
(add-hook 'ruby-mode-local-vars-hook #'tree-sitter! 'append))
|
||||
|
||||
(after! inf-ruby
|
||||
|
@ -58,7 +58,7 @@
|
|||
;; the GC, so increase the amount of data Emacs reads from it at a time.
|
||||
(setq-hook! '(robe-mode-hook inf-ruby-mode-hook)
|
||||
read-process-output-max (* 1024 1024)))
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
(add-hook 'robe-mode-hook #'evil-normalize-keymaps))
|
||||
(map! :localleader
|
||||
:map robe-mode-map
|
||||
|
@ -122,7 +122,7 @@
|
|||
"o" #'bundle-open))
|
||||
|
||||
(use-package! chruby
|
||||
:when (featurep! +chruby)
|
||||
:when (modulep! +chruby)
|
||||
:hook (ruby-mode . chruby-use-corresponding)
|
||||
:config
|
||||
(setq rspec-use-rvm nil
|
||||
|
@ -140,7 +140,7 @@
|
|||
:mode ("/\\.rspec\\'" . text-mode)
|
||||
:init
|
||||
(setq rspec-use-spring-when-possible nil)
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
(add-hook 'rspec-mode-hook #'evil-normalize-keymaps))
|
||||
:config
|
||||
(set-popup-rule! "^\\*\\(rspec-\\)?compilation" :size 0.3 :ttl nil :select t)
|
||||
|
@ -170,7 +170,7 @@
|
|||
(use-package! minitest
|
||||
:defer t
|
||||
:config
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
(add-hook 'minitest-mode-hook #'evil-normalize-keymaps))
|
||||
(map! :localleader
|
||||
:map minitest-mode-map
|
||||
|
@ -182,18 +182,18 @@
|
|||
|
||||
|
||||
(use-package! projectile-rails
|
||||
:when (featurep! +rails)
|
||||
:when (modulep! +rails)
|
||||
:hook ((ruby-mode inf-ruby-mode projectile-rails-server-mode) . projectile-rails-mode)
|
||||
:hook (projectile-rails-server-mode . doom-mark-buffer-as-real-h)
|
||||
:hook (projectile-rails-mode . auto-insert-mode)
|
||||
:init
|
||||
(setq auto-insert-query nil)
|
||||
(setq inf-ruby-console-environment "development")
|
||||
(when (featurep! :lang web)
|
||||
(when (modulep! :lang web)
|
||||
(add-hook 'web-mode-hook #'projectile-rails-mode))
|
||||
:config
|
||||
(set-popup-rule! "^\\*\\(projectile-\\)?rails" :ttl nil)
|
||||
(when (featurep! :editor evil)
|
||||
(when (modulep! :editor evil)
|
||||
(add-hook 'projectile-rails-mode-hook #'evil-normalize-keymaps))
|
||||
(map! :localleader
|
||||
:map projectile-rails-mode-map
|
||||
|
|
|
@ -1,20 +1,20 @@
|
|||
;;; lang/ruby/doctor.el -*- lexical-binding: t; -*-
|
||||
|
||||
(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 "ruby")
|
||||
(warn! "Ruby isn't installed."))
|
||||
|
||||
(when (and (executable-find "rbenv") (featurep! +rbenv))
|
||||
(when (and (executable-find "rbenv") (modulep! +rbenv))
|
||||
(unless (split-string (shell-command-to-string "rbenv versions --bare") "\n" t)
|
||||
(warn! "No versions of ruby are available via rbenv, did you forget to install one?")))
|
||||
|
||||
(when (and (executable-find "chruby") (featurep! +chruby))
|
||||
(when (and (executable-find "chruby") (modulep! +chruby))
|
||||
(unless (split-string (shell-command-to-string "chruby") "\n" t)
|
||||
(warn! "No versions of ruby are available via chruby, did you forget to install one?")))
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
;; REPL
|
||||
(package! inf-ruby :pin "dbf4386bac12f1733257db6105e3f1fca05ffb79")
|
||||
(when (featurep! :completion company)
|
||||
(when (modulep! :completion company)
|
||||
(package! company-inf-ruby :pin "fe3e4863bc971fbb81edad447efad5795ead1b17"))
|
||||
|
||||
;; Programming environment
|
||||
|
@ -19,11 +19,11 @@
|
|||
(package! rake :pin "452ea0caca33376487103c64177c295ed2960cca")
|
||||
|
||||
;; Environment management
|
||||
(when (featurep! +rbenv)
|
||||
(when (modulep! +rbenv)
|
||||
(package! rbenv :pin "2ea1a5bdc1266caef1dd77700f2c8f42429b03f1"))
|
||||
(when (featurep! +rvm)
|
||||
(when (modulep! +rvm)
|
||||
(package! rvm :pin "c1f2642434b0f68d9baa0687127079ecd884ba12"))
|
||||
(when (featurep! +chruby)
|
||||
(when (modulep! +chruby)
|
||||
(package! chruby :pin "42bc6d521f832eca8e2ba210f30d03ad5529788f"))
|
||||
|
||||
;; Testing frameworks
|
||||
|
@ -31,6 +31,6 @@
|
|||
(package! minitest :pin "ddd152c990a528ad09a696bfad23afa4330ea4d7")
|
||||
|
||||
;; Rails
|
||||
(when (featurep! +rails)
|
||||
(when (modulep! +rails)
|
||||
(package! projectile-rails :pin "772f4766b5d1159a395b93459f07d5f1f6c02f4e")
|
||||
(package! inflections :pin "55caa66a7cc6e0b1a76143fd40eff38416928941"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue