emacs: install minuet for local LLM-based completions
Alan Pearce alan@alanpearce.eu
Wed, 12 Mar 2025 17:54:15 +0100
2 files changed, 24 insertions(+), 0 deletions(-)
M user/emacs/init.el → user/emacs/init.el
@@ -654,6 +654,29 @@ :config (progn (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"
M user/settings/emacs.nix → user/settings/emacs.nix
@@ -134,6 +134,7 @@ magit magit-todos markdown-mode marginalia + minuet nerd-icons nix-ts-mode orderless