diff options
author | Thanos Apollo <[email protected]> | 2023-12-16 11:46:19 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2023-12-16 11:46:19 +0200 |
commit | 4f8fddbd37bee9ebfc3af90ec988a0e1714d733b (patch) | |
tree | 593c78bc07583c63c258e01973db988ae4925870 /.emacs.d | |
parent | 5d0e390437e437ee558a7fa8c048b37d8db142ac (diff) |
emacs: Add thanos-ai.el
Configuration for AI tools
Diffstat (limited to '.emacs.d')
-rw-r--r-- | .emacs.d/modules/thanos-ai.el | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/.emacs.d/modules/thanos-ai.el b/.emacs.d/modules/thanos-ai.el new file mode 100644 index 0000000..1efb74a --- /dev/null +++ b/.emacs.d/modules/thanos-ai.el @@ -0,0 +1,53 @@ +;;; thanos-ai.el --- Thanos Modue -- AI Tools configuration -*- lexical-binding: t; -*- + +;; Copyright (C) 2023 Thanos Apollo + +;; Author: Thanos Apollo <[email protected]> +;; Keywords: extensions + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see <https://www.gnu.org/licenses/>. + +;;; Commentary: +;; ╭━━━━┳╮╱╱╱╱╱╱╱╱╱╱╱╱╱╱╭━━━╮╱╱╱╱╱╭╮╭╮╱╱╱╱╱╱╱╱╭━━━╮ +;; ┃╭╮╭╮┃┃╱╱╱╱╱╱╱╱╱╱╱╱╱╱┃╭━╮┃╱╱╱╱╱┃┃┃┃╱╱╱╱╱╱╱╱┃╭━━╯ +;; ╰╯┃┃╰┫╰━┳━━┳━╮╭━━┳━━╮┃┃╱┃┣━━┳━━┫┃┃┃╭━━╮╱╱╱╱┃╰━━┳╮╭┳━━┳━━┳━━╮ +;; ╱╱┃┃╱┃╭╮┃╭╮┃╭╮┫╭╮┃━━┫┃╰━╯┃╭╮┃╭╮┃┃┃┃┃╭╮┃╭━━╮┃╭━━┫╰╯┃╭╮┃╭━┫━━┫ +;; ╱╱┃┃╱┃┃┃┃╭╮┃┃┃┃╰╯┣━━┃┃╭━╮┃╰╯┃╰╯┃╰┫╰┫╰╯┃╰━━╯┃╰━━┫┃┃┃╭╮┃╰━╋━━┃ +;; ╱╱╰╯╱╰╯╰┻╯╰┻╯╰┻━━┻━━╯╰╯╱╰┫╭━┻━━┻━┻━┻━━╯╱╱╱╱╰━━━┻┻┻┻╯╰┻━━┻━━╯ +;; ╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱┃┃ +;; ╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╱╰╯ +;;; Code: + +;; Copilot +(require 'copilot) + +(define-key copilot-mode-map (kbd "M-TAB") 'copilot-accept-completion-by-line) +(define-key copilot-mode-map (kbd "C-M-n") 'copilot-next-completion) +(define-key copilot-mode (kbd "C-M-p") 'copilot-previous-completion) + +(add-hook 'emacs-lisp-mode-hook 'copilot-mode-hook) +(add-hook 'python-mode-hook 'copilot-mode-hook) + +;; ChatGPT +(require 'gptel) +(require 'password-store) + +(setf gptel-api-key (password-store-get "chatgpt/api") + gptel-model "gpt-4") + +(define-key gptel-mode-map (kbd "C-c h") #'gptel-menu) + + +(provide 'thanos-ai.el) +;;; thanos-ai.el ends here |