 (use-package company
   :ensure t
   :diminish company-mode "ⓐ"
-  :commands company-mode global-company-mode
-  :init
-  (add-hook 'after-init-hook 'global-company-mode)
+  :hook (after-init . global-company-mode)
+  :init
   (add-hook 'prog-mode-hook
             (lambda ()
-              (setq company-frontends '(company-tng-frontend
-                                        company-echo-metadata-frontend
-                                        company-pseudo-tooltip-unless-just-one-frontend
-                                        company-preview-if-just-one-frontend
-                                        company-preview-common-frontend)
-                    company-backends '((company-capf
-                                        company-yasnippet
-                                        company-abbrev
-                                        company-dabbrev-code
-                                        company-dabbrev
-                                        company-files))
-                    company-transformers '(company-sort-prefer-same-case-prefix)
-                    company-minimum-prefix-length 1
-                    company-search-regexp-function 'company-search-flex-regexp)))
+              (setq-local company-frontends '(company-tng-frontend
+                                              company-echo-metadata-frontend
+                                              company-pseudo-tooltip-unless-just-one-frontend
+                                              company-preview-if-just-one-frontend
+                                              company-preview-common-frontend))
+              (setq-local company-backends '((company-capf
+                                              company-yasnippet
+                                              company-abbrev
+                                              company-dabbrev-code
+                                              company-dabbrev
+                                              company-files)))
+              (setq-local company-transformers '(company-sort-prefer-same-case-prefix))
+              (setq-local company-minimum-prefix-length 1)
+              (setq-local company-search-regexp-function 'company-search-flex-regexp)))
   :config
   (setq company-lighter "ⓐ"
         company-frontends '(company-pseudo-tooltip-unless-just-one-frontend

;; Modelo (Template)
(use-package yasnippet
  :ensure t
  :diminish yas-minor-mode " ⓨ"
  :commands yas-minor-mode yas-global-mode
  :init
  (add-hook 'prog-mode-hook 'yas-minor-mode)

    (setq ispell-complete-word-dict (concat (expand-file-name user-emacs-directory) "dict/en_GB.dic"))
    (ispell-change-dictionary "en_GB"))
  :config
  (cond ((executable-find "hunspell")
         (setq ispell-program-name "hunspell"
               ispell-really-hunspell t))
        ((executable-find "aspell")
         (setq ispell-program-name "aspell"
               ispell-really-aspell t
               ispell-extra-args '("--sug-mode=ultra"))))
  (setq ispell-list-command "--list"
        ispell-look-p nil
        ispell-grep-command "rg"
        ispell-grep-options "-i"
