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:
@ -19,11 +19,11 @@
|
||||
"gofmt"
|
||||
"goimports"))))
|
||||
|
||||
(if (featurep! +lsp)
|
||||
(if (modulep! +lsp)
|
||||
(add-hook 'go-mode-local-vars-hook #'lsp! 'append)
|
||||
(add-hook 'go-mode-hook #'go-eldoc-setup))
|
||||
|
||||
(when (featurep! +tree-sitter)
|
||||
(when (modulep! +tree-sitter)
|
||||
(add-hook 'go-mode-local-vars-hook #'tree-sitter! 'append))
|
||||
|
||||
(map! :map go-mode-map
|
||||
@ -70,13 +70,13 @@
|
||||
|
||||
|
||||
(use-package! company-go
|
||||
:when (featurep! :completion company)
|
||||
:unless (featurep! +lsp)
|
||||
:when (modulep! :completion company)
|
||||
:unless (modulep! +lsp)
|
||||
:after go-mode
|
||||
:config
|
||||
(set-company-backend! 'go-mode 'company-go)
|
||||
(setq company-go-show-annotation t))
|
||||
|
||||
(use-package! flycheck-golangci-lint
|
||||
:when (featurep! :checkers syntax)
|
||||
:when (modulep! :checkers syntax)
|
||||
:hook (go-mode . flycheck-golangci-lint-setup))
|
||||
|
@ -1,12 +1,12 @@
|
||||
;; -*- lexical-binding: t; no-byte-compile: t; -*-
|
||||
;;; lang/go/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 "guru")
|
||||
@ -21,12 +21,12 @@
|
||||
(unless (executable-find "gomodifytags")
|
||||
(warn! "Couldn't find gomodifytags. Manipulating struct tags will not work"))
|
||||
|
||||
(when (and (featurep! :completion company)
|
||||
(not (featurep! +lsp)))
|
||||
(when (and (modulep! :completion company)
|
||||
(not (modulep! +lsp)))
|
||||
(require 'company-go)
|
||||
(unless (executable-find company-go-gocode-command)
|
||||
(warn! "Couldn't find gocode. Code completion won't work")))
|
||||
|
||||
(when (and (featurep! +lsp)
|
||||
(when (and (modulep! +lsp)
|
||||
(not (executable-find "gopls")))
|
||||
(warn! "Couldn't find gopls."))
|
||||
|
@ -8,8 +8,8 @@
|
||||
(package! go-tag :pin "59b243f2fa079d9de9d56f6e2d94397e9560310a")
|
||||
(package! go-gen-test :pin "35df36dcd555233ee1a618c0f6a58ce6db4154d9")
|
||||
|
||||
(when (featurep! :completion company)
|
||||
(when (modulep! :completion company)
|
||||
(package! company-go :pin "31948b463f2fc18f8801e5a8fe511fef300eb3dd"))
|
||||
|
||||
(when (featurep! :checkers syntax)
|
||||
(when (modulep! :checkers syntax)
|
||||
(package! flycheck-golangci-lint :pin "8e446c68311048f0b87febf8ef0379e29d358851"))
|
||||
|
Reference in New Issue
Block a user