diff --git a/modules/app/write/config.el b/modules/app/write/config.el index e19746c21..5db8ad4c6 100644 --- a/modules/app/write/config.el +++ b/modules/app/write/config.el @@ -36,7 +36,7 @@ (IS-LINUX "/usr/share/java/languagetool/languagetool-commandline.jar"))) (unless (file-exists-p langtool-language-tool-jar) - (warn "langtool: couldn't find languagetool-commandline.jar"))))) + (warn! "Couldn't find languagetool-commandline.jar"))))) (when (featurep! +wordnut) diff --git a/modules/lang/cc/config.el b/modules/lang/cc/config.el index 0160b8794..c89d83e72 100644 --- a/modules/lang/cc/config.el +++ b/modules/lang/cc/config.el @@ -119,7 +119,7 @@ compilation database is present in the project.") (add-hook! (c-mode c++-mode objc-mode) #'+cc|init-irony-mode) :config (unless (file-directory-p irony-server-install-prefix) - (warn "irony-mode: server isn't installed; run M-x irony-install-server")) + (warn! "Irony server isn't installed. Run M-x irony-install-server")) ;; Initialize compilation database, if present. Otherwise, fall back on ;; `+cc-default-compiler-options'. (add-hook 'irony-mode-hook #'+cc|irony-init-compile-options)) @@ -187,9 +187,9 @@ compilation database is present in the project.") :when (featurep! :completion company) :after glsl-mode :config - (if (executable-find "glslangValidator") - (warn "glsl-mode: couldn't find glslangValidator, disabling company-glsl") - (set! :company-backend 'glsl-mode '(company-glsl)))) + (unless (executable-find "glslangValidator") + (warn! "Couldn't find glslangValidator. Code completion is disabled")) + (set! :company-backend 'glsl-mode '(company-glsl))) ;; @@ -210,7 +210,7 @@ compilation database is present in the project.") (let ((bins (cl-remove-if #'executable-find '("rdm" "rc")))) (if (/= (length bins) 0) - (warn "cc-mode: couldn't find the rtag client and/or server programs %s, disabling rtags support" bins) + (warn! "Couldn't find the rtag client and/or server programs %s. Disabling rtags support" bins) (add-hook! (c-mode c++-mode) #'rtags-start-process-unless-running) (set! :lookup '(c-mode c++-mode) :definition #'rtags-find-symbol-at-point diff --git a/modules/lang/crystal/config.el b/modules/lang/crystal/config.el index 738842bbe..a782a314b 100644 --- a/modules/lang/crystal/config.el +++ b/modules/lang/crystal/config.el @@ -19,4 +19,7 @@ (def-package! inf-crystal - :commands (inf-crystal crystal-switch-to-inf)) + :commands (inf-crystal crystal-switch-to-inf) + :config + (unless (executable-find "icr") + (warn! "Couldn't find icr. REPL will not work"))) diff --git a/modules/lang/csharp/config.el b/modules/lang/csharp/config.el index e7907a32a..c994c4e07 100644 --- a/modules/lang/csharp/config.el +++ b/modules/lang/csharp/config.el @@ -9,10 +9,10 @@ (setq omnisharp-auto-complete-want-documentation nil omnisharp-cache-directory (concat doom-cache-dir "omnisharp")) :config - (add-hook! csharp-mode #'(eldoc-mode flycheck-mode omnisharp-mode)) - (unless (file-exists-p (omnisharp--server-installation-path t)) - (warn "csharp-mode: omnisharp server isn't installed, completion won't work")) + (warn! "Omnisharp server isn't installed, completion won't work")) + + (add-hook! csharp-mode #'(eldoc-mode flycheck-mode omnisharp-mode)) (defun +csharp|cleanup-omnisharp-server () "Clean up the omnisharp server once you kill the last csharp-mode buffer." diff --git a/modules/lang/go/config.el b/modules/lang/go/config.el index 694e685c7..cd655e9ef 100644 --- a/modules/lang/go/config.el +++ b/modules/lang/go/config.el @@ -76,14 +76,14 @@ go-guru-expand-region) :config (unless (executable-find "guru") - (warn "go-mode: couldn't find guru, refactoring commands won't work"))) + (warn! "Couldn't find guru. Refactoring commands (go-guru-*) won't work"))) (def-package! gorepl-mode :commands (gorepl-run gorepl-run-load-current-file) :config (unless (executable-find "gore") - (warn "go-mode: couldn't find gore, REPL support disabled"))) + (warn! "Couldn't find gore. REPL will not work"))) (def-package! company-go @@ -92,6 +92,6 @@ :after go-mode :config (setq company-go-show-annotation t) - (if (executable-find command-go-gocode-command) - (set! :company-backend 'go-mode '(company-go)) - (warn "go-mode: couldn't find gocode, code completion won't work"))) + (set! :company-backend 'go-mode '(company-go)) + (unless (executable-find command-go-gocode-command) + (warn! "Couldn't find gocode. Code completion won't work"))) diff --git a/modules/lang/haskell/+dante.el b/modules/lang/haskell/+dante.el index 9e580ae51..3064b5ff2 100644 --- a/modules/lang/haskell/+dante.el +++ b/modules/lang/haskell/+dante.el @@ -5,11 +5,9 @@ :after haskell-mode :hook (haskell-mode . dante-mode) :config - (add-hook 'haskell-mode-hook #'interactive-haskell-mode) - (unless (executable-find "cabal") - (warn "haskell-mode: couldn't find cabal") - (remove-hook 'haskell-mode-hook #'dante-mode)) + (warn! "Couldn't find cabal, haskell-mode may have issues")) + (add-hook 'haskell-mode-hook #'interactive-haskell-mode) (add-hook 'dante-mode-hook #'flycheck-mode)) diff --git a/modules/lang/haskell/+intero.el b/modules/lang/haskell/+intero.el index e3b3ab643..c423fd149 100644 --- a/modules/lang/haskell/+intero.el +++ b/modules/lang/haskell/+intero.el @@ -5,8 +5,7 @@ :hook (haskell-mode . intero-mode) :config (unless (executable-find "stack") - (warn "haskell-mode: couldn't find stack, disabling intero") - (remove-hook 'haskell-mode-hook #'intero-mode)) + (warn! "Couldn't find stack. Intero has been disabled.")) (add-hook! 'intero-mode-hook #'(flycheck-mode eldoc-mode)) diff --git a/modules/lang/haskell/config.el b/modules/lang/haskell/config.el index ed5c84b50..6d5987b1b 100644 --- a/modules/lang/haskell/config.el +++ b/modules/lang/haskell/config.el @@ -31,10 +31,9 @@ :init (add-hook 'haskell-mode-hook #'ghc-comp-init) :config - (if (executable-find "ghc-mod") - (set! :company-backend 'haskell-mode #'company-ghc) - (warn "haskell-mode: couldn't find ghc-mod on PATH") - (remove-hook 'haskell-mode-hook #'ghc-comp-init)) + (unless (executable-find "ghc-mod") + (warn! "Couldn't find ghc-mod on PATH. Code completion is disabled.")) - (setq company-ghc-show-info 'oneline)) + (setq company-ghc-show-info 'oneline) + (set! :company-backend 'haskell-mode #'company-ghc)) diff --git a/modules/lang/java/config.el b/modules/lang/java/config.el index 8194c7923..c565b493e 100644 --- a/modules/lang/java/config.el +++ b/modules/lang/java/config.el @@ -5,7 +5,7 @@ (cond ((featurep! +meghanada) (load! +meghanada)) ((featurep! +eclim) ; FIXME lang/java +eclim ;;(load! +eclim) - (warn "java-mode: eclim support isn't implemented yet"))) + (warn! "Eclim support isn't implemented yet"))) ;; diff --git a/modules/lang/plantuml/config.el b/modules/lang/plantuml/config.el index 457f2872d..d13baf316 100644 --- a/modules/lang/plantuml/config.el +++ b/modules/lang/plantuml/config.el @@ -2,14 +2,15 @@ (def-package! plantuml-mode :mode "\\.p\\(lant\\)?uml$" - :config + :init (setq plantuml-jar-path (concat doom-etc-dir "plantuml.jar")) + :config (set! :popup "^\\*PLANTUML" '((size . 0.4)) '((select) (transient . 0))) (unless (executable-find "java") - (warn "plantuml-mode: can't find java, preview disabled.")) + (warn! "Couldn't find java. Disabling plantuml preview.")) (unless (file-exists-p plantuml-jar-path) - (warn "plantuml-mode: can't find plantuml.jar; run M-x +plantuml/install."))) + (warn! "Couldn't find plantuml.jar. Install it witInstall it with-x +plantuml/install."))) (def-package! flycheck-plantuml diff --git a/modules/lang/rust/config.el b/modules/lang/rust/config.el index 4faadda6c..da7d3b064 100644 --- a/modules/lang/rust/config.el +++ b/modules/lang/rust/config.el @@ -30,7 +30,7 @@ (expand-file-name "rust/src/" +rust-src-dir))) (unless (file-exists-p racer-cmd) - (warn "rust-mode: racer binary can't be found; auto-completion is disabled")) + (warn! "Couldn't find racer binary. Code completion won't work")) (set! :lookup 'rust-mode :definition #'racer-find-definition))