summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bashrc3
-rw-r--r--.config/aerc/accounts.conf13
-rw-r--r--.config/emacs/init.el9
-rw-r--r--.config/emacs/modules/mm-editing.el26
-rw-r--r--.config/emacs/modules/mm-keybindings.el4
-rw-r--r--.config/emacs/modules/mm-modeline.el5
-rw-r--r--.config/emacs/modules/mm-projects.el29
-rw-r--r--.config/emacs/modules/mm-theme.el9
-rw-r--r--.config/emacs/modules/mm-treesit.el45
-rw-r--r--.config/emacs/site-lisp/number-format-mode.el129
-rw-r--r--.config/git/config2
-rw-r--r--.config/isync/mbsyncrc29
-rw-r--r--.config/msmtp/config9
13 files changed, 256 insertions, 56 deletions
diff --git a/.bashrc b/.bashrc
index c206121..16250f0 100644
--- a/.bashrc
+++ b/.bashrc
@@ -36,6 +36,7 @@ export MANPAGER="nvimpager"
export TERM="xterm-256color"
export VISUAL="nvim"
export MANSECT="3,2,1,8,5,7,4,6,3p,1p,0p"
+export LC_NUMERIC="nl_NL.UTF-8"
export XDG_CACHE_HOME="$HOME/.cache"
export XDG_CONFIG_DIRS="/etc/xdg"
@@ -87,7 +88,7 @@ export XCOMPOSEFILE="$XDG_CONFIG_HOME/X11/xcompose"
export REPODIR="$HOME/code"
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
-export PATH="$HOME/.local/bin:$HOME/.local/sbin:/opt/odin:$GOROOT/bin:$GOPATH/bin:$XDG_DATA_HOME/npm/bin:$PATH"
+export PATH="$HOME/.local/bin:$HOME/.local/sbin:$XDG_DATA_HOME/qlot/bin:/opt/odin:$GOROOT/bin:$GOPATH/bin:$XDG_DATA_HOME/npm/bin:$PATH"
export CLANGD_FLAGS='-header-insertion=never'
export GPG_TTY=`tty`
diff --git a/.config/aerc/accounts.conf b/.config/aerc/accounts.conf
index 2f6304b..9c7303b 100644
--- a/.config/aerc/accounts.conf
+++ b/.config/aerc/accounts.conf
@@ -9,7 +9,7 @@ outgoing = /usr/bin/msmtp
outgoing‐cred‐cmd = vlt raw Email mail@thomasvoss.com
signature-cmd = printf '— Thomas'
-[EuroCash]
+[EuroCash (Admin)]
copy-to = Sent
default = Inbox
folders-sort = Inbox
@@ -20,6 +20,17 @@ outgoing = /usr/bin/msmtp
outgoing‐cred‐cmd = vlt raw Email mail@euro-cash.eu
signature-cmd = printf '— Thomas'
+[EuroCash (Bugs)]
+copy-to = Sent
+default = Inbox
+folders-sort = Inbox
+from = EuroCash Bugs <bugs@euro-cash.eu>
+source = maildir://~/mail/bugs@euro-cash.eu
+source‐cred‐cmd = vlt raw Email bugs@euro-cash.eu
+outgoing = /usr/bin/msmtp
+outgoing‐cred‐cmd = vlt raw Email bugs@euro-cash.eu
+signature-cmd = printf '— Thomas'
+
[Legacy]
copy-to = Sent
default = Inbox
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index 8a7b2b3..9bb921c 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -294,6 +294,15 @@ the buffer without saving it."
(advice-add command :around #'mm-auto-create-directories))
+;;; Emacs Lisp Libraries
+
+;; The following are included here because they’re required by some of
+;; the modules.
+
+(use-package async
+ :ensure t)
+
+
;;; Load Modules
(require 'mm-abbrev) ; Text Expansion
diff --git a/.config/emacs/modules/mm-editing.el b/.config/emacs/modules/mm-editing.el
index 911a2a0..c6c8532 100644
--- a/.config/emacs/modules/mm-editing.el
+++ b/.config/emacs/modules/mm-editing.el
@@ -24,7 +24,8 @@
(dolist (command #'(align-region
c-backslash-region
comment-dwim
- makefile-backslash-region))
+ makefile-backslash-region
+ sh-backslash-region))
(advice-add command :around #'mm-editing-force-space-indentation))
@@ -46,7 +47,8 @@
indent-tabs-mode (not mm-humanwave-p))
(defvar mm-editing-indentation-settings-alist
- '((c-mode . (:extras c-basic-offset))
+ '((awk-ts-mode . (:extras awk-ts-mode-indent-level))
+ (c-mode . (:extras c-basic-offset))
(c-ts-mode . (:extras c-ts-mode-indent-offset))
(css-mode . (:extras css-indent-offset))
(emacs-lisp-mode . (:width 8 :spaces t)) ; GNU code uses 8-column tabs
@@ -308,11 +310,25 @@ is as described by `emmet-expand-line'."
(emmet-self-closing-tag-style ""))
+;;; Number Formatting
+
+(use-package number-format-mode
+ :commands ( number-format-buffer number-format-region
+ number-unformat-buffer number-unformat-region
+ number-format-mode))
+
+
;;; Additional Major Modes
-(use-package csv-mode :ensure t)
-(use-package git-modes :ensure t)
-(use-package sed-mode :ensure t)
+(use-package awk-ts-mode :ensure t)
+(use-package git-modes :ensure t)
+(use-package sed-mode :ensure t)
+
+(use-package csv-mode
+ :ensure t
+ :custom
+ (csv-align-style 'auto)
+ (csv-align-padding 2))
;;; Mode-Specific Configurations
diff --git a/.config/emacs/modules/mm-keybindings.el b/.config/emacs/modules/mm-keybindings.el
index 9917ab8..a5919de 100644
--- a/.config/emacs/modules/mm-keybindings.el
+++ b/.config/emacs/modules/mm-keybindings.el
@@ -100,6 +100,10 @@ the first command is remapped to the second command."
(keymap-global-unset "C-x C-l" :remove) ; ‘downcase-region’
(keymap-global-unset "C-x C-u" :remove) ; ‘upcase-region’
+;; The following conflict with ‘ace-window’
+(with-eval-after-load 'mhtml-mode
+ (keymap-unset html-mode-map "M-o" :remove))
+
;;; Bind Commands Globally
diff --git a/.config/emacs/modules/mm-modeline.el b/.config/emacs/modules/mm-modeline.el
index eaa852c..eae4dce 100644
--- a/.config/emacs/modules/mm-modeline.el
+++ b/.config/emacs/modules/mm-modeline.el
@@ -38,7 +38,7 @@
(propertize " (modified)" 'face 'mm-modeline-buffer-modified-face)))
(defconst mm-modeline-mode-acronyms
- '("css" "csv" "gsp" "html" "json" "mhtml" "rfc" "scss" "toml" "tsv")
+ '("css" "csv" "gsp" "html" "json" "mhtml" "rfc" "scss" "toml" "tsv" "url")
"List of acronyms in major mode names that should be capitalized.")
(defconst mm-modeline-remap-alist
@@ -50,7 +50,8 @@
("Gmake" . "GMake")
("Imake" . "IMake")
("Js" . "JavaScript")
- ("Ts Mode" . "Tree-Sitter Mode"))
+ ("Ts Mode" . "Tree-Sitter Mode")
+ ("Wdired" . "WDired"))
"Alist of substrings in major mode names that should be remapped.
Some major modes have substrings that would be better displayed in
another manner. For example expanding an abbreviation such as ‘Js’ to
diff --git a/.config/emacs/modules/mm-projects.el b/.config/emacs/modules/mm-projects.el
index f3a8710..be80789 100644
--- a/.config/emacs/modules/mm-projects.el
+++ b/.config/emacs/modules/mm-projects.el
@@ -20,18 +20,23 @@ This is intended to be called interactively via
(mm-projects-project-magit-status "Git Status" ?s)))
:config
(unless mm-darwin-p
- (if-let ((repo-directory (getenv "REPODIR"))
- (directories
- (cl-loop
- for author in (directory-files repo-directory :full "\\`[^.]")
- append (cl-loop
- for path in (directory-files author :full "\\`[^.]")
- collect (list (concat path "/"))))))
- (progn
- (with-temp-buffer
- (prin1 directories (current-buffer))
- (write-file project-list-file))
- (project--read-project-list))
+ (if-let ((repo-directory (getenv "REPODIR")))
+ (with-eval-after-load 'async
+ (async-start
+ (lambda ()
+ (require 'project)
+ (let* ((list-dir
+ (lambda (path)
+ (directory-files path :full "\\`[^.]")))
+ (directories
+ (cl-loop for author in (funcall list-dir (getenv "REPODIR"))
+ append (cl-loop for path in (funcall list-dir author)
+ collect (list (concat path "/"))))))
+ (with-temp-buffer
+ (prin1 directories (current-buffer))
+ (write-file project-list-file))))
+ (lambda (_proc)
+ (project--read-project-list))))
(warn "The REPODIR environment variable is not set."))))
diff --git a/.config/emacs/modules/mm-theme.el b/.config/emacs/modules/mm-theme.el
index 90d4992..f2e9b04 100644
--- a/.config/emacs/modules/mm-theme.el
+++ b/.config/emacs/modules/mm-theme.el
@@ -74,7 +74,7 @@ _FRAME is ignored."
((mhtml-mode html-mode html-ts-mode vue-ts-mode)
. ("<!--" "-->" "/>"))
(prog-mode
- . ("<=" ">=" "==" "!=" "*=" "__")))
+ . ("<<=" "<=" ">=" "==" "!=" "*=" "__")))
"Ligatures to enable in specific modes.
Elements of this alist are of the form:
@@ -203,9 +203,14 @@ See also the `mm-theme-background-opacity' variable."
;;; More Intuiative UI for Certain Modes
+(defun mm-disable-line-selection-mode ()
+ (line-selection-mode -1))
+
(use-package line-selection-mode
:hook ((bookmark-bmenu-mode dired-mode ibuffer-mode magit-repolist-mode)
- . line-selection-mode))
+ . line-selection-mode)
+ :config
+ (add-hook 'wdired-mode-hook #'mm-disable-line-selection-mode))
;;; Line Highlighting
diff --git a/.config/emacs/modules/mm-treesit.el b/.config/emacs/modules/mm-treesit.el
index df3d85a..a41f52c 100644
--- a/.config/emacs/modules/mm-treesit.el
+++ b/.config/emacs/modules/mm-treesit.el
@@ -15,13 +15,15 @@
(setopt treesit-font-lock-level 4)
(setopt treesit-language-source-alist
- '((c "https://github.com/tree-sitter/tree-sitter-c")
+ '((awk "https://github.com/Beaglefoot/tree-sitter-awk")
+ (c "https://github.com/tree-sitter/tree-sitter-c")
(cpp "https://github.com/tree-sitter/tree-sitter-cpp")
(css "https://github.com/tree-sitter/tree-sitter-css")
(go "https://github.com/tree-sitter/tree-sitter-go")
(gomod "https://github.com/camdencheek/tree-sitter-go-mod")
(gsp "git://git.thomasvoss.com/tree-sitter-gsp.git")
(html "https://github.com/tree-sitter/tree-sitter-html")
+ (java "https://github.com/tree-sitter/tree-sitter-java")
(javascript "https://github.com/tree-sitter/tree-sitter-javascript")
(python "https://github.com/tree-sitter/tree-sitter-python")
(typescript "https://github.com/tree-sitter/tree-sitter-typescript"
@@ -32,32 +34,23 @@
;;; Install Missing Parsers
-(defun mm-treesit-sync-sources ()
- "Sync Tree-Sitter parsers.
-Reinstall the Tree-Sitter parsers specified by
- `treesit-language-source-alist'."
+(defun mm-treesit-install-all ()
+ "Install all Tree-Sitter parsers.
+This is like `mm-treesit-install-missing' but also reinstalls parsers
+that are already installed."
(interactive)
- (let ((total (length treesit-language-source-alist))
- (count 0)
- (work treesit-language-source-alist)
- (processors-to-use (max 1 (1- (num-processors)))))
- (while work
- (let ((specs (seq-take work processors-to-use)))
- (dolist (spec specs)
- (async-start
- `(lambda ()
- ,(async-inject-variables "\\`treesit-language-source-alist\\'")
- (treesit-install-language-grammar ',(car spec)))
- (lambda (_)
- (setq count (1+ count))
- (message "Done syncing Tree-Sitter grammar for `%s' [%d/%d]"
- (car spec) count total))))
- (setq work (seq-drop work processors-to-use))))))
-
-(thread-last
- (mapcar #'car treesit-language-source-alist)
- (seq-remove #'treesit-language-available-p)
- (mapc #'treesit-install-language-grammar))
+ (cl-loop for (lang) in treesit-language-source-alist
+ do (treesit-install-language-grammar lang)))
+
+(defun mm-treesit-install-missing ()
+ "Install missing Tree-Sitter parsers.
+The parsers are taken from `treesit-language-source-alist'."
+ (interactive)
+ (cl-loop for (lang) in treesit-language-source-alist
+ unless (treesit-language-available-p lang)
+ do (treesit-install-language-grammar lang)))
+
+(mm-treesit-install-missing)
;;; Install Additional TS Modes
diff --git a/.config/emacs/site-lisp/number-format-mode.el b/.config/emacs/site-lisp/number-format-mode.el
new file mode 100644
index 0000000..cbc5937
--- /dev/null
+++ b/.config/emacs/site-lisp/number-format-mode.el
@@ -0,0 +1,129 @@
+;;; number-format-mode.el --- Format numbers in the current buffer -*- lexical-binding: t; -*-
+
+(eval-when-compile
+ (require 'cl-macs)
+ (require 'seq))
+
+(defgroup number-format nil
+ "Customization group for `number-format'."
+ :group 'convenience) ; TODO: Is this the right group?
+
+(defcustom number-format-separator "."
+ "Thousands separator to use in numeric literals."
+ :type 'string
+ :package-version '(number-format-mode . "1.0.0")
+ :group 'number-format)
+
+(defcustom number-format-predicate nil
+ "Function determining if a number should be formatted.
+When formatting a number, this function is called with the START and END
+range of the number in the buffer. If this function returns non-nil the
+number is formatted.
+
+If this function is nil then all numbers are formatted."
+ :type 'function
+ :package-version '(number-format-mode . "1.0.0")
+ :group 'number-format)
+
+(defvar-local number-format--overlays (make-hash-table :test 'eq))
+(defconst number-format--regexp "\\b[0-9]\\{4,\\}\\b")
+
+(defun number-format--add-separators (s)
+ (while (string-match "\\(.*[0-9]\\)\\([0-9][0-9][0-9].*\\)" s)
+ (setq s (concat (match-string 1 s)
+ number-format-separator
+ (match-string 2 s))))
+ s)
+
+(defun number-format--adjust-overlays (ov _1 beg end &optional _2)
+ (let* ((ov-beg (overlay-start ov))
+ (ov-end (overlay-end ov))
+ (overlays (overlays-in ov-beg ov-end)))
+ (mapcar #'delete-overlay (gethash ov number-format--overlays))
+ (save-excursion
+ (goto-char ov-beg)
+ (if (looking-at number-format--regexp :inhibit-modify)
+ (puthash ov (number-format--at-range ov-beg ov-end)
+ number-format--overlays)
+ (delete-overlay ov)
+ (remhash ov number-format--overlays)))))
+
+(defun number-format--at-range (beg end)
+ (when (or (null number-format-predicate)
+ (funcall number-format-predicate beg end))
+ (let* ((offsets [3 1 2])
+ (len (- end beg))
+ (off (aref offsets (mod len 3))))
+ (goto-char (+ beg off)))
+ (let (overlays)
+ (while (< (point) end)
+ (let* ((group-end (+ (point) 3))
+ (ov (make-overlay (point) group-end)))
+ (overlay-put ov 'before-string ".")
+ (overlay-put ov 'evaporate t)
+ (push ov overlays)
+ (goto-char group-end)))
+ overlays)))
+
+(defun number-format--jit-lock (beg end)
+ (let ((line-beg (save-excursion (goto-char beg) (line-beginning-position)))
+ (line-end (save-excursion (goto-char end) (line-end-position))))
+ (number-unformat-region line-beg line-end)
+ (number-format-region line-beg line-end)))
+
+;;;###autoload
+(defun number-format-region (beg end)
+ "Format numbers between BEG and END.
+When called interactively, format numbers in the active region."
+ (interactive "r")
+ (save-excursion
+ (goto-char beg)
+ (save-restriction
+ (narrow-to-region beg end)
+ (number-unformat-region beg end)
+ (while (re-search-forward number-format--regexp nil :noerror)
+ (save-excursion
+ (cl-destructuring-bind (beg end) (match-data)
+ (let ((ov (make-overlay beg end nil nil :rear-advance)))
+ (overlay-put ov 'evaporate t)
+ (dolist (sym '(insert-behind-hooks
+ insert-in-front-hooks
+ modification-hooks))
+ (overlay-put ov sym '(number-format--adjust-overlays)))
+ (puthash ov (number-format--at-range beg end)
+ number-format--overlays))))))))
+
+;;;###autoload
+(defun number-unformat-region (beg end)
+ "Unformat numbers between BEG and END.
+When called interactively, unformat numbers in the active region."
+ (interactive "r")
+ (dolist (ov (overlays-in beg end))
+ (when-let ((overlays (gethash ov number-format--overlays)))
+ (mapcar #'delete-overlay overlays)
+ (remhash ov number-format--overlays)
+ (delete-overlay ov))))
+
+;;;###autoload
+(defun number-format-buffer ()
+ "Format numbers in the current buffer."
+ (interactive)
+ (number-format-region (point-min) (point-max)))
+
+;;;###autoload
+(defun number-unformat-buffer ()
+ "Unformat numbers in the current buffer."
+ (interactive)
+ (number-unformat-region (point-min) (point-max)))
+
+;;;###autoload
+(define-minor-mode number-format-mode
+ "TODO"
+ :lighter " Number-Format"
+ :group 'number-format
+ (number-unformat-buffer)
+ (if number-format-mode
+ (jit-lock-register #'number-format--jit-lock)
+ (jit-lock-unregister #'number-format--jit-lock)))
+
+(provide 'number-format) \ No newline at end of file
diff --git a/.config/git/config b/.config/git/config
index 2b91fb2..0a5fdd1 100644
--- a/.config/git/config
+++ b/.config/git/config
@@ -77,4 +77,4 @@
directory = /opt/flutter
[transfer]
- fsckObjects = true
+ fsckObjects = true \ No newline at end of file
diff --git a/.config/isync/mbsyncrc b/.config/isync/mbsyncrc
index 4f123ed..4a0bc50 100644
--- a/.config/isync/mbsyncrc
+++ b/.config/isync/mbsyncrc
@@ -23,21 +23,40 @@ Patterns *
# mail@euro-cash.eu
-IMAPStore eurocash-remote
+IMAPStore eurocash-admin-remote
Host imap.migadu.com
User mail@euro-cash.eu
PassCmd "vlt raw Email mail@euro-cash.eu"
TLSType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt
-MaildirStore eurocash-local
+MaildirStore eurocash-admin-local
Path ~/mail/mail@euro-cash.eu/
Inbox ~/mail/mail@euro-cash.eu/Inbox
SubFolders Verbatim
-Channel eurocash
-Far :eurocash-remote:
-Near :eurocash-local:
+Channel eurocash-admin
+Far :eurocash-admin-remote:
+Near :eurocash-admin-local:
+Patterns *
+
+# bugs@euro-cash.eu
+
+IMAPStore eurocash-bugs-remote
+Host imap.migadu.com
+User bugs@euro-cash.eu
+PassCmd "vlt raw Email bugs@euro-cash.eu"
+TLSType IMAPS
+CertificateFile /etc/ssl/certs/ca-certificates.crt
+
+MaildirStore eurocash-bugs-local
+Path ~/mail/bugs@euro-cash.eu/
+Inbox ~/mail/bugs@euro-cash.eu/Inbox
+SubFolders Verbatim
+
+Channel eurocash-bugs
+Far :eurocash-bugs-remote:
+Near :eurocash-bugs-local:
Patterns *
# thomasvoss@live.com
diff --git a/.config/msmtp/config b/.config/msmtp/config
index 367898a..bfd8778 100644
--- a/.config/msmtp/config
+++ b/.config/msmtp/config
@@ -11,13 +11,20 @@ from mail@thomasvoss.com
user mail@thomasvoss.com
passwordeval vlt raw Email mail@thomasvoss.com
-account eurocash
+account eurocash-admin
host smtp.migadu.com
port 465
from mail@euro-cash.eu
user mail@euro-cash.eu
passwordeval vlt raw Email mail@euro-cash.eu
+account eurocash-bugs
+host smtp.migadu.com
+port 465
+from bugs@euro-cash.eu
+user bugs@euro-cash.eu
+passwordeval vlt raw Email bugs@euro-cash.eu
+
account legacy
host smtp.office365.com
port 587