init-company.el 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ;;; init-company.el --- .Emacs Configuration -*- lexical-binding: t -*-
  2. ;;; Commentary:
  3. ;; Company es un famework de Emacs para el completado de texto.
  4. ;;; code:
  5. (use-package company
  6. :defer 5
  7. :diminish
  8. :bind
  9. (:map company-mode-map
  10. ("<backtab>" . company-complete))
  11. :config
  12. ;; Global
  13. (setq company-idle-delay 1
  14. company-minimum-prefix-length 1
  15. company-show-numbers nil
  16. company-tooltip-limit 20)
  17. ;; Facing
  18. (unless (face-attribute 'company-tooltip :background)
  19. (set-face-attribute 'company-tooltip nil :background "black" :foreground "gray40")
  20. (set-face-attribute 'company-tooltip-selection nil :inherit 'company-tooltip :background "gray15")
  21. (set-face-attribute 'company-preview nil :background "black")
  22. (set-face-attribute 'company-preview-common nil :inherit 'company-preview :foreground "gray40")
  23. (set-face-attribute 'company-scrollbar-bg nil :inherit 'company-tooltip :background "gray20")
  24. (set-face-attribute 'company-scrollbar-fg nil :background "gray40"))
  25. ;; Activating globally
  26. (global-company-mode t))
  27. (use-package company-quickhelp
  28. :ensure t
  29. :after company
  30. :config
  31. (company-quickhelp-mode 1))
  32. (provide 'init-company)
  33. ;; Local Variables:
  34. ;; byte-compile-warnings: (not free-vars)
  35. ;; End:
  36. ;;; init-company.el ends here