From 0be99de2cef5e9267cad07a06927f85dd8b0b48d Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Tue, 17 Sep 2024 10:11:07 -0500 Subject: [PATCH] some tweaks to windowing and removing ellama --- README.org | 30 +++++++++++++++++-- init.el | 86 +++++++++++++++++------------------------------------- 2 files changed, 55 insertions(+), 61 deletions(-) diff --git a/README.org b/README.org index 67445f17..638f05b7 100644 --- a/README.org +++ b/README.org @@ -2173,7 +2173,7 @@ Describe everything that follows in the present tense, in response to what I typ *** Ellama Idk, let's try this i guess -#+begin_src emacs-lisp +#+begin_src emacs-lisp :tangle no (use-package ellama :init (require 'llm-ollama) @@ -3143,6 +3143,14 @@ Ace link provides an avy like search for links. Upon using the keybindings prese (display-buffer-in-side-window) (side . right) (window-width . 0.4)) + ("*cargo-clippy*" + (display-buffer-in-side-window) + (side . right) + (window-width . 0.4)) + ("*cargo-test*" + (display-buffer-in-side-window) + (side . right) + (window-width . 0.4)) ("*rustic-compilation*" (display-buffer-in-side-window) (side . right) @@ -3203,6 +3211,14 @@ Ace link provides an avy like search for links. Upon using the keybindings prese (display-buffer-in-side-window) (side . bottom) (window-height . 0.25)) + ("*cargo-clippy*" + (display-buffer-in-side-window) + (side . bottom) + (window-height . 0.25)) + ("*cargo-test*" + (display-buffer-in-side-window) + (side . bottom) + (window-height . 0.25)) ("\\*Agenda Commands\\*" (display-buffer-in-side-window) (side . bottom) @@ -3696,7 +3712,8 @@ Let's give eglot a try. "ga" 'eglot-code-actions "gi" 'eglot-find-implementation "gr" 'eglot-rename - "gR" 'xref-find-references)) + "gR" 'xref-find-references + "ge" 'eglot)) #+end_src #+begin_src emacs-lisp @@ -4639,6 +4656,15 @@ Let's add our own eshell prompt. and set the password cache to a significantly h (other-window 1) (delete-window))) + (defun chris/btop () + "Run btop in eshell" + (interactive) + (eshell 101) + (with-current-buffer "*eshell*<101>" + (eshell-return-to-prompt) + (insert "btop") + (eshell-send-input))) + :general (chris/leader-keys :states 'normal diff --git a/init.el b/init.el index 3154fc36..6a91afea 100644 --- a/init.el +++ b/init.el @@ -1660,64 +1660,6 @@ Describe everything that follows in the present tense, in response to what I typ "la" 'gptel-send "lm" 'gptel-menu)) -(use-package ellama - :init - (require 'llm-ollama) - (setopt ellama-buffer-mode 'markdown-mode - ellama-user-nick "Chris" - ellama-assistant-nick "Jeeves" - ellama-auto-scroll t - ellama-provider - (make-llm-ollama - :scheme "https" - :host "ai.tfcconnection.org" - :port 443 - :chat-model "dolphin-mistral" :embedding-model "dolphin-mistral")) - - (setopt ellama-providers - '(("mistral" . (make-llm-ollama - :scheme "https" - :host "ai.tfcconnection.org" - :port 443 - :chat-model "mistral" - :embedding-model "mistral")) - ("llama3" . (make-llm-ollama - :scheme "https" - :host "ai.tfcconnection.org" - :port 443 - :chat-model "llama3.1" - :embedding-model "llama3.1")) - ("openhermes" . (make-llm-ollama - :scheme "https" - :host "ai.tfcconnection.org" - :port 443 - :chat-model "openhermes:7b-mistral-v2.5-q6_K" - :embedding-model "openhermes:7b-mistral-v2.5-q6_K")) - ("dolphin" . (make-llm-ollama - :scheme "https" - :host "ai.tfcconnection.org" - :port 443 - :chat-model "dolphin-uncensored" - :embedding-model "dolphin-uncensored")))) - :config - (defun chris/ellama-new-session (prompt) - (interactive "sAsk ellama: ") - (ellama-provider-select) - (ellama-new-session ellama-provider prompt)) - :general - (chris/leader-keys - :states '(normal visual) - :keymaps 'override - "l" '(:ignore t :which-key "llm") - "la" 'ellama-chat - "lb" 'ellama-ask-about - "lc" 'ellama-code-review - "lec" 'ellama-code-improve - "leg" 'ellama-improve-grammar - "leC" 'ellama-improve-conciseness - "lew" 'ellama-improve-wording - "ls" 'ellama-provider-select)) - (use-package jinx ;; :hook (emacs-startup . global-jinx-mode) :init (flyspell-mode -1) @@ -2310,6 +2252,14 @@ targets." (display-buffer-in-side-window) (side . right) (window-width . 0.4)) + ("*cargo-clippy*" + (display-buffer-in-side-window) + (side . right) + (window-width . 0.4)) + ("*cargo-test*" + (display-buffer-in-side-window) + (side . right) + (window-width . 0.4)) ("*rustic-compilation*" (display-buffer-in-side-window) (side . right) @@ -2370,6 +2320,14 @@ targets." (display-buffer-in-side-window) (side . bottom) (window-height . 0.25)) + ("*cargo-clippy*" + (display-buffer-in-side-window) + (side . bottom) + (window-height . 0.25)) + ("*cargo-test*" + (display-buffer-in-side-window) + (side . bottom) + (window-height . 0.25)) ("\\*Agenda Commands\\*" (display-buffer-in-side-window) (side . bottom) @@ -2734,7 +2692,8 @@ targets." "ga" 'eglot-code-actions "gi" 'eglot-find-implementation "gr" 'eglot-rename - "gR" 'xref-find-references)) + "gR" 'xref-find-references + "ge" 'eglot)) (use-package consult-eglot :general @@ -3427,6 +3386,15 @@ targets." (other-window 1) (delete-window))) + (defun chris/btop () + "Run btop in eshell" + (interactive) + (eshell 101) + (with-current-buffer "*eshell*<101>" + (eshell-return-to-prompt) + (insert "btop") + (eshell-send-input))) + :general (chris/leader-keys :states 'normal