Whatever
This commit is contained in:
parent
caf8d7aa54
commit
e037d2fb71
71
init.el
71
init.el
|
@ -113,7 +113,7 @@
|
||||||
(+ensure-after-init #'+pulse-location-mode))
|
(+ensure-after-init #'+pulse-location-mode))
|
||||||
|
|
||||||
(setup (:require reading)
|
(setup (:require reading)
|
||||||
(:hook-into view-mode) ; XXX doesn't go back
|
;;(:hook-into view-mode) ; XXX doesn't go back
|
||||||
)
|
)
|
||||||
|
|
||||||
(setup (:require user-save)
|
(setup (:require user-save)
|
||||||
|
@ -164,10 +164,11 @@
|
||||||
"pixelfed" "instagram.com" "bibliogram.art"
|
"pixelfed" "instagram.com" "bibliogram.art"
|
||||||
"reddit.com" "teddit.net"
|
"reddit.com" "teddit.net"
|
||||||
"taskiq"
|
"taskiq"
|
||||||
"twitter.com" "nitter.net"
|
"twitter.com" "nitter.net" "t.co"
|
||||||
"streamable.com"
|
"streamable.com" "spotify.com"
|
||||||
"hetzner.cloud"))
|
"hetzner.cloud"))
|
||||||
(add-to-list '+browse-url-secondary-browser-regexps domain))
|
(add-to-list '+browse-url-secondary-browser-regexps
|
||||||
|
(replace-regexp-in-string "\\." "\\\\." domain)))
|
||||||
;; Set up URL handlers.
|
;; Set up URL handlers.
|
||||||
(+browse-url-set-handlers
|
(+browse-url-set-handlers
|
||||||
(list
|
(list
|
||||||
|
@ -428,7 +429,6 @@
|
||||||
(string-match-p "lisp/org\\'" path))
|
(string-match-p "lisp/org\\'" path))
|
||||||
load-path))
|
load-path))
|
||||||
(:also-load +org
|
(:also-load +org
|
||||||
ox-md
|
|
||||||
_work)
|
_work)
|
||||||
(:option org-adapt-indentation nil
|
(:option org-adapt-indentation nil
|
||||||
org-archive-mark-done t
|
org-archive-mark-done t
|
||||||
|
@ -444,12 +444,6 @@
|
||||||
org-cycle-separator-lines 0
|
org-cycle-separator-lines 0
|
||||||
org-directory (sync/ "org/" t)
|
org-directory (sync/ "org/" t)
|
||||||
org-ellipsis truncate-string-ellipsis
|
org-ellipsis truncate-string-ellipsis
|
||||||
org-export-coding-system 'utf-8-unix
|
|
||||||
org-export-headline-levels 8
|
|
||||||
org-export-with-section-numbers nil
|
|
||||||
org-export-with-smart-quotes t
|
|
||||||
org-export-with-sub-superscripts t
|
|
||||||
org-export-with-toc nil
|
|
||||||
org-fontify-done-headline t
|
org-fontify-done-headline t
|
||||||
org-fontify-quote-and-verse-blocks t
|
org-fontify-quote-and-verse-blocks t
|
||||||
org-fontify-whole-heading-line t
|
org-fontify-whole-heading-line t
|
||||||
|
@ -553,6 +547,17 @@
|
||||||
(:option org-contacts-matcher "contact") ; Contacts are tagged "contact"
|
(:option org-contacts-matcher "contact") ; Contacts are tagged "contact"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
(setup org-export
|
||||||
|
(:also-load ox-md)
|
||||||
|
(:option org-export-coding-system 'utf-8-unix
|
||||||
|
org-export-headline-levels 8
|
||||||
|
org-export-with-section-numbers nil
|
||||||
|
org-export-with-smart-quotes t
|
||||||
|
org-export-with-sub-superscripts t
|
||||||
|
org-export-with-toc nil)
|
||||||
|
(with-eval-after-load 'user-save
|
||||||
|
(add-hook 'org-export-before-processing-hook #'user-save-buffer)))
|
||||||
|
|
||||||
(setup prog
|
(setup prog
|
||||||
(:local-set comment-auto-fill-only-comments t)
|
(:local-set comment-auto-fill-only-comments t)
|
||||||
(:hook #'prettify-symbols-mode
|
(:hook #'prettify-symbols-mode
|
||||||
|
@ -572,7 +577,7 @@
|
||||||
|
|
||||||
(setup tab-bar
|
(setup tab-bar
|
||||||
(:require +tab-bar)
|
(:require +tab-bar)
|
||||||
(:option tab-bar-tab-name-function '+tab-bar-tab-name-truncated-left
|
(:option tab-bar-tab-name-function '+tab-bar-basename
|
||||||
tab-bar-tab-name-truncated-max 20
|
tab-bar-tab-name-truncated-max 20
|
||||||
tab-bar-tab-name-ellipsis truncate-string-ellipsis
|
tab-bar-tab-name-ellipsis truncate-string-ellipsis
|
||||||
tab-bar-show t)
|
tab-bar-show t)
|
||||||
|
@ -583,7 +588,8 @@
|
||||||
(:hook #'turn-on-auto-fill))
|
(:hook #'turn-on-auto-fill))
|
||||||
|
|
||||||
(setup time
|
(setup time
|
||||||
(:option display-time-format "%H:%M")
|
(:option display-time-format "%H:%M"
|
||||||
|
display-time-default-load-average nil)
|
||||||
(display-time-mode +1))
|
(display-time-mode +1))
|
||||||
|
|
||||||
(setup (:straight 0x0)
|
(setup (:straight 0x0)
|
||||||
|
@ -620,13 +626,22 @@
|
||||||
|
|
||||||
(setup (:straight-when (apheleia
|
(setup (:straight-when (apheleia
|
||||||
:host github :repo "raxod502/apheleia")
|
:host github :repo "raxod502/apheleia")
|
||||||
(executable-find "diff"))
|
(eq system-type 'gnu/linux))
|
||||||
(:require apheleia
|
(:require apheleia
|
||||||
+apheleia)
|
+apheleia)
|
||||||
|
;; (setf (alist-get 'prettier apheleia-formatters)
|
||||||
|
;; '("npx" "prettier" "--stdin-filepath" filepath))
|
||||||
(apheleia-global-mode +1))
|
(apheleia-global-mode +1))
|
||||||
|
|
||||||
(setup (:straight avy)
|
(setup (:straight avy)
|
||||||
(:require avy +avy)
|
(:require avy +avy)
|
||||||
|
(:option avy-background t
|
||||||
|
avy-lead-faces
|
||||||
|
'(avy-lead-face
|
||||||
|
avy-lead-face-1 avy-lead-face-1 avy-lead-face-1
|
||||||
|
avy-lead-face-1 avy-lead-face-1 avy-lead-face-1))
|
||||||
|
(:face avy-background-face
|
||||||
|
((t (:foreground "#888888"))))
|
||||||
(:+key "M-j" #'avy-goto-char-timer)
|
(:+key "M-j" #'avy-goto-char-timer)
|
||||||
(:bind-into isearch
|
(:bind-into isearch
|
||||||
"M-j" #'avy-isearch)
|
"M-j" #'avy-isearch)
|
||||||
|
@ -779,7 +794,14 @@
|
||||||
(,(+lui-make-formatting-list-rx "_")
|
(,(+lui-make-formatting-list-rx "_")
|
||||||
1 lui-emphasis-face)
|
1 lui-emphasis-face)
|
||||||
(,(+lui-make-formatting-list-rx "/")
|
(,(+lui-make-formatting-list-rx "/")
|
||||||
1 lui-emphasis-face)))
|
1 lui-emphasis-face))
|
||||||
|
lui-autopaste-function
|
||||||
|
(defun +0x0-upload-string (string)
|
||||||
|
"Upload a string using 0x0."
|
||||||
|
(with-temp-buffer
|
||||||
|
(insert string)
|
||||||
|
(0x0-upload-text (0x0--choose-server)))
|
||||||
|
(current-kill 0)))
|
||||||
(add-to-list '+pulse-location-commands #'lui-track-jump-to-indicator)
|
(add-to-list '+pulse-location-commands #'lui-track-jump-to-indicator)
|
||||||
(:hook #'visual-line-mode
|
(:hook #'visual-line-mode
|
||||||
#'enable-lui-track
|
#'enable-lui-track
|
||||||
|
@ -787,7 +809,8 @@
|
||||||
(defun +disable-electric-pair-mode ()
|
(defun +disable-electric-pair-mode ()
|
||||||
"Disable `electric-pair-mode' in the current buffer."
|
"Disable `electric-pair-mode' in the current buffer."
|
||||||
(interactive)
|
(interactive)
|
||||||
(electric-pair-local-mode -1)))
|
(electric-pair-local-mode -1))
|
||||||
|
#'enable-lui-autopaste)
|
||||||
(:local-set fringes-outside-margins t
|
(:local-set fringes-outside-margins t
|
||||||
right-margin-width (length lui-time-stamp-format)
|
right-margin-width (length lui-time-stamp-format)
|
||||||
scroll-margin 0
|
scroll-margin 0
|
||||||
|
@ -973,6 +996,7 @@ See also `crux-reopen-as-root-mode'."
|
||||||
elfeed-show-unique-buffers t
|
elfeed-show-unique-buffers t
|
||||||
elfeed-db-directory (elfeed/ "db/" t))
|
elfeed-db-directory (elfeed/ "db/" t))
|
||||||
(:+key "C-x w" #'elfeed)
|
(:+key "C-x w" #'elfeed)
|
||||||
|
(advice-add #'elfeed-search-fetch :after #'beginning of buffer)
|
||||||
(:with-mode elfeed-search-mode
|
(:with-mode elfeed-search-mode
|
||||||
(:bind "&" #'+elfeed-search-browse-generic)
|
(:bind "&" #'+elfeed-search-browse-generic)
|
||||||
(:hook #'hl-line-mode)
|
(:hook #'hl-line-mode)
|
||||||
|
@ -1190,7 +1214,10 @@ See also `crux-reopen-as-root-mode'."
|
||||||
(keychain-refresh-environment))
|
(keychain-refresh-environment))
|
||||||
|
|
||||||
(setup (:straight lacarte)
|
(setup (:straight lacarte)
|
||||||
(:+key "<f10>" #'lacarte-execute-menu-command))
|
(:+key "<f10>" #'lacarte-execute-menu-command)
|
||||||
|
(with-eval-after-load 'vertico-multiform
|
||||||
|
(setf (alist-get 'lacarte-execute-menu-command vertico-multiform-commands)
|
||||||
|
'(buffer grid (vertico-sort-function . vertico-sort-length-alpha)))))
|
||||||
|
|
||||||
(setup (:straight (lin :host gitlab :repo "protesilaos/lin"))
|
(setup (:straight (lin :host gitlab :repo "protesilaos/lin"))
|
||||||
(require 'lin)
|
(require 'lin)
|
||||||
|
@ -1240,7 +1267,8 @@ See also `crux-reopen-as-root-mode'."
|
||||||
:host gitlab
|
:host gitlab
|
||||||
:repo "protesilaos/modus-themes"))
|
:repo "protesilaos/modus-themes"))
|
||||||
(require 'modus-themes (.etc "straight/build/modus-themes/modus-themes"))
|
(require 'modus-themes (.etc "straight/build/modus-themes/modus-themes"))
|
||||||
(:option modus-themes-bold-constructs t
|
(:option modus-themes-mixed-fonts t
|
||||||
|
modus-themes-bold-constructs t
|
||||||
modus-themes-italic-constructs t
|
modus-themes-italic-constructs t
|
||||||
modus-themes-headings '((t . (background))))
|
modus-themes-headings '((t . (background))))
|
||||||
(+sunrise-sunset 'modus-themes-load-operandi 'modus-themes-load-vivendi))
|
(+sunrise-sunset 'modus-themes-load-operandi 'modus-themes-load-vivendi))
|
||||||
|
@ -1324,7 +1352,8 @@ See also `crux-reopen-as-root-mode'."
|
||||||
(setup (:straight (simple-modeline
|
(setup (:straight (simple-modeline
|
||||||
:fork (:host github :repo "duckwork/simple-modeline")))
|
:fork (:host github :repo "duckwork/simple-modeline")))
|
||||||
(:require +modeline)
|
(:require +modeline)
|
||||||
(:option simple-modeline-segments
|
(:option +modeline-minions-icon ";"
|
||||||
|
simple-modeline-segments
|
||||||
`(( ; left
|
`(( ; left
|
||||||
+modeline-ace-window-display
|
+modeline-ace-window-display
|
||||||
+modeline-modified
|
+modeline-modified
|
||||||
|
@ -1361,7 +1390,9 @@ See also `crux-reopen-as-root-mode'."
|
||||||
:host github
|
:host github
|
||||||
:repo "duckwork/sophomore.el"))
|
:repo "duckwork/sophomore.el"))
|
||||||
(sophomore-enable #'narrow-to-region)
|
(sophomore-enable #'narrow-to-region)
|
||||||
(sophomore-disable #'view-hello-file)
|
(sophomore-disable ; These are mostly annoying commands
|
||||||
|
#'view-hello-file
|
||||||
|
#'describe-gnu-project)
|
||||||
(sophomore-mode +1))
|
(sophomore-mode +1))
|
||||||
|
|
||||||
(setup (:straight ssh-config-mode)
|
(setup (:straight ssh-config-mode)
|
||||||
|
|
|
@ -21,6 +21,14 @@
|
||||||
(defvar +tab-bar-show-original nil
|
(defvar +tab-bar-show-original nil
|
||||||
"Original value of `tab-bar-show'.")
|
"Original value of `tab-bar-show'.")
|
||||||
|
|
||||||
|
(defun +tab-bar-basename ()
|
||||||
|
"Generate the tab name from the basename of the buffer of the
|
||||||
|
selected window."
|
||||||
|
(let* ((tab-file-name (buffer-file-name (window-buffer (minibuffer-selected-window)))))
|
||||||
|
(if tab-file-name
|
||||||
|
(file-name-nondirectory tab-file-name)
|
||||||
|
(+tab-bar-tab-name-truncated-left))))
|
||||||
|
|
||||||
(defun +tab-bar-tab-name-truncated-left ()
|
(defun +tab-bar-tab-name-truncated-left ()
|
||||||
"Generate the tab name from the buffer of the selected window.
|
"Generate the tab name from the buffer of the selected window.
|
||||||
This is just like `tab-bar-tab-name-truncated', but truncates the
|
This is just like `tab-bar-tab-name-truncated', but truncates the
|
||||||
|
|
|
@ -1,4 +1,17 @@
|
||||||
;; ABANDON ALL HOPE YE WHO ENTER HERE
|
;;; remember.el --- Remember variables and modes -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(defmacro remember-remember (alist)
|
||||||
|
(let* ((template (format "remember--%s-%%s" (gensym)))
|
||||||
|
(reset-fn (intern (format template "recall")))
|
||||||
|
(things (cl-loop for (sym . newval) in alist
|
||||||
|
as rem = (intern (format template sym))
|
||||||
|
|
||||||
|
;; Collect original values
|
||||||
|
|
||||||
|
)))))
|
||||||
|
|
||||||
|
|
||||||
(defmacro remember-set (&rest symbols)
|
(defmacro remember-set (&rest symbols)
|
||||||
"Setup a closure remembering symbols to apply with
|
"Setup a closure remembering symbols to apply with
|
||||||
|
@ -6,7 +19,7 @@
|
||||||
SYMBOLS is a plist: the properties are symbols or mode names, and
|
SYMBOLS is a plist: the properties are symbols or mode names, and
|
||||||
their values what to set after `remember-setup'."
|
their values what to set after `remember-setup'."
|
||||||
(let* ((template (format "remember--%s-%%s" (gensym)))
|
(let* ((template (format "remember--%s-%%s" (gensym)))
|
||||||
(reset-fn (intern (format template "reset" "fn")))
|
(reset-fn (intern (format template "reset")))
|
||||||
(list (cl-loop for sym in symbols by #'cddr
|
(list (cl-loop for sym in symbols by #'cddr
|
||||||
collect `(,(intern (format template sym))
|
collect `(,(intern (format template sym))
|
||||||
,sym)
|
,sym)
|
||||||
|
@ -39,5 +52,5 @@ their values what to set after `remember-setup'."
|
||||||
|
|
||||||
;; test
|
;; test
|
||||||
|
|
||||||
(setq fn (remember-set display-fill-column-indicator-mode disable))
|
(set 'fn (remember-set display-fill-column-indicator-mode disable))
|
||||||
(funcall fn)
|
(funcall fn)
|
||||||
|
|
Loading…
Reference in New Issue