ai and ui
This commit is contained in:
parent
cec4337197
commit
2a4f2cfb73
2 changed files with 168 additions and 77 deletions
110
init.el
110
init.el
|
@ -110,6 +110,20 @@
|
|||
(use-package command-log-mode
|
||||
:commands command-log-mode)
|
||||
|
||||
(defun chris/home-manager-reload ()
|
||||
(interactive)
|
||||
(let* ((which-emacs (shell-command-to-string "nix-store --query $(which emacs)"))
|
||||
(pattern (rx "newLoadPath+=(/nix/store/"
|
||||
(group (* any))
|
||||
"-emacs-packages-deps/share/emacs/site-lisp)"))
|
||||
(current-deps (when (string-match pattern which-emacs)
|
||||
(match-string 1 which-emacs)))
|
||||
(subdirs (concat "/nix/store/" current-deps "-emacs-packages-deps/share/emacs/site-lisp/subdirs.el"))
|
||||
(native (concat "/nix/store/" current-deps "-emacs-packages-deps/share/emacs/native-lisp/")))
|
||||
(load-file subdirs)
|
||||
(when (boundp 'native-comp-eln-load-path)
|
||||
(add-to-list 'native-comp-eln-load-path native))))
|
||||
|
||||
(use-package all-the-icons)
|
||||
|
||||
(use-package doom-modeline
|
||||
|
@ -130,38 +144,6 @@
|
|||
(with-selected-frame frame
|
||||
(setq doom-modeline-icon t))))))
|
||||
|
||||
(use-package mini-echo
|
||||
:init
|
||||
(mini-echo-mode 1)
|
||||
(setq mini-echo-default-segments '(:long
|
||||
("evil" "major-mode" "buffer-name" "vcs" "buffer-position" "buffer-size"
|
||||
"flymake" "process" "selection-info" "narrow" "macro" "profiler")
|
||||
:short
|
||||
("buffer-name-short" "buffer-position" "process" "profiler"
|
||||
"selection-info" "narrow" "macro"))
|
||||
mini-echo-rules '((org-mode :long
|
||||
(("evil" . 1)
|
||||
("major-mode" . 2)
|
||||
("buffer-name" . 3)
|
||||
("word-count" . 4))))
|
||||
mini-echo-right-padding 0
|
||||
mini-echo-buffer-status-style 'both)
|
||||
|
||||
|
||||
(defun chris/mini-echo-minibuffer-width-lessp ()
|
||||
"Return non-nil if current minibuffer window width less than 120."
|
||||
(< (mini-echo-minibuffer-width) 100))
|
||||
|
||||
(setq mini-echo-short-style-predicate 'chris/mini-echo-minibuffer-width-lessp)
|
||||
|
||||
:config
|
||||
(defun chris/toggle-mode-lines ()
|
||||
"Switch between doom and mini-echo"
|
||||
(interactive)
|
||||
(if mini-echo-mode
|
||||
(eval (mini-echo-mode 0) (doom-modeline-mode 1))
|
||||
(eval (doom-modeline-mode 0) (mini-echo-mode 1)))))
|
||||
|
||||
(use-package doom-themes
|
||||
:ensure t
|
||||
:init (load-theme 'doom-snazzy t))
|
||||
|
@ -180,6 +162,39 @@
|
|||
(setq which-key-idle-delay 0.3)
|
||||
(which-key-mode))
|
||||
|
||||
(use-package mini-echo
|
||||
:init
|
||||
(mini-echo-mode 1)
|
||||
(setq mini-echo-default-segments '(:long
|
||||
("evil" "major-mode" "buffer-name" "vcs" "buffer-position" "buffer-size"
|
||||
"flymake" "process" "selection-info" "narrow" "macro" "profiler")
|
||||
:short
|
||||
("buffer-name-short" "buffer-position" "process" "profiler"
|
||||
"selection-info" "narrow" "macro"))
|
||||
mini-echo-rules '((org-mode :long
|
||||
(("evil" . 1)
|
||||
("major-mode" . 2)
|
||||
("buffer-name" . 3)
|
||||
("word-count" . 4))))
|
||||
mini-echo-right-padding 0
|
||||
mini-echo-buffer-status-style 'both
|
||||
mini-echo-update-interval 0.2)
|
||||
|
||||
|
||||
(defun chris/mini-echo-minibuffer-width-lessp ()
|
||||
"Return non-nil if current minibuffer window width less than 120."
|
||||
(< (mini-echo-minibuffer-width) 100))
|
||||
|
||||
(setq mini-echo-short-style-predicate 'chris/mini-echo-minibuffer-width-lessp)
|
||||
|
||||
:config
|
||||
(defun chris/toggle-mode-lines ()
|
||||
"Switch between doom and mini-echo"
|
||||
(interactive)
|
||||
(if mini-echo-mode
|
||||
(eval (mini-echo-mode 0) (doom-modeline-mode 1))
|
||||
(eval (doom-modeline-mode 0) (mini-echo-mode 1)))))
|
||||
|
||||
(setenv "WAYLAND_DISPLAY" (if (string= (getenv "XDG_CURRENT_DESKTOP") "Hyprland")
|
||||
"wayland-1"
|
||||
"wayland-0"))
|
||||
|
@ -287,7 +302,8 @@
|
|||
(defun chris/open-bible ()
|
||||
"find a bible to open"
|
||||
(interactive)
|
||||
(find-file "~/org/bibles/"))
|
||||
(find-file "~/org/bibles/esv.org")
|
||||
)
|
||||
|
||||
(defun chris/transpose-lines (arg)
|
||||
"Moves the current line or region and follows"
|
||||
|
@ -886,7 +902,7 @@ much faster. The hope is to also make this a faster version of imenu."
|
|||
(setq org-roam-directory "~/org"
|
||||
org-roam-buffer-width 0.25
|
||||
org-roam-list-files-commands '(fd rg find fdfind)
|
||||
org-roam-file-exclude-regexp '(".stversion/|logseq/|presentations/|.stfolder/|.*~.*|.*sync.*")
|
||||
org-roam-file-exclude-regexp '(".stversion/|logseq/|presentations/|.stfolder/|.*~.*|.*sync.*|bibles/")
|
||||
org-roam-db-location "~/.emacs.d/org-roam.db"
|
||||
org-roam-completion-everywhere t
|
||||
org-roam-dailies-directory "dailies/"
|
||||
|
@ -1577,6 +1593,16 @@ Optional BACKEND must be `re-reveal' or a backend derived from it."
|
|||
async subtreep visible-only body-only ext-plist))
|
||||
file)))
|
||||
|
||||
(use-package ellama
|
||||
:init
|
||||
(require 'llm-ollama)
|
||||
(setopt ellama-buffer-mode 'org-mode
|
||||
ellama-user-nick "Chris"
|
||||
ellama-assistant-nick "Jeeves"
|
||||
ellama-provider
|
||||
(make-llm-ollama
|
||||
:chat-model "zephyr:7b-chat-q4_0" :embedding-model "zephyr:7b-chat-q4_0")))
|
||||
|
||||
(use-package jinx
|
||||
;; :hook (emacs-startup . global-jinx-mode)
|
||||
:init (flyspell-mode -1)
|
||||
|
@ -1761,7 +1787,7 @@ Optional BACKEND must be `re-reveal' or a backend derived from it."
|
|||
(use-package consult
|
||||
:after vertico
|
||||
:config
|
||||
(setq consult-narrow-key "C-n"
|
||||
(setq consult-narrow-key "<"
|
||||
consult-project-root-function 'projectile-project-root)
|
||||
|
||||
(consult-customize
|
||||
|
@ -1786,7 +1812,17 @@ Optional BACKEND must be `re-reveal' or a backend derived from it."
|
|||
"."
|
||||
)))
|
||||
(consult-ripgrep)))
|
||||
|
||||
(setq consult-imenu-config
|
||||
'((emacs-lisp-mode :toplevel "Functions" :types
|
||||
((102 "Functions" font-lock-function-name-face)
|
||||
(109 "Macros" font-lock-function-name-face)
|
||||
(112 "Packages" font-lock-constant-face)
|
||||
(116 "Types" font-lock-type-face)
|
||||
(118 "Variables" font-lock-variable-name-face)))))
|
||||
|
||||
(setq xref-show-xrefs-function 'consult-xref)
|
||||
|
||||
|
||||
:general
|
||||
(chris/leader-keys
|
||||
|
@ -1797,6 +1833,7 @@ Optional BACKEND must be `re-reveal' or a backend derived from it."
|
|||
"sf" 'consult-find
|
||||
"sm" 'bookmark-jump
|
||||
"sf" 'consult-flymake
|
||||
"sx" 'xref-show-xrefs
|
||||
"sy" 'consult-yank-from-kill-ring
|
||||
"sb" 'consult-eglot-symbols))
|
||||
|
||||
|
@ -2382,7 +2419,8 @@ targets."
|
|||
:states 'normal
|
||||
:keymaps '(rustic-mode override)
|
||||
"gc" 'rustic-compile
|
||||
"gr" 'projectile-run-project))
|
||||
"gr" 'projectile-run-project
|
||||
"si" 'consult-imenu-multi))
|
||||
|
||||
(use-package slint-mode
|
||||
:mode "\\.slint\\'")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue