whompmacs/whomp/whomp-dev-ext.el

51 lines
1.6 KiB
EmacsLisp
Raw Normal View History

2024-07-12 23:32:01 +00:00
;;
;; Extended development assistance packages
;; These are the packages uncommon to most developers but are
;; necessary to those they're necessary!
;;
(defcustom whomp-dev-ext nil
"Whether or not to enable extended development assistance packages."
:type '(set (const :tag "None" nil)
(const :tag "copilot" copilotmode) ;; code completion
(const :tag "terraform" terraformmode) ;; terraform language support
)
:group 'whomp-config)
;; terraform-mode
(when (memq 'terraformmode whomp-dev-ext)
(use-package terraform-mode
:straight t
:defer t)
(when (eq 'company whomp-completion)
(use-package company-terraform
:straight t
:defer t
:config
(add-hook 'terraform-mode-hook #'company-terraform-init))
(add-hook 'terraform-mode-hook #'terraform-format-on-save-mode)
(add-hook 'terraform-mode-hook #'terraform-format-on-save-mode))
(message "terraform-mode loaded"))
(when (memq 'copilotmode whomp-development)
(use-package dash
:straight t
:defer t)
(use-package editorconfig
:straight t
:defer t)
(use-package copilot
:straight (:host github :repo "zerolfx/copilot.el" :files ("dist" "*.el"))
:defer t
:ensure t
:config
;; you can utilize :map :hook and :config to customize copilot
(add-hook 'prog-mode-hook 'copilot-mode)
(define-key copilot-completion-map (kbd "<tab>") 'copilot-accept-completion)
(define-key copilot-completion-map (kbd "TAB") 'copilot-accept-completion))
(message "copilot loaded"))
(message "W.H.O.M.P. extended development assistance packages loaded")
(provide 'whomp-dev-ext)
;; whomp-dev-ext.el ends here