resolve keybind conflict

This commit is contained in:
Levi Neely 2024-09-06 23:21:21 +02:00
parent df2df4f613
commit 55ee5eda7c
1 changed files with 45 additions and 55 deletions

View File

@ -7,6 +7,8 @@
(setq package-enable-at-startup t) (setq package-enable-at-startup t)
(require 'use-package) (require 'use-package)
(setq auth-sources '("~/.authinfo.gpg"))
(defvar bootstrap-version) (defvar bootstrap-version)
(let ((bootstrap-file (let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory)) (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
@ -58,10 +60,10 @@
(get-text-property 0 'org-hd-marker item))) (get-text-property 0 'org-hd-marker item)))
(line (when marker (line (when marker
(org-with-point-at marker (org-with-point-at marker
(buffer-substring (line-beginning-position) (line-end-position))))) (buffer-substring (line-beginning-position) (line-end-position)))))
(todo-keyword (when marker (todo-keyword (when marker
(org-with-point-at marker (org-with-point-at marker
(org-get-todo-state)))) (org-get-todo-state))))
(truncated-line (when line (truncated-line (when line
(replace-regexp-in-string "^\\[#[A-Z]\\] " "" line)))) (replace-regexp-in-string "^\\[#[A-Z]\\] " "" line))))
(if truncated-line (if truncated-line
@ -137,26 +139,26 @@
(require 'server) (require 'server)
(unless (server-running-p) (server-start)) (unless (server-running-p) (server-start))
(setq backup-by-copying t (setq backup-by-copying t
completion-cycle-threshold 3 completion-cycle-threshold 3
create-lockfiles nil create-lockfiles nil
custom-file (concat user-emacs-directory "custom.el") custom-file (concat user-emacs-directory "custom.el")
delete-old-versions t delete-old-versions t
enable-recursive-minibuffers t enable-recursive-minibuffers t
focus-follows-mouse t focus-follows-mouse t
indent-tabs-mode nil indent-tabs-mode nil
inhibit-startup-screen t inhibit-startup-screen t
kept-new-versions 20 kept-new-versions 20
kept-old-versions 2 kept-old-versions 2
minibuffer-prompt-properties '(read-only t cursor-intangible t face minibuffer-prompt) minibuffer-prompt-properties '(read-only t cursor-intangible t face minibuffer-prompt)
mouse-autoselect-window t mouse-autoselect-window t
read-extended-command-predicate #'command-completion-default-include-p read-extended-command-predicate #'command-completion-default-include-p
read-process-output-max (* 1024 1024) read-process-output-max (* 1024 1024)
tab-always-indent 'complete tab-always-indent 'complete
tab-width 4 tab-width 4
text-mode-ispell-word-completion nil text-mode-ispell-word-completion nil
use-short-answers t use-short-answers t
version-control t version-control t
warning-minimum-level :emergency warning-minimum-level :emergency
backup-directory-alist `((".*" . ,(concat user-emacs-directory "backup"))) backup-directory-alist `((".*" . ,(concat user-emacs-directory "backup")))
read-extended-command-predicate #'command-completion-default-include-p read-extended-command-predicate #'command-completion-default-include-p
text-mode-ispell-word-completion nil text-mode-ispell-word-completion nil
@ -210,9 +212,9 @@
(use-package multiple-cursors :ensure t :defer t (use-package multiple-cursors :ensure t :defer t
:init (multiple-cursors-mode 1) :init (multiple-cursors-mode 1)
:bind (("C-x C-<" . 'mc/edit-lines) :bind (("C-x C-<" . 'mc/edit-lines)
("C->" . 'mc/mark-next-like-this) ("C->" . 'mc/mark-next-like-this)
("C-<" . 'mc/mark-previous-like-this) ("C-<" . 'mc/mark-previous-like-this)
("C-x C->" . 'mc/mark-all-like-this))) ("C-x C->" . 'mc/mark-all-like-this)))
;; minibuffer ;; minibuffer
;; === ;; ===
@ -303,13 +305,13 @@
;; === ;; ===
(use-package magit :ensure t :defer t (use-package magit :ensure t :defer t
:bind (("C-x g g" . #'magit-status) :bind (("C-x g g" . #'magit-status)
("C-x g l l" . #'magit-log) ("C-x g l l" . #'magit-log)
("C-x g l a" . #'magit-log-all) ("C-x g l a" . #'magit-log-all)
("C-x g l f" . #'magit-log-buffer-file) ("C-x g l f" . #'magit-log-buffer-file)
("C-x g R s" . #'magit-reset-soft) ("C-x g R s" . #'magit-reset-soft)
("C-x g R h" . #'magit-reset-hard) ("C-x g R h" . #'magit-reset-hard)
("C-x g !" . #'magit-run) ("C-x g !" . #'magit-run)
("C-x g b b" . #'magit-branch) ("C-x g b b" . #'magit-branch)
("C-x g b c" . #'magit-branch-create) ("C-x g b c" . #'magit-branch-create)
("C-x g b s" . #'magit-branch-checkout) ("C-x g b s" . #'magit-branch-checkout)
("C-x g m m" . #'magit-merge) ("C-x g m m" . #'magit-merge)
@ -317,7 +319,7 @@
:commands (magit-status-here magit-get-current-branch) :commands (magit-status-here magit-get-current-branch)
:custom (magit-display-buffer-function :custom (magit-display-buffer-function
#'magit-display-buffer-same-window-except-diff-v1)) #'magit-display-buffer-same-window-except-diff-v1))
;; diagramming ;; diagramming
@ -331,8 +333,8 @@
(use-package plantuml-mode :ensure t (use-package plantuml-mode :ensure t
:config :config
(setq plantuml-default-exec-mode 'jar (setq plantuml-default-exec-mode 'jar
plantuml-jar-path "/usr/share/plantuml/plantuml.jar" plantuml-jar-path "/usr/share/plantuml/plantuml.jar"
org-plantuml-jar-path (expand-file-name "/usr/share/plantuml/plantuml.jar")) org-plantuml-jar-path (expand-file-name "/usr/share/plantuml/plantuml.jar"))
(with-eval-after-load 'org (with-eval-after-load 'org
(org-babel-do-load-languages (org-babel-do-load-languages
'org-babel-load-languages '((plantuml . t))))) 'org-babel-load-languages '((plantuml . t)))))
@ -357,8 +359,8 @@
(use-package kotlin-mode :ensure t :defer t) (use-package kotlin-mode :ensure t :defer t)
(use-package fic-mode :ensure t :defer t) (use-package fic-mode :ensure t :defer t)
(use-package flycheck :ensure t :defer t (use-package flycheck :ensure t :defer t
:init :init
(global-flycheck-mode)) (global-flycheck-mode))
;; navigation ;; navigation
@ -630,11 +632,11 @@
(interactive "p") (interactive "p")
(let ((filename (dired-get-filename))) (let ((filename (dired-get-filename)))
(setq target (concat (file-name-sans-extension filename) (setq target (concat (file-name-sans-extension filename)
"-old" "-old"
(if (> arg 1) (number-to-string arg)) (if (> arg 1) (number-to-string arg))
(file-name-extension filename t))) (file-name-extension filename t)))
(if (file-directory-p filename) (if (file-directory-p filename)
(copy-file filename target)) (copy-file filename target))
) )
) )
@ -700,32 +702,20 @@
(setq claude-shell-api-token (getenv "CLAUDE_API_KEY"))) (setq claude-shell-api-token (getenv "CLAUDE_API_KEY")))
(use-package websocket :ensure t)
(use-package org-ai (use-package org-ai
:ensure t :ensure t
:commands (org-ai-mode org-ai-global-mode) :commands (org-ai-mode org-ai-global-mode)
:init :init
(add-hook 'org-mode-hook #'org-ai-mode) (add-hook 'org-mode-hook #'org-ai-mode)
(org-ai-global-mode nil) (org-ai-global-mode nil)
:config :config
(setq org-ai-default-provider 'anthropic)
(setq org-ai-default-chat-model "claude-3-opus-20240229")
(setq org-ai-use-auth-source t) (setq org-ai-use-auth-source t)
(global-set-key (kbd "C-x O a") org-ai-global-prefix-map)) (setq org-ai-default-provider 'anthropic)
(setq org-ai-default-chat-model "claude-3-5-sonnet-20240620")
(global-set-key (kbd "C-x O A") org-ai-global-prefix-map))
;; setup key bindings
(setopt ellama-keymap-prefix "C-c e")
;; language you want ellama to translate to
(setopt ellama-language "English")
;; could be llm-openai for example
(require 'llm-ollama)
(setopt ellama-provider
(make-llm-ollama
;; this model should be pulled to use it
;; value should be the same as you print in terminal during pull
:chat-model "codellama:latest"
:embedding-model "nomic-embed-text"
:default-chat-non-standard-params '(("num_ctx" . 8192)))))
(defun magit-reset-to-merge-base () (defun magit-reset-to-merge-base ()
"Reset to merge-base of two branches using Magit's branch selection." "Reset to merge-base of two branches using Magit's branch selection."