 
 ;; C/C++/Objective-C
 (use-package flycheck-clang-analyzer
-  :hook (flycheck-mode . flycheck-clang-analyzer-setup))
+  :after (flycheck)
+  :config (flycheck-clang-analyzer-setup))
 
 (use-package flycheck-objc-clang
-  :hook (flycheck-mode . flycheck-objc-clang-setup))
+  :after (flycheck)
+  :config (flycheck-objc-clang-setup))
 
 (use-package cmake-font-lock
   :hook (cmake-mode . cmake-font-lock-activate))

  :mode "\\.env\\..*\\'")

(use-package flycheck-yamllint
  :after yaml-mode
  :config (flycheck-yamllint-setup))

;; Emacs Lisp

  (add-hook 'before-save-hook 'gofmt-before-save nil 'local)
  (add-hook 'go-mode-hook
            (lambda ()
              (with-eval-after-load 'dap-mode
                (require 'dap-go)))))

(use-package flycheck-golangci-lint
  :after (go-mode)
  :config (flycheck-golangci-lint-setup))

;; Rust
(use-package rust-mode
