updated kakoune

This commit is contained in:
Michael Chalupiak
2026-10-12 18:25:41 -06:00
committed by Michael Chalupiak
parent 9f23b8e92b
commit 00781ddcae
16 changed files with 573 additions and 672 deletions

View File

@@ -18,17 +18,27 @@
;; Description
;;
;;; Code:
(setq url-proxy-services '(("no_proxy" . "localhost")
("http" . "proxygov.ray.com:80")
("https" . "proxygov.ray.com:80")))
;; (require 'misc)
(setopt treesit-enabled-modes t)
(set-face-attribute 'default nil
:width 'normal :weight 'normal
:slant 'normal :font (font-spec :family "Iosevka Term SS12" :size 18))
:slant 'normal :font (font-spec :family "Iosevka Term SS12" :size 20))
(set-face-attribute 'fixed-pitch nil
:width 'normal :weight 'normal
:slant 'normal :font (font-spec :family "Iosevka Term SS12" :size 18))
(set-face-attribute 'variable-pitch nil
:width 'normal :weight 'normal
:slant 'normal :font (font-spec :family "Gentium Plus" :size 18))
:slant 'normal :font (font-spec :family "Iosevka Term SS12" :size 20))
;; (set-face-attribute 'variable-pitch nil
;; :width 'normal :weight 'normal
;; :slant 'normal :font (font-spec :family "Gentium Plus" :size 18))
(defconst default-mode-line-format (copy-sequence mode-line-format))
(setq dired-kill-when-opening-new-dired-buffer t)
(setq gdb-show-main t
gdb-many-windows t)
(setq elfeed-use-curl nil)
(setq use-short-answers t)
(setq compilation-scroll-output t)
(setq history-length 100
global-auto-revert-non-file-buffers t
use-dialog-box nil
@@ -59,6 +69,8 @@
(lambda () (electric-indent-mode 1)))
(global-electric-pair-mode)
(global-electric-indent-mode)
;; (treesit-auto-install-grammar 'ask)
;; (treesit-enabled-modes t)
;; (enable-recursive-minibuffers t)
;; (read-extended-command-predicate #'command-completion-default-include-p)

View File

@@ -1,5 +1,7 @@
;;; -*- lexical-binding: t; -*-
;; (global-set-key (kbd "M-f") #'forward-to-word)
;; (global-set-key (kbd "M-F") #'forward-word)
(global-set-key (kbd "C-c f") #'consult-fd)
(global-set-key (kbd "C-c C-f") #'find-file-at-point)
(global-set-key (kbd "C-c r") #'recentf)

View File

@@ -32,6 +32,12 @@
(add-hook 'eshell-load-hook #'eat-eshell-mode)
(use-package vterm
:ensure t)
(use-package devdocs
:ensure t)
(use-package magit
:ensure t
:defer t)
@@ -162,183 +168,183 @@
'((emacs-lisp . t))))
(use-package org-msg
:ensure t
:defer t
:hook ((mu4e-main-mode . org-msg-mode)
(mu4e-compose-mode . org-msg-mode))
:config
(setq mail-user-agent 'mu4e-user-agent)
(setq org-msg-options "html-postamble:nil H:5 num:nil ^:{} toc:nil author:nil email:nil \\n:t"
org-msg-startup "hidestars indent inlineimages"
org-msg-default-alternatives '((new . (text html))
(reply-to-html . (text html))
(reply-to-text . (text)))
org-msg-convert-citation t))
;; (use-package org-msg
;; :ensure t
;; :defer t
;; :hook ((mu4e-main-mode . org-msg-mode)
;; (mu4e-compose-mode . org-msg-mode))
;; :config
;; (setq mail-user-agent 'mu4e-user-agent)
;; (setq org-msg-options "html-postamble:nil H:5 num:nil ^:{} toc:nil author:nil email:nil \\n:t"
;; org-msg-startup "hidestars indent inlineimages"
;; org-msg-default-alternatives '((new . (text html))
;; (reply-to-html . (text html))
;; (reply-to-text . (text)))
;; org-msg-convert-citation t))
(use-package mu4e
:ensure t
:commands (mu4e)
:config
(setq mu4e-mu-binary (executable-find "mu"))
;; (use-package mu4e
;; :ensure t
;; :commands (mu4e)
;; :config
;; (setq mu4e-mu-binary (executable-find "mu"))
(setq mu4e-read-option-use-builtin nil
mu4e-completing-read-function 'completing-read)
;; this is the directory we created before:
(setq mu4e-maildir "~/.local/share/mail/")
;; (setq mu4e-read-option-use-builtin nil
;; mu4e-completing-read-function 'completing-read)
;; ;; this is the directory we created before:
;; (setq mu4e-maildir "~/.local/share/mail/")
;; this command is called to sync imap servers:
(setq mu4e-get-mail-command (concat (executable-find "mbsync") " -a"))
;; how often to call it in seconds:
(setq mu4e-update-interval 300)
;; ;; this command is called to sync imap servers:
;; (setq mu4e-get-mail-command (concat (executable-find "mbsync") " -a"))
;; ;; how often to call it in seconds:
;; (setq mu4e-update-interval 300)
;; save attachment to desktop by default
;; or another choice of yours:
(setq mu4e-attachment-dir "~/Downloads")
;; ;; save attachment to desktop by default
;; ;; or another choice of yours:
;; (setq mu4e-attachment-dir "~/Downloads")
;; rename files when moving - needed for mbsync:
(setq mu4e-change-filenames-when-moving t)
;; ;; rename files when moving - needed for mbsync:
;; (setq mu4e-change-filenames-when-moving t)
;; list of your email adresses:
(setq mu4e-user-mail-address-list '("mikecchalupiak@outlook.com"
"chalupmc@rose-hulman.edu"
"mikec@mchalupiak.com"
"spamreciver1@outlook.com"))
; the following is to show shortcuts in the main view.
(setq mu4e-bookmarks ())
(add-to-list 'mu4e-bookmarks
'(:name "spamreciver"
:query "maildir:/spamreciver1@outlook.com/INBOX"
:key ?s))
(add-to-list 'mu4e-bookmarks
'(:name "mchalupiak.com"
:query "maildir:/mikec@mchalupiak.com/INBOX"
:key ?h))
(add-to-list 'mu4e-bookmarks
'(:name "rose"
:query "maildir:/chalupmc@rose-hulman.edu/INBOX"
:key ?r))
(add-to-list 'mu4e-bookmarks
'(:name "outlook"
:query "maildir:/mikecchalupiak@outlook.com/INBOX"
:key ?o))
;; ;; list of your email adresses:
;; (setq mu4e-user-mail-address-list '("mikecchalupiak@outlook.com"
;; "chalupmc@rose-hulman.edu"
;; "mikec@mchalupiak.com"
;; "spamreciver1@outlook.com"))
;; ; the following is to show shortcuts in the main view.
;; (setq mu4e-bookmarks ())
;; (add-to-list 'mu4e-bookmarks
;; '(:name "spamreciver"
;; :query "maildir:/spamreciver1@outlook.com/INBOX"
;; :key ?s))
;; (add-to-list 'mu4e-bookmarks
;; '(:name "mchalupiak.com"
;; :query "maildir:/mikec@mchalupiak.com/INBOX"
;; :key ?h))
;; (add-to-list 'mu4e-bookmarks
;; '(:name "rose"
;; :query "maildir:/chalupmc@rose-hulman.edu/INBOX"
;; :key ?r))
;; (add-to-list 'mu4e-bookmarks
;; '(:name "outlook"
;; :query "maildir:/mikecchalupiak@outlook.com/INBOX"
;; :key ?o))
(setq mu4e-contexts
`(,(make-mu4e-context
:name "outlook"
:match-func
(lambda (msg)
(when msg
(mu4e-message-contact-field-matches msg
:to "mikecchalupiak@outlook.com")))
:vars '((user-mail-address . "mikecchalupiak@outlook.com")
(user-full-name . "Michael Chalupiak")
(mu4e-drafts-folder . "/mikecchalupiak@outlook.com/Drafts")
(mu4e-refile-folder . "/mikecchalupiak@outlook.com/Archive")
(mu4e-sent-folder . "/mikecchalupiak@outlook.com/Sent")
(mu4e-trash-folder . "/mikecchalupiak@outlook.com/Trash")))
;; (setq mu4e-contexts
;; `(,(make-mu4e-context
;; :name "outlook"
;; :match-func
;; (lambda (msg)
;; (when msg
;; (mu4e-message-contact-field-matches msg
;; :to "mikecchalupiak@outlook.com")))
;; :vars '((user-mail-address . "mikecchalupiak@outlook.com")
;; (user-full-name . "Michael Chalupiak")
;; (mu4e-drafts-folder . "/mikecchalupiak@outlook.com/Drafts")
;; (mu4e-refile-folder . "/mikecchalupiak@outlook.com/Archive")
;; (mu4e-sent-folder . "/mikecchalupiak@outlook.com/Sent")
;; (mu4e-trash-folder . "/mikecchalupiak@outlook.com/Trash")))
,(make-mu4e-context
:name "rose"
:match-func
(lambda (msg)
(when msg
(mu4e-message-contact-field-matches msg
:to "chalupmc@rose-hulman.edu")))
:vars '((user-mail-address . "chalupmc@rose-hulman.edu")
(user-full-name . "Michael Chalupiak")
(mu4e-drafts-folder . "/chalupmc@rose-hulman.edu/Drafts")
(mu4e-refile-folder . "/chalupmc@rose-hulman.edu/Archive")
(mu4e-sent-folder . "/chalupmc@rose-hulman.edu/Sent")
(mu4e-trash-folder . "/chalupmc@rose-hulman.edu/Trash")))
;; ,(make-mu4e-context
;; :name "rose"
;; :match-func
;; (lambda (msg)
;; (when msg
;; (mu4e-message-contact-field-matches msg
;; :to "chalupmc@rose-hulman.edu")))
;; :vars '((user-mail-address . "chalupmc@rose-hulman.edu")
;; (user-full-name . "Michael Chalupiak")
;; (mu4e-drafts-folder . "/chalupmc@rose-hulman.edu/Drafts")
;; (mu4e-refile-folder . "/chalupmc@rose-hulman.edu/Archive")
;; (mu4e-sent-folder . "/chalupmc@rose-hulman.edu/Sent")
;; (mu4e-trash-folder . "/chalupmc@rose-hulman.edu/Trash")))
,(make-mu4e-context
:name "hosted"
:match-func
(lambda (msg)
(when msg
(mu4e-message-contact-field-matches msg
:to "mikec@mchalupiak.com")))
:vars '((user-mail-address . "mikec@mchalupiak.com")
(user-full-name . "Michael Chalupiak")
;; check your ~/.maildir to see how the subdirectories are called
;; e.g `ls ~/.maildir/example'
(mu4e-drafts-folder . "/mikec@mchalupiak.com/Drafts")
(mu4e-refile-folder . "/mikec@mchalupiak.com/Archive")
(mu4e-sent-folder . "/mikec@mchalupiak.com/Sent")
(mu4e-trash-folder . "/mikec@mchalupiak.com/Trash")))
,(make-mu4e-context
:name "spam"
:match-func
(lambda (msg)
(when msg
(mu4e-message-contact-field-matches msg
:to "spamreciver1@outlook.com")))
:vars '((user-mail-address . "spamreciver1@outlook.com")
(user-full-name . "spamreciver")
;; check your ~/.maildir to see how the subdirectories are called
;; e.g `ls ~/.maildir/example'
(mu4e-drafts-folder . "/spamreciver1@outlook.com/Drafts")
(mu4e-refile-folder . "/spamreciver1@outlook.com/Archive")
(mu4e-sent-folder . "/spamreciver1@outlook.com/Sent")
(mu4e-trash-folder . "/spamreciver1@outlook.com/Trash")))))
;; ,(make-mu4e-context
;; :name "hosted"
;; :match-func
;; (lambda (msg)
;; (when msg
;; (mu4e-message-contact-field-matches msg
;; :to "mikec@mchalupiak.com")))
;; :vars '((user-mail-address . "mikec@mchalupiak.com")
;; (user-full-name . "Michael Chalupiak")
;; ;; check your ~/.maildir to see how the subdirectories are called
;; ;; e.g `ls ~/.maildir/example'
;; (mu4e-drafts-folder . "/mikec@mchalupiak.com/Drafts")
;; (mu4e-refile-folder . "/mikec@mchalupiak.com/Archive")
;; (mu4e-sent-folder . "/mikec@mchalupiak.com/Sent")
;; (mu4e-trash-folder . "/mikec@mchalupiak.com/Trash")))
;; ,(make-mu4e-context
;; :name "spam"
;; :match-func
;; (lambda (msg)
;; (when msg
;; (mu4e-message-contact-field-matches msg
;; :to "spamreciver1@outlook.com")))
;; :vars '((user-mail-address . "spamreciver1@outlook.com")
;; (user-full-name . "spamreciver")
;; ;; check your ~/.maildir to see how the subdirectories are called
;; ;; e.g `ls ~/.maildir/example'
;; (mu4e-drafts-folder . "/spamreciver1@outlook.com/Drafts")
;; (mu4e-refile-folder . "/spamreciver1@outlook.com/Archive")
;; (mu4e-sent-folder . "/spamreciver1@outlook.com/Sent")
;; (mu4e-trash-folder . "/spamreciver1@outlook.com/Trash")))))
(setq mu4e-context-policy 'pick-first) ;; start with the first (default) context;
(setq mu4e-compose-context-policy 'ask)
; gpg encryptiom & decryption:
;; this can be left alone
(require 'epa-file)
(epa-file-enable)
(setq epa-pinentry-mode 'loopback)
(auth-source-forget-all-cached)
;; (setq mu4e-context-policy 'pick-first) ;; start with the first (default) context;
;; (setq mu4e-compose-context-policy 'ask)
;; ; gpg encryptiom & decryption:
;; ;; this can be left alone
;; (require 'epa-file)
;; (epa-file-enable)
;; (setq epa-pinentry-mode 'loopback)
;; (auth-source-forget-all-cached)
;; don't keep message compose buffers around after sending:
(setq message-kill-buffer-on-exit t)
;; ;; don't keep message compose buffers around after sending:
;; (setq message-kill-buffer-on-exit t)
;; send function:
(setq send-mail-function 'message-send-mail-with-sendmail
message-send-mail-function 'message-send-mail-with-sendmail)
;; ;; send function:
;; (setq send-mail-function 'message-send-mail-with-sendmail
;; message-send-mail-function 'message-send-mail-with-sendmail)
;; send program:
;; this is exeranal. remember we installed it before.
(setq sendmail-program (executable-find "msmtp"))
;; ;; send program:
;; ;; this is exeranal. remember we installed it before.
;; (setq sendmail-program (executable-find "msmtp"))
;; select the right sender email from the context.
(setq message-sendmail-envelope-from 'header)
;; ;; select the right sender email from the context.
;; (setq message-sendmail-envelope-from 'header)
;; chose from account before sending
;; this is a custom function that works for me.
;; well I stole it somewhere long ago.
;; I suggest using it to make matters easy
;; of course adjust the email adresses and account descriptions
(defun timu/set-msmtp-account ()
(if (message-mail-p)
(save-excursion
(let*
((from (save-restriction
(message-narrow-to-headers)
(message-fetch-field "from")))
(account
(cond
((string-match "mikecchalupiak@outlook.com" from) "outlook")
((string-match "chalupmc@rose-hulman.edu" from) "rose")
((string-match "mikec@mchalupiak.com" from) "hosted")
((string-match "spamreciver1@outlook.com" from) "spam"))))
(setq message-sendmail-extra-arguments (list '"-a" account)))))
;; ;; chose from account before sending
;; ;; this is a custom function that works for me.
;; ;; well I stole it somewhere long ago.
;; ;; I suggest using it to make matters easy
;; ;; of course adjust the email adresses and account descriptions
;; (defun timu/set-msmtp-account ()
;; (if (message-mail-p)
;; (save-excursion
;; (let*
;; ((from (save-restriction
;; (message-narrow-to-headers)
;; (message-fetch-field "from")))
;; (account
;; (cond
;; ((string-match "mikecchalupiak@outlook.com" from) "outlook")
;; ((string-match "chalupmc@rose-hulman.edu" from) "rose")
;; ((string-match "mikec@mchalupiak.com" from) "hosted")
;; ((string-match "spamreciver1@outlook.com" from) "spam"))))
;; (setq message-sendmail-extra-arguments (list '"-a" account)))))
(add-hook 'message-send-mail-hook 'timu/set-msmtp-account)
;; (add-hook 'message-send-mail-hook 'timu/set-msmtp-account)
;; mu4e cc & bcc
;; this is custom as well
(add-hook 'mu4e-compose-mode-hook
(defun timu/add-cc-and-bcc ()
"My Function to automatically add Cc & Bcc: headers.
This is in the mu4e compose mode."
(save-excursion (message-add-header "Cc:\n"))
(save-excursion (message-add-header "Bcc:\n"))))))
;; ask for context if no context matches;)))
;; ;; mu4e cc & bcc
;; ;; this is custom as well
;; (add-hook 'mu4e-compose-mode-hook
;; (defun timu/add-cc-and-bcc ()
;; "My Function to automatically add Cc & Bcc: headers.
;; This is in the mu4e compose mode."
;; (save-excursion (message-add-header "Cc:\n"))
;; (save-excursion (message-add-header "Bcc:\n"))))))
;; ;; ask for context if no context matches;)))
(use-package elfeed
:ensure t
@@ -373,6 +379,7 @@
'( ("https://phaazon.net/blog/feed")
("https://irreal.org/blog/?feed=rss2")
("https://port19.xyz/rss.xml")
("https://www.gingerbill.org/article/index.xml")
("https://lukesmith.xyz/index.xml")
("https://notrelated.xyz/rss")
("https://karl-voit.at/feeds/lazyblorg-all.atom_1.0.links-and-content.xml")
@@ -380,11 +387,11 @@
("https://danielde.dev/rss.xml")
("https://pkolaczk.github.io/feed.xml")
("https://joeyh.name/blog/index.rss")
("https://kagifeedback.org/atom/t/release-notes")
("https://api.substack.com/feed/podcast/462466.rss")
("https://www.dailywire.com/feeds/rss.xml")
("https://feeds.simplecast.com/6c2VScgo")
("https://feeds.simplecast.com/pp_b9xO6")))
("https://kagifeedback.org/atom/t/release-notes")))
;; ("https://api.substack.com/feed/podcast/462466.rss")
;; ("https://www.dailywire.com/feeds/rss.xml")
;; ("https://feeds.simplecast.com/6c2VScgo")
;; ("https://feeds.simplecast.com/pp_b9xO6")))
(defun elfeed/show-eww-open (&optional use-generic-p)
"open with eww"
(interactive "P")

View File

@@ -19,14 +19,14 @@
;;
;;; Code:
(use-package treesit-auto
:ensure t
;; :defer t
:custom
(treesit-auto-install t)
:config
(treesit-auto-add-to-auto-mode-alist 'all)
(global-treesit-auto-mode))
;; (use-package treesit-auto
;; :ensure t
;; ;; :defer t
;; :custom
;; (treesit-auto-install t)
;; :config
;; (treesit-auto-add-to-auto-mode-alist 'all)
;; (global-treesit-auto-mode))
;; (use-package gitconfig-mode
;; :ensure t
@@ -89,7 +89,9 @@
(add-to-list 'auto-mode-alist '("\\.odin\\'" . odin-ts-mode))
(add-to-list 'auto-mode-alist '("\\.zig\\(?:\\.zon\\)?\\'" . zig-ts-mode))
(defvar treesit-language-source-alist '())
;; (straight-use-package '(tree-sitter-langs :type git :host github
;; :repo "emacs-tree-sitter/tree-sitter-langs"))
;; (defvar treesit-language-source-alist '())
(add-to-list 'treesit-language-source-alist '(odin "https://github.com/tree-sitter-grammars/tree-sitter-odin"))
(add-to-list 'treesit-language-source-alist '(zig "https://github.com/tree-sitter-grammars/tree-sitter-zig"))
(add-to-list 'treesit-language-source-alist '(go "https://github.com/tree-sitter/tree-sitter-go"))

View File

@@ -329,10 +329,12 @@
;; Don't highlight current level indentation; it's distracting and is
;; unnecessary overhead for little benefit.
indent-bars-highlight-current-depth nil)
(add-hook 'prog-mode-hook #'indent-bars-mode 50)
(add-hook 'text-mode-hook #'indent-bars-mode 50)
:custom
(indent-bars-no-descend-lists t) ; no extra bars in continued func arg lists
(indent-bars-treesit-support t)
(indent-bars-treesit-ignore-blank-lines-types '("module"))
(indent-bars-treesit-ignore-blank-lines-types '("module")))
;; Add other languages as needed
;; (indent-bars-treesit-scope '((python function_definition class_definition for_statement
;; if_statement with_statement while_statement)))
@@ -341,7 +343,7 @@
;; list list_comprehension
;; dictionary dictionary_comprehension
;; parenthesized_expression subscript)))
:hook ((prog-mode text-mode) . indent-bars-mode))
(use-package dashboard
:ensure t

View File

@@ -19,6 +19,26 @@
;;
;;; Code:
(use-package system-packages
:ensure t)
(use-package exec-path-from-shell
:ensure t
:config
(defun copy-ssh-agent ()
"copy env variables for ssh agent"
(interactive)
(exec-path-from-shell-copy-env "SSH_AGENT_PID")
(exec-path-from-shell-copy-env "SSH_AUTH_SOCK"))
(copy-ssh-agent))
(use-package dumb-jump
:ensure t
:config
(setq dumb-jump-prefer-searcher 'ag)
(setq xref-show-definitions-function #'consult-xref)
(add-hook 'xref-backend-functions #'dumb-jump-xref-activate))
(use-package surround
:ensure t
:defer t
@@ -59,7 +79,8 @@
:ensure t
:defer 5
:config
(dtrt-indent-global-mode 1))
(add-hook 'prog-mode-hook #'dtrt-indent-mode)
(add-hook 'text-mode-hook #'dtrt-indent-mode))
(use-package undo-fu
:ensure t