Update to have AI based package

This commit is contained in:
William Moore 2024-07-13 13:35:50 -05:00
parent 75874e36bf
commit 48f7dae924
4 changed files with 51 additions and 52 deletions

View File

@ -28,8 +28,8 @@
(require 'whomp-completion)
;; development configuration
(require 'whomp-development)
;; extended development configuration
(require 'whomp-dev-ext)
;; AI configuration
(require 'whomp-ai)
;; org configuration
(require 'whomp-orgmode)
;; dashboard

34
whomp/whomp-ai.el Normal file
View File

@ -0,0 +1,34 @@
;;
;; AI packages
;; These are the packages uncommon to most developers but are
;; necessary to those they're necessary!
;;
(defcustom whomp-ai nil
"Whether or not to enable AI packages."
:type '(set (const :tag "None" nil)
(const :tag "copilot" copilotmode) ;; code completion
)
:group 'whomp-config)
(when (memq 'copilotmode whomp-ai)
(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. AI packages loaded")
(provide 'whomp-ai)
;; whomp-ai.el ends here

View File

@ -1,50 +0,0 @@
;;
;; 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

View File

@ -15,9 +15,24 @@
(const :tag "elpy" elpymode) ;; python language support (elpy)
(const :tag "yaml" yamlmode) ;; yaml language support
(const :tag "rainbow-delimiters" rainbowmode) ;; rainbow-delimiters support
(const :tag "terraform" terraformmode) ;; terraform language support
)
:group 'whomp-config)
;; terraform-mode
(when (memq 'terraformmode whomp-development)
(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"))
;; lsp-mode
(when (memq 'lspmode whomp-development)