Changes
This commit is contained in:
parent
9661461943
commit
1b12caa6b8
36
init.el
36
init.el
|
@ -96,15 +96,27 @@
|
||||||
(setup (:require reading)
|
(setup (:require reading)
|
||||||
(:global "C-c C-r" #'reading-mode))
|
(:global "C-c C-r" #'reading-mode))
|
||||||
|
|
||||||
(setup Info
|
|
||||||
(:hook #'reading-mode))
|
|
||||||
|
|
||||||
(setup abbrev
|
(setup abbrev
|
||||||
(:option abbrev-file-name (sync/ "abbrev.el")
|
(:option abbrev-file-name (sync/ "abbrev.el")
|
||||||
save-abbrevs 'silent)
|
save-abbrevs 'silent)
|
||||||
(:hook-into text-mode
|
(:hook-into text-mode
|
||||||
circe-chat-mode))
|
circe-chat-mode))
|
||||||
|
|
||||||
|
(setup auto-insert
|
||||||
|
(setf (alist-get '("lisp/.*\\.el\\'" . "+Emacs lisp")
|
||||||
|
auto-insert-alist nil nil #'equal)
|
||||||
|
'("" ";;; " (file-name-nondirectory (buffer-file-name))
|
||||||
|
(make-string (max 2 (- fill-column (current-column) 27)) 32)
|
||||||
|
"-*- lexical-binding: t; -*-"
|
||||||
|
'(setq lexical-binding t)
|
||||||
|
"\n\n;;Copyright (C) " (format-time-string "%Y")
|
||||||
|
" " (progn user-full-name)
|
||||||
|
"\n\n;;; Code:"
|
||||||
|
"\n\n" _
|
||||||
|
"\n\n(provide '" (file-name-base (buffer-file-name)) ")"
|
||||||
|
"\n;;; " (file-name-nondirectory (buffer-file-name)) " ends here\n"))
|
||||||
|
(auto-insert-mode +1))
|
||||||
|
|
||||||
(setup autorevert
|
(setup autorevert
|
||||||
(:option global-auto-revert-non-file-buffers t
|
(:option global-auto-revert-non-file-buffers t
|
||||||
auto-revert-verbose nil)
|
auto-revert-verbose nil)
|
||||||
|
@ -133,7 +145,8 @@
|
||||||
"tildes.net"
|
"tildes.net"
|
||||||
"taskiq"
|
"taskiq"
|
||||||
"twitter.com" "nitter.net"
|
"twitter.com" "nitter.net"
|
||||||
"streamable.com"))
|
"streamable.com"
|
||||||
|
"hetzner.cloud"))
|
||||||
(add-to-list '+browse-url-secondary-browser-regexps domain))
|
(add-to-list '+browse-url-secondary-browser-regexps domain))
|
||||||
;; Set up URL handlers.
|
;; Set up URL handlers.
|
||||||
(+browse-url-set-handlers
|
(+browse-url-set-handlers
|
||||||
|
@ -147,7 +160,7 @@
|
||||||
args)))
|
args)))
|
||||||
(cons (rx ; videos
|
(cons (rx ; videos
|
||||||
(or "youtube.com" "youtu.be" "yewtu.be"
|
(or "youtube.com" "youtu.be" "yewtu.be"
|
||||||
(seq "." (or "mp4" "gif" "mov" "MOV") eos)))
|
(seq "." (or "mp4" "gif" "mov" "MOV" "webm") eos)))
|
||||||
(lambda (&rest args)
|
(lambda (&rest args)
|
||||||
(apply (if (executable-find "mpv")
|
(apply (if (executable-find "mpv")
|
||||||
#'+browse-url-with-mpv
|
#'+browse-url-with-mpv
|
||||||
|
@ -328,6 +341,13 @@
|
||||||
(ibuffer-auto-mode +1)
|
(ibuffer-auto-mode +1)
|
||||||
(ibuffer-switch-to-saved-filter-groups "default"))))
|
(ibuffer-switch-to-saved-filter-groups "default"))))
|
||||||
|
|
||||||
|
(setup info
|
||||||
|
(:also-load +Info)
|
||||||
|
(:with-mode Info-mode ; -_-
|
||||||
|
(:hook #'reading-mode)
|
||||||
|
(:bind "c" #'+Info-copy-current-node-name
|
||||||
|
"w" #'+Info-copy-current-node-name)))
|
||||||
|
|
||||||
(setup kmacro
|
(setup kmacro
|
||||||
(:also-load +kmacro)
|
(:also-load +kmacro)
|
||||||
(with-eval-after-load '+kmacro
|
(with-eval-after-load '+kmacro
|
||||||
|
@ -521,6 +541,10 @@
|
||||||
:repo "duckwork/actually-selected-window.el"))
|
:repo "duckwork/actually-selected-window.el"))
|
||||||
(actually-selected-window-mode +1))
|
(actually-selected-window-mode +1))
|
||||||
|
|
||||||
|
(setup (:straight adaptive-wrap)
|
||||||
|
(:with-mode adaptive-wrap-prefix-mode
|
||||||
|
(:hook-into visual-column-mode)))
|
||||||
|
|
||||||
(setup (:straight anzu)
|
(setup (:straight anzu)
|
||||||
(:option anzu-cons-mode-line-p nil)
|
(:option anzu-cons-mode-line-p nil)
|
||||||
(:+key [remap query-replace] #'anzu-query-replace-regexp
|
(:+key [remap query-replace] #'anzu-query-replace-regexp
|
||||||
|
@ -670,7 +694,7 @@
|
||||||
lui-time-stamp-position 'right-margin
|
lui-time-stamp-position 'right-margin
|
||||||
lui-time-stamp-format "[ %H:%M"
|
lui-time-stamp-format "[ %H:%M"
|
||||||
lui-track-behavior 'before-switch-to-buffer
|
lui-track-behavior 'before-switch-to-buffer
|
||||||
lui-track-indicator 'fringe
|
lui-track-indicator 'bar
|
||||||
lui-fill-remove-face-from-newline nil
|
lui-fill-remove-face-from-newline nil
|
||||||
lui-formatting-list `((,(+lui-make-formatting-list-rx "*")
|
lui-formatting-list `((,(+lui-make-formatting-list-rx "*")
|
||||||
1 lui-strong-face)
|
1 lui-strong-face)
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
;;; +Info.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;;Copyright (C) 2022 Case Duckworth
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(require 'info)
|
||||||
|
|
||||||
|
(defun +Info-copy-current-node-name (&optional arg)
|
||||||
|
"Put the name of the current Info invocation intothe kill ring.
|
||||||
|
This is the same as `Info-copy-current-node-name', but with the
|
||||||
|
arg reversed."
|
||||||
|
(interactive "P" Info-mode)
|
||||||
|
(Info-copy-current-node-name (unless arg 0)))
|
||||||
|
|
||||||
|
(provide '+Info)
|
||||||
|
;;; +Info.el ends here
|
|
@ -6,7 +6,7 @@
|
||||||
(interactive)
|
(interactive)
|
||||||
(if (region-active-p)
|
(if (region-active-p)
|
||||||
(eval-region (region-beginning) (region-end))
|
(eval-region (region-beginning) (region-end))
|
||||||
(eval-buffer)))
|
(+eval-region@pulse (lambda (_ _) (eval-buffer)) (point-min) (point-max))))
|
||||||
|
|
||||||
;; Should I move this to `+pulse' ?
|
;; Should I move this to `+pulse' ?
|
||||||
(defun +eval-region@pulse (advised beg end &rest args)
|
(defun +eval-region@pulse (advised beg end &rest args)
|
||||||
|
|
|
@ -91,7 +91,8 @@ This function makes a lambda, so you can throw it straight into
|
||||||
(propertize (+string-truncate (format-mode-line mode-name) 12)
|
(propertize (+string-truncate (format-mode-line mode-name) 12)
|
||||||
'face 'bold
|
'face 'bold
|
||||||
'keymap mode-line-major-mode-keymap
|
'keymap mode-line-major-mode-keymap
|
||||||
'help-echo (concat mode-name " mode\nmouse-1: show menu.")
|
'help-echo (concat (format-mode-line mode-name)
|
||||||
|
" mode\nmouse-1: show menu.")
|
||||||
'mouse-face 'mode-line-highlight)))
|
'mouse-face 'mode-line-highlight)))
|
||||||
|
|
||||||
(defcustom +modeline-modified-icon-alist '((ephemeral . "*")
|
(defcustom +modeline-modified-icon-alist '((ephemeral . "*")
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
(require 'cl-lib)
|
(require 'cl-lib)
|
||||||
|
(require 'acdw)
|
||||||
;; We don't require `org-capture' here because I'll have to require this library
|
;; We don't require `org-capture' here because I'll have to require this library
|
||||||
;; to init.el /before/ org-capture is fully needed. But I do need to declare
|
;; to init.el /before/ org-capture is fully needed. But I do need to declare
|
||||||
;; `org-capture-templates'.
|
;; `org-capture-templates'.
|
||||||
|
@ -39,6 +40,10 @@ LIST is a symbol and defaults to `org-capture-templates'."
|
||||||
(set list (sort (symbol-value list) (lambda (a b)
|
(set list (sort (symbol-value list) (lambda (a b)
|
||||||
(string< (car a) (car b))))))
|
(string< (car a) (car b))))))
|
||||||
|
|
||||||
|
(defun +org-capture-sort-after-init (&optional list)
|
||||||
|
"Sort LIST with `+org-capture-sort' after Emacs init."
|
||||||
|
(+ensure-after-init #'+org-capture-sort))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun +org-capture-templates-setf (key value &optional list sort-after)
|
(defun +org-capture-templates-setf (key value &optional list sort-after)
|
||||||
"Add KEY to LIST, using `setf'.
|
"Add KEY to LIST, using `setf'.
|
||||||
|
|
Loading…
Reference in New Issue