Stuff...
This commit is contained in:
parent
cd3cc4f4e7
commit
58ab5fc5e2
60
init.el
60
init.el
|
@ -38,6 +38,19 @@
|
||||||
(save-buffer)))
|
(save-buffer)))
|
||||||
(:hook '+init-add-setup-to-imenu))
|
(:hook '+init-add-setup-to-imenu))
|
||||||
|
|
||||||
|
(setup (:require auth-source)
|
||||||
|
(:option auth-sources (list (private/ "authinfo")
|
||||||
|
(private/ "authinfo.gpg")
|
||||||
|
"~/.authinfo"
|
||||||
|
"~/.authinfo.gpg")))
|
||||||
|
|
||||||
|
(setup (:require pulse)
|
||||||
|
(:also-load +pulse)
|
||||||
|
(:option pulse-flag nil
|
||||||
|
pulse-delay 0.5
|
||||||
|
pulse-iterations 1)
|
||||||
|
(+pulse-location-mode +1))
|
||||||
|
|
||||||
(setup calendar
|
(setup calendar
|
||||||
(require '_location)
|
(require '_location)
|
||||||
(:option calendar-location-name _location-name
|
(:option calendar-location-name _location-name
|
||||||
|
@ -62,7 +75,8 @@
|
||||||
hardlink load move
|
hardlink load move
|
||||||
shell touch symlink)
|
shell touch symlink)
|
||||||
dired-dwim-target t)
|
dired-dwim-target t)
|
||||||
(:bind "TAB" 'dired-subtree-cycle
|
(:bind "<backspace>" 'dired-up-directory
|
||||||
|
"TAB" 'dired-subtree-cycle
|
||||||
"i" 'dired-subtree-toggle
|
"i" 'dired-subtree-toggle
|
||||||
")" 'dired-git-info-mode)
|
")" 'dired-git-info-mode)
|
||||||
(:hook 'dired-collapse-mode
|
(:hook 'dired-collapse-mode
|
||||||
|
@ -136,13 +150,6 @@
|
||||||
'display-fill-column-indicator-mode
|
'display-fill-column-indicator-mode
|
||||||
'turn-on-auto-fill))
|
'turn-on-auto-fill))
|
||||||
|
|
||||||
(setup pulse
|
|
||||||
(:also-load +pulse)
|
|
||||||
(:option pulse-flag nil
|
|
||||||
pulse-delay 0.5
|
|
||||||
pulse-iterations 1)
|
|
||||||
(+pulse-location-mode +1))
|
|
||||||
|
|
||||||
(setup text
|
(setup text
|
||||||
(:hook 'turn-on-auto-fill))
|
(:hook 'turn-on-auto-fill))
|
||||||
|
|
||||||
|
@ -358,6 +365,29 @@
|
||||||
(with-eval-after-load 'orderless
|
(with-eval-after-load 'orderless
|
||||||
(:option consult--regexp-compiler 'consult--orderless-regexp-compiler))))
|
(:option consult--regexp-compiler 'consult--orderless-regexp-compiler))))
|
||||||
|
|
||||||
|
(setup (:straight crux)
|
||||||
|
(:global "C-o" 'crux-smart-open-line
|
||||||
|
"M-o" 'crux-other-window-or-switch-buffer
|
||||||
|
"C-x 4 t" 'crux-transpose-windows)
|
||||||
|
|
||||||
|
(el-patch-feature crux)
|
||||||
|
(with-eval-after-load 'crux
|
||||||
|
(el-patch-defun crux-reopen-as-root ()
|
||||||
|
"Find file as root if necessary.
|
||||||
|
|
||||||
|
Meant to be used as `find-file-hook'.
|
||||||
|
See also `crux-reopen-as-root-mode'."
|
||||||
|
(unless (or
|
||||||
|
;; This helps fix for `nov-mode', and possibly others.
|
||||||
|
(el-patch-add (null buffer-file-name))
|
||||||
|
(tramp-tramp-file-p buffer-file-name)
|
||||||
|
(equal major-mode 'dired-mode)
|
||||||
|
(not (file-exists-p (file-name-directory buffer-file-name)))
|
||||||
|
(file-writable-p buffer-file-name)
|
||||||
|
(crux-file-owned-by-user-p buffer-file-name))
|
||||||
|
(crux-find-alternate-file-as-root buffer-file-name))))
|
||||||
|
(crux-reopen-as-root-mode +1))
|
||||||
|
|
||||||
(setup (:straight dictionary)
|
(setup (:straight dictionary)
|
||||||
(:option dictionary-use-single-buffer t)
|
(:option dictionary-use-single-buffer t)
|
||||||
(autoload 'dictionary-search "dictionary"
|
(autoload 'dictionary-search "dictionary"
|
||||||
|
@ -393,6 +423,10 @@
|
||||||
(:load-after consult embark)
|
(:load-after consult embark)
|
||||||
(add-hook 'embark-collect-mode-hook 'consult-preview-at-point-mode))
|
(add-hook 'embark-collect-mode-hook 'consult-preview-at-point-mode))
|
||||||
|
|
||||||
|
(setup (:straight eros)
|
||||||
|
(:hook-into emacs-lisp-mode
|
||||||
|
lisp-interaction-mode))
|
||||||
|
|
||||||
(setup (:straight eshell-syntax-highlighting)
|
(setup (:straight eshell-syntax-highlighting)
|
||||||
(:hook-into eshell-mode))
|
(:hook-into eshell-mode))
|
||||||
|
|
||||||
|
@ -693,7 +727,7 @@
|
||||||
|
|
||||||
(setup (:straight whitespace-cleanup-mode)
|
(setup (:straight whitespace-cleanup-mode)
|
||||||
(:option whitespace-cleanup-mode-preserve-point t)
|
(:option whitespace-cleanup-mode-preserve-point t)
|
||||||
(remove-hook 'before-save-hook 'whitespace-cleanup)
|
;;(remove-hook 'before-save-hook 'whitespace-cleanup)
|
||||||
(global-whitespace-cleanup-mode +1))
|
(global-whitespace-cleanup-mode +1))
|
||||||
|
|
||||||
(setup (:straight zzz-to-char)
|
(setup (:straight zzz-to-char)
|
||||||
|
@ -702,3 +736,11 @@
|
||||||
(interactive "P")
|
(interactive "P")
|
||||||
(call-interactively
|
(call-interactively
|
||||||
(if prefix #'zzz-up-to-char #'zzz-to-char)))))
|
(if prefix #'zzz-up-to-char #'zzz-to-char)))))
|
||||||
|
|
||||||
|
(setup (:straight scratch)
|
||||||
|
(:also-load +scratch)
|
||||||
|
(:option initial-major-mode 'emacs-lisp-mode
|
||||||
|
initial-scratch-message
|
||||||
|
";; ABANDON ALL HOPE YE WHO ENTER HERE")
|
||||||
|
(add-hook 'kill-buffer-query-functions '+scratch-immortal)
|
||||||
|
(add-hook 'scratch-create-buffer-hook '+scratch-buffer-setup))
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
;;; Code:
|
;;; Code:
|
||||||
|
|
||||||
|
(require 'pulse)
|
||||||
|
|
||||||
(defgroup +pulse nil
|
(defgroup +pulse nil
|
||||||
"Extra customizations for `pulse'."
|
"Extra customizations for `pulse'."
|
||||||
:group 'pulse
|
:group 'pulse
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
;;; +scratch.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
|
;;; Code:
|
||||||
|
|
||||||
|
(require 'scratch)
|
||||||
|
|
||||||
|
(defun +scratch-immortal ()
|
||||||
|
"Bury, don't kill \"*scratc*\" buffer.
|
||||||
|
For `kill-buffer-query-functions'."
|
||||||
|
(if (eq (current-buffer) (get-buffer "*scratch*"))
|
||||||
|
(progn (bury-buffer)
|
||||||
|
nil)
|
||||||
|
t))
|
||||||
|
|
||||||
|
(defun +scratch-buffer-setup ()
|
||||||
|
"Add comment to `scratch' buffer and name it accordingly."
|
||||||
|
(let* ((mode (format "%s" major-mode))
|
||||||
|
(string (concat "Scratch buffer for:" mode "\n\n")))
|
||||||
|
(when scratch-buffer
|
||||||
|
(save-excursion
|
||||||
|
(insert string)
|
||||||
|
(goto-char (point-min))
|
||||||
|
(comment-region (point-at-bol) (point-at-eol)))
|
||||||
|
(next-line 2))
|
||||||
|
(rename-buffer (concat "*scratch<" mode ">*") t)))
|
||||||
|
|
||||||
|
|
||||||
|
(provide '+scratch)
|
||||||
|
;;; +scratch.el ends here
|
|
@ -77,5 +77,8 @@ ALIGNMENT can be one of these:
|
||||||
(if (eq alignment 'right) "" filler)
|
(if (eq alignment 'right) "" filler)
|
||||||
after)))
|
after)))
|
||||||
|
|
||||||
|
;;; COMMANDS
|
||||||
|
|
||||||
|
|
||||||
(provide '+util)
|
(provide '+util)
|
||||||
;;; +util.el ends here
|
;;; +util.el ends here
|
||||||
|
|
Loading…
Reference in New Issue