summary refs log tree commit diff stats
path: root/user/emacs/init.el
diff options
context:
space:
mode:
Diffstat (limited to 'user/emacs/init.el')
-rw-r--r--user/emacs/init.el48
1 files changed, 38 insertions, 10 deletions
diff --git a/user/emacs/init.el b/user/emacs/init.el
index 785a9f53..5d5c1cb3 100644
--- a/user/emacs/init.el
+++ b/user/emacs/init.el
@@ -170,6 +170,12 @@
                               (side . bottom) (slot . 0) (preserve-size . (nil . t))
                               (no-other-window . t) (no-delete-other-windows . t))))
 
+(use-package buffer-terminator
+  :defer 60
+  :config (progn
+            (buffer-terminator-mode +1)
+            (setq buffer-terminator-verbose nil)))
+
 (defun noct-relative ()
   "Show relative line numbers."
   (when display-line-numbers
@@ -257,7 +263,7 @@ The DWIM behaviour of this command is as follows:
         mac-command-modifier 'super
         mac-right-command-modifier 'left
         mac-function-modifier 'hyper)
-  (define-key global-map (kbd "s-w") #'kill-this-buffer))
+  (define-key global-map (kbd "s-w") #'kill-current-buffer))
 
 (use-package avy
   :defer 2
@@ -648,6 +654,29 @@ _C-k_: prev  _u_pper              _=_: upper/lower       _s_mart resolve
             (setq kind-icon-default-face 'corfu-default)
             (add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter)))
 
+(use-package minuet
+  :general ("M-<tab>" #'minuet-show-suggestion)
+  :config (progn
+            (setq minuet-provider 'openai-fim-compatible
+                  minuet-n-completions 1
+                  minuet-context-window 512)
+            (plist-put minuet-openai-fim-compatible-options :end-point "http://localhost:11434/v1/completions")
+            (plist-put minuet-openai-fim-compatible-options :name "Ollama")
+            (plist-put minuet-openai-fim-compatible-options :api-key "TERM")
+            (plist-put minuet-openai-fim-compatible-options :model "qwen2.5-coder:32b")
+            (minuet-set-optional-options minuet-openai-fim-compatible-options :max_tokens 256)
+            (minuet-set-optional-options minuet-openai-fim-compatible-options :top_p 0.9)))
+
+(defun my/minuet-disable-tabnine ()
+  (when minuet-auto-suggestion-mode
+    (tabnine-mode -1)) )
+(add-hook 'minuet-auto-suggestion-mode-hook #'my/minuet-disable-tabnine)
+
+(defun my/tabnine-disable-minuet ()
+  (when tabnine-mode
+    (minuet-auto-suggestion-mode -1)))
+(add-hook 'tabnine-mode-hook #'my/tabnine-disable-minuet)
+
 (use-package tabnine-core
   :config (progn
             (with-demoted-errors "TabNine error: %s"
@@ -782,6 +811,7 @@ _C-k_: prev  _u_pper              _=_: upper/lower       _s_mart resolve
           (with-eval-after-load 'evil-ex
             (evil-ex-define-cmd "esh[ell]" #'eshell)))
   :config (progn
+            (eshell-load-modules eshell-modules-list)
             (setq eshell-prompt-function (lambda ()
                                            (concat (eshell/pwd) "\n$ "))
                   eshell-prompt-regexp "^[$][[:blank:]]"
@@ -829,18 +859,15 @@ _C-k_: prev  _u_pper              _=_: upper/lower       _s_mart resolve
   :general (:keymaps 'comint-mode-map
                      "C-c C-l" #'counsel-shell-history))
 
-(use-package chatgpt-shell
-  :defer 5
-  :config (progn
-            (chatgpt-shell-ollama-load-models :override t)
-            (setq chatgpt-shell-model-version "llama3.3")))
-
 ;;; Editing
 
 (setq-default tab-always-indent 'complete
               indent-tabs-mode nil
               tab-width 4)
 
+(if (fboundp 'kill-ring-deindent-mode)
+    (kill-ring-deindent-mode +1))
+
 (electric-pair-mode +1)
 
 (use-package ws-butler
@@ -1120,11 +1147,12 @@ paths for the same project."
             (require 'magit-extras)))
 
 (use-package magit-todos
-  :after magit
+  :defer 10
   :config (progn
             (magit-todos-mode +1)))
 
-(use-package difftastic)
+(use-package difftastic
+  :defer 5)
 (use-package difftastic-bindings
   :after magit
   :config (progn
@@ -1370,7 +1398,7 @@ paths for the same project."
   ";" #'execute-extended-command
   "a" #'my/ls-code-actions
   "bb" #'consult-buffer
-  "bx" #'kill-this-buffer
+  "bx" #'kill-current-buffer
   "br" #'revert-buffer
   "bk" #'kill-buffer
   "dd" #'dired