adding a lot of changes

This commit is contained in:
Chris Cochrun 2024-10-30 10:34:30 -05:00
parent 5c47bd8a72
commit be61aa14fb
2 changed files with 53 additions and 22 deletions

View file

@ -387,6 +387,13 @@ Let's make parens and other delimiters easier to tell apart by making nested one
mini-echo-buffer-status-style 'both mini-echo-buffer-status-style 'both
mini-echo-update-interval 0.2) mini-echo-update-interval 0.2)
(set-face-foreground 'mini-echo-blue "#57c7ff")
(set-face-foreground 'mini-echo-red "#ff5c57")
(set-face-foreground 'mini-echo-magenta "#ff6ac1")
(set-face-foreground 'mini-echo-green "#5af78e")
(set-face-foreground 'mini-echo-gray "#848688")
(set-face-foreground 'mini-echo-yellow "#f3f99d")
(set-face-foreground 'mini-echo-cyan "#9aedfe")
(defun chris/mini-echo-minibuffer-width-lessp () (defun chris/mini-echo-minibuffer-width-lessp ()
"Return non-nil if current minibuffer window width less than 120." "Return non-nil if current minibuffer window width less than 120."
@ -827,6 +834,7 @@ Let's start by creating a self contained function of what I'd like started on ev
(visual-fill-column-mode +1) (visual-fill-column-mode +1)
(display-line-numbers-mode -1) (display-line-numbers-mode -1)
(variable-pitch-mode +1) (variable-pitch-mode +1)
(jinx-mode +1)
(setq visual-fill-column-width 100 (setq visual-fill-column-width 100
visual-fill-column-center-text t) visual-fill-column-center-text t)
@ -2155,7 +2163,7 @@ GPTEL is a package that uses chatGPT to get some text generation in org-mode
(setq gptel-directives '((default (setq gptel-directives '((default
. "You are a large language model living in Emacs and a helpful assistant. Respond concisely.") . "You are a large language model living in Emacs and a helpful assistant. Respond concisely.")
(programming (programming
. "You are a large language model and a careful programmer. Provide code and only code as output without any additional text, prompt or note.") . "You are a large language model and a careful programmer. Provide code and thorough explanation to what you are doing. Please be thorough and teach me what you are trying to get across.")
(writing (writing
. "You are a large language model and a writing assistant. Respond concisely.") . "You are a large language model and a writing assistant. Respond concisely.")
(chat (chat
@ -2687,21 +2695,35 @@ Consult has a lot of nice functions like Ivy's Counsel functions (enhanced searc
(setq xref-show-xrefs-function 'consult-xref) (setq xref-show-xrefs-function 'consult-xref)
:general :general
(chris/leader-keys (chris/leader-keys
:states 'normal :states 'normal
:keymaps 'override :keymaps 'override
"si" 'consult-imenu "si" 'consult-imenu
"so" 'consult-org-heading "so" 'consult-org-heading
"sf" 'consult-find "sf" 'consult-fd
"sm" 'bookmark-jump "sm" 'bookmark-jump
"sf" 'consult-flymake "sF" 'consult-flymake
"sx" 'xref-show-xrefs "sx" 'xref-show-xrefs
"sy" 'consult-yank-from-kill-ring "sy" 'consult-yank-from-kill-ring
"sb" 'consult-eglot-symbols)) "sb" 'consult-eglot-symbols))
#+end_src #+end_src
**** Consult Omni
This a omni search for finding well, everything...
#+begin_src emacs-lisp
(use-package consult-omni
:load-path "/home/chris/.emacs.d/consult-omni/"
:load-path "/home/chris/.emacs.d/consult-omni/sources/"
:after consult
:config
(require 'consult-omni-sources)
(require 'consult-omni-embark)
(setq consult-omni-sources-modules-to-load '(consult-omni-brave-autosuggest consult-omni-wikipedia consult-omni-apps))
(consult-omni-sources-load-modules))
#+end_src
*** MARGINALIA *** MARGINALIA
Marginalia makes for some great decoration to our minibuffer completion items. Works great with Selectrum which does not have this out of the box. Marginalia makes for some great decoration to our minibuffer completion items. Works great with Selectrum which does not have this out of the box.
@ -3558,7 +3580,7 @@ I'd like to start learning and using rust if I can.
(setq rustic-format-on-save t (setq rustic-format-on-save t
rustic-lsp-client 'eglot rustic-lsp-client 'eglot
rustic-clippy-arguments "-- -W clippy::pedantic -W clippy::perf -W clippy::nursery -W clippy::unwrap_used" rustic-clippy-arguments "-- -W clippy::pedantic -W clippy::perf -W clippy::nursery -W clippy::unwrap_used"
rustic-rustfmt-args '("--edition" "2021") rustic-rustfmt-args ""
rustic-test-arguments "-- --nocapture") rustic-test-arguments "-- --nocapture")
(advice-add 'eglot-completion-at-point :around #'cape-wrap-buster) (advice-add 'eglot-completion-at-point :around #'cape-wrap-buster)
(add-to-list 'compilation-error-regexp-alist rustic-compilation-error) (add-to-list 'compilation-error-regexp-alist rustic-compilation-error)
@ -3705,7 +3727,6 @@ Let's give eglot a try.
(rust-mode . eglot-ensure) (rust-mode . eglot-ensure)
(rustic-mode . eglot-ensure) (rustic-mode . eglot-ensure)
(rust-ts-mode . eglot-ensure) (rust-ts-mode . eglot-ensure)
(text-mode . eglot-ensure)
:config :config
(defun chris/eglot-capf () (defun chris/eglot-capf ()
@ -3716,15 +3737,13 @@ Let's give eglot a try.
#'cape-file)))) #'cape-file))))
(add-hook 'eglot-managed-mode-hook #'chris/eglot-capf) (add-hook 'eglot-managed-mode-hook #'chris/eglot-capf)
(add-to-list 'eglot-server-programs '(org-mode . ("harper-ls" "--stdio")))
:general :general
(general-def 'normal eglot-mode-map (general-def 'normal eglot-mode-map
"ga" 'eglot-code-actions "ga" 'eglot-code-actions
"gi" 'eglot-find-implementation "gi" 'eglot-find-implementation
"gr" 'eglot-rename "gr" 'eglot-rename
"gR" 'xref-find-references "gR" 'xref-find-references))
"ge" 'eglot))
#+end_src #+end_src
#+begin_src emacs-lisp #+begin_src emacs-lisp
@ -4280,7 +4299,7 @@ Ledger mode
(setq mu4e-bookmarks (setq mu4e-bookmarks
'((:name "Unread messages" '((:name "Unread messages"
:query "flag:unread AND NOT flag:trashed AND NOT maildir:\"/outlook/Junk\" AND NOT maildir:\"/office/Junk Email\"0 AND NOT maildir:\"/outlook/Deleted\" AND NOT maildir:\"/office/Deleted Items\" AND NOT maildir:\"/office/Archive\" AND NOT maildir:\"/office/INBOX/Website Forms\" AND NOT maildir:\"/outlook/Archive\" AND NOT maildir:\"/cochrun/Archive\" AND NOT maildir:\"/cochrun/Junk\" AND NOT flag:list" :query "flag:unread AND NOT flag:trashed AND NOT maildir:\"/outlook/Junk\" AND NOT maildir:\"/office/Junk Email\"0 AND NOT maildir:\"/outlook/Deleted\" AND NOT maildir:\"/office/Deleted Items\" AND NOT maildir:\"/office/Archive\" AND NOT maildir:\"/office/INBOX/Website Forms\" AND NOT maildir:\"/outlook/Archive\" AND NOT maildir:\"/cochrun/Archive\" AND NOT maildir:\"/cochrun/Junk\""
:key 117) :key 117)
(:name "Today's messages" (:name "Today's messages"
:query "date:today..now" :query "date:today..now"
@ -4526,7 +4545,6 @@ Let's add our own eshell prompt. and set the password cache to a significantly h
(setq eshell-history-size 1024) (setq eshell-history-size 1024)
;;; Extra execution information ;;; Extra execution information
(defvar chris/eshell-status-p t (defvar chris/eshell-status-p t
"If non-nil, display status before prompt.") "If non-nil, display status before prompt.")

35
init.el
View file

@ -181,6 +181,13 @@
mini-echo-buffer-status-style 'both mini-echo-buffer-status-style 'both
mini-echo-update-interval 0.2) mini-echo-update-interval 0.2)
(set-face-foreground 'mini-echo-blue "#57c7ff")
(set-face-foreground 'mini-echo-red "#ff5c57")
(set-face-foreground 'mini-echo-magenta "#ff6ac1")
(set-face-foreground 'mini-echo-green "#5af78e")
(set-face-foreground 'mini-echo-gray "#848688")
(set-face-foreground 'mini-echo-yellow "#f3f99d")
(set-face-foreground 'mini-echo-cyan "#9aedfe")
(defun chris/mini-echo-minibuffer-width-lessp () (defun chris/mini-echo-minibuffer-width-lessp ()
"Return non-nil if current minibuffer window width less than 120." "Return non-nil if current minibuffer window width less than 120."
@ -541,6 +548,7 @@
(visual-fill-column-mode +1) (visual-fill-column-mode +1)
(display-line-numbers-mode -1) (display-line-numbers-mode -1)
(variable-pitch-mode +1) (variable-pitch-mode +1)
(jinx-mode +1)
(setq visual-fill-column-width 100 (setq visual-fill-column-width 100
visual-fill-column-center-text t) visual-fill-column-center-text t)
@ -1645,7 +1653,7 @@ Optional BACKEND must be `re-reveal' or a backend derived from it."
(setq gptel-directives '((default (setq gptel-directives '((default
. "You are a large language model living in Emacs and a helpful assistant. Respond concisely.") . "You are a large language model living in Emacs and a helpful assistant. Respond concisely.")
(programming (programming
. "You are a large language model and a careful programmer. Provide code and only code as output without any additional text, prompt or note.") . "You are a large language model and a careful programmer. Provide code and thorough explanation to what you are doing. Please be thorough and teach me what you are trying to get across.")
(writing (writing
. "You are a large language model and a writing assistant. Respond concisely.") . "You are a large language model and a writing assistant. Respond concisely.")
(chat (chat
@ -1897,20 +1905,29 @@ Describe everything that follows in the present tense, in response to what I typ
(setq xref-show-xrefs-function 'consult-xref) (setq xref-show-xrefs-function 'consult-xref)
:general :general
(chris/leader-keys (chris/leader-keys
:states 'normal :states 'normal
:keymaps 'override :keymaps 'override
"si" 'consult-imenu "si" 'consult-imenu
"so" 'consult-org-heading "so" 'consult-org-heading
"sf" 'consult-find "sf" 'consult-fd
"sm" 'bookmark-jump "sm" 'bookmark-jump
"sf" 'consult-flymake "sF" 'consult-flymake
"sx" 'xref-show-xrefs "sx" 'xref-show-xrefs
"sy" 'consult-yank-from-kill-ring "sy" 'consult-yank-from-kill-ring
"sb" 'consult-eglot-symbols)) "sb" 'consult-eglot-symbols))
(use-package consult-omni
:load-path "/home/chris/.emacs.d/consult-omni/"
:load-path "/home/chris/.emacs.d/consult-omni/sources/"
:after consult
:config
(require 'consult-omni-sources)
(require 'consult-omni-embark)
(setq consult-omni-sources-modules-to-load '(consult-omni-brave-autosuggest consult-omni-wikipedia consult-omni-apps))
(consult-omni-sources-load-modules))
(use-package marginalia (use-package marginalia
:bind (:map minibuffer-local-map :bind (:map minibuffer-local-map
("C-M-a" . marginalia-cycle) ("C-M-a" . marginalia-cycle)
@ -2600,7 +2617,7 @@ targets."
(setq rustic-format-on-save t (setq rustic-format-on-save t
rustic-lsp-client 'eglot rustic-lsp-client 'eglot
rustic-clippy-arguments "-- -W clippy::pedantic -W clippy::perf -W clippy::nursery -W clippy::unwrap_used" rustic-clippy-arguments "-- -W clippy::pedantic -W clippy::perf -W clippy::nursery -W clippy::unwrap_used"
rustic-rustfmt-args '("--edition" "2021") rustic-rustfmt-args ""
rustic-test-arguments "-- --nocapture") rustic-test-arguments "-- --nocapture")
(advice-add 'eglot-completion-at-point :around #'cape-wrap-buster) (advice-add 'eglot-completion-at-point :around #'cape-wrap-buster)
(add-to-list 'compilation-error-regexp-alist rustic-compilation-error) (add-to-list 'compilation-error-regexp-alist rustic-compilation-error)
@ -2682,7 +2699,6 @@ targets."
(rust-mode . eglot-ensure) (rust-mode . eglot-ensure)
(rustic-mode . eglot-ensure) (rustic-mode . eglot-ensure)
(rust-ts-mode . eglot-ensure) (rust-ts-mode . eglot-ensure)
(text-mode . eglot-ensure)
:config :config
(defun chris/eglot-capf () (defun chris/eglot-capf ()
@ -2693,15 +2709,13 @@ targets."
#'cape-file)))) #'cape-file))))
(add-hook 'eglot-managed-mode-hook #'chris/eglot-capf) (add-hook 'eglot-managed-mode-hook #'chris/eglot-capf)
(add-to-list 'eglot-server-programs '(org-mode . ("harper-ls" "--stdio")))
:general :general
(general-def 'normal eglot-mode-map (general-def 'normal eglot-mode-map
"ga" 'eglot-code-actions "ga" 'eglot-code-actions
"gi" 'eglot-find-implementation "gi" 'eglot-find-implementation
"gr" 'eglot-rename "gr" 'eglot-rename
"gR" 'xref-find-references "gR" 'xref-find-references))
"ge" 'eglot))
(use-package consult-eglot (use-package consult-eglot
:general :general
@ -3065,7 +3079,7 @@ targets."
(setq mu4e-bookmarks (setq mu4e-bookmarks
'((:name "Unread messages" '((:name "Unread messages"
:query "flag:unread AND NOT flag:trashed AND NOT maildir:\"/outlook/Junk\" AND NOT maildir:\"/office/Junk Email\"0 AND NOT maildir:\"/outlook/Deleted\" AND NOT maildir:\"/office/Deleted Items\" AND NOT maildir:\"/office/Archive\" AND NOT maildir:\"/office/INBOX/Website Forms\" AND NOT maildir:\"/outlook/Archive\" AND NOT maildir:\"/cochrun/Archive\" AND NOT maildir:\"/cochrun/Junk\" AND NOT flag:list" :query "flag:unread AND NOT flag:trashed AND NOT maildir:\"/outlook/Junk\" AND NOT maildir:\"/office/Junk Email\"0 AND NOT maildir:\"/outlook/Deleted\" AND NOT maildir:\"/office/Deleted Items\" AND NOT maildir:\"/office/Archive\" AND NOT maildir:\"/office/INBOX/Website Forms\" AND NOT maildir:\"/outlook/Archive\" AND NOT maildir:\"/cochrun/Archive\" AND NOT maildir:\"/cochrun/Junk\""
:key 117) :key 117)
(:name "Today's messages" (:name "Today's messages"
:query "date:today..now" :query "date:today..now"
@ -3253,7 +3267,6 @@ targets."
(setq eshell-history-size 1024) (setq eshell-history-size 1024)
;;; Extra execution information ;;; Extra execution information
(defvar chris/eshell-status-p t (defvar chris/eshell-status-p t
"If non-nil, display status before prompt.") "If non-nil, display status before prompt.")