commit 56f0af60a0b011e78ea361e6e049e568aa46a1ae
parent 0e4759c3347d890643e1ee64b5d101f4b258c2e6
Author: dwrz <dwrz@dwrz.net>
Date: Sat, 21 Oct 2023 23:54:43 +0000
Update Emacs init
Diffstat:
M | emacs/init.el | | | 54 | +++++++++++++++++++++++++++++++++--------------------- |
1 file changed, 33 insertions(+), 21 deletions(-)
diff --git a/emacs/init.el b/emacs/init.el
@@ -2,7 +2,8 @@
;;; Commentary:
;;; Emacs configuration.
;;; Code:
-;; C source code variables.
+
+;; Global C source code variables.
(setq auto-save-interval 24
delete-by-moving-to-trash t
echo-keystrokes 0.1
@@ -16,6 +17,7 @@
ring-bell-function 'ignore
x-stretch-cursor t)
+;; Default variables that may be overwritten in a buffer.
(setq-default fill-column 80
tab-width 8
truncate-lines nil)
@@ -121,9 +123,9 @@
(use-package base16-theme
:config (setq base16-theme-256-color-source 'colors)
- (load-theme 'base16-tomorrow t)
- (set-face-attribute 'fringe nil :background "#ffffff")
- :ensure t)
+ :ensure t
+ :init (load-theme 'base16-tomorrow t)
+ (set-face-attribute 'fringe nil :background "#ffffff"))
(use-package bookmark :config (setq bookmark-save-flag 1) :ensure nil)
@@ -146,11 +148,11 @@
(setq company-idle-delay 0
company-minimum-prefix-length 1
company-tooltip-align-annotations t)
- (global-company-mode t)
:ensure t
- :hook (company-mode . company-box-mode))
+ :hook (company-mode . company-box-mode)
+ :init (global-company-mode t))
-(use-package company-box :ensure t)
+(use-package company-box :defer t :ensure t)
(use-package company-quickhelp
:config (setq company-quickhelp-delay 0.25)
@@ -216,7 +218,7 @@
(setq-default require-final-newline t)
:ensure nil)
-(use-package flycheck :ensure t)
+(use-package flycheck :defer t :ensure t)
(use-package frame :config (window-divider-mode -1) :ensure nil)
@@ -247,6 +249,7 @@
(use-package go-tag
:config (setq go-tag-args (list "-transform" "camelcase"))
+ :defer t
:ensure t)
(use-package hl-line
@@ -280,21 +283,21 @@
(use-package jka-cmpr-hook :init (auto-compression-mode t) :ensure nil)
-(use-package js-mode
+(use-package js
:config (setq js-indent-level 2)
:defines js-indent-level
:hook (js-mode . lsp)
:ensure nil)
-(use-package ledger-mode :ensure t)
+(use-package ledger-mode :defer t :ensure t)
-(use-package lsp-mode :ensure t)
+(use-package lsp-mode :defer t :ensure t)
(use-package magit :bind ("C-x g" . magit-status) :ensure t)
(use-package marginalia :init (marginalia-mode t) :defer t :ensure t)
-(use-package markdown-mode :ensure t)
+(use-package markdown-mode :defer t :ensure t)
(use-package menu-bar :config (menu-bar-mode -1) :ensure nil)
@@ -302,10 +305,14 @@
:config (setq message-directory "drafts"
message-kill-buffer-on-exit t
message-sendmail-envelope-from 'header
- message-sendmail-f-is-evil nil))
+ message-sendmail-f-is-evil nil)
+ :defer t
+ :ensure nil)
(use-package mule
:config
+ (prefer-coding-system 'utf-8)
+ (set-default-coding-systems 'utf-8)
(set-terminal-coding-system 'utf-8)
(set-keyboard-coding-system 'utf-8)
:ensure nil)
@@ -365,7 +372,7 @@
(:name "todo" :query "tag:todo" :key "t")))
:defines notmuch-search-tag notmuch-show-tag)
-(use-package novice :ensure nil) ;; TODO: disable.
+(use-package novice :disabled t :ensure nil)
(use-package ol
:config (require 'ol-notmuch)
@@ -375,9 +382,10 @@
(gnus . org-gnus-no-new-news)
(file . find-file)
(wl . wl-other-frame)))
+ :defer t
:ensure nil)
-(use-package ol-notmuch :ensure t)
+(use-package ol-notmuch :defer t :ensure t)
(use-package org
:bind (:map org-mode-map
@@ -409,6 +417,7 @@
'((awk .t ) (calc . t) (C . t) (emacs-lisp . t) (gnuplot . t) (js . t)
(latex . t) (makefile .t )(org . t) (python . t)
(shell . t) (sed .t) (sql . t) (sqlite . t)))
+ :defer t
:functions org-redisplay-inline-images
:hook ((org-mode . flyspell-mode)
(org-babel-after-execute . (lambda ()
@@ -417,6 +426,7 @@
:ensure nil)
(use-package org-agenda
+ :bind ("C-c a" . org-agenda)
:config (setq org-agenda-files '("~/org/dwrz.org"
"~/org/someday-maybe.org"
"~/projects/career/career.org"
@@ -470,6 +480,7 @@
:jump-to-captured t
:empty-lines-before 1
:empty-lines-after 1)))
+ :defer t
:ensure nil)
(use-package org-faces
@@ -492,6 +503,7 @@
(use-package org-src
:config (setq org-src-preserve-indentation t
org-src-tab-acts-natively t)
+ :defer t
:ensure nil)
(use-package osm :init (with-eval-after-load 'org (require 'osm-ol)) :ensure t)
@@ -513,7 +525,7 @@
(prog-mode . visual-line-mode))
:ensure nil)
-(use-package rainbow-mode :ensure t)
+(use-package rainbow-mode :defer t :ensure t)
(use-package recentf
:config (recentf-mode t)
@@ -544,9 +556,10 @@
mail-envelope-from 'header
mail-specify-envelope-from t
send-mail-function 'sendmail-send-it)
+ :defer t
:ensure nil)
-(use-package sh-script :config (setq sh-basic-offset 2) :ensure nil)
+(use-package sh-script :config (setq sh-basic-offset 2) :defer t :ensure nil)
(use-package simple
:config (setq async-shell-command-buffer "new-buffer"
@@ -558,7 +571,7 @@
(size-indication-mode t)
:ensure nil)
-(use-package sql-mode :hook (sql-mode . sqlind-minor-mode) :ensure nil)
+(use-package sql :hook (sql-mode . sqlind-minor-mode) :ensure nil)
;; TODO: see if this can be replaced with sql-linter-program.
(use-package sql-indent :config (setq sqlind-basic-offset 4) :ensure t)
@@ -584,7 +597,7 @@
(use-package time :init (setq display-time-mode nil) :ensure nil)
-(use-package toc-org :ensure t)
+(use-package toc-org :defer t :ensure t)
(use-package tool-bar :config (tool-bar-mode -1) :ensure nil)
@@ -611,7 +624,7 @@
:ensure nil)
;; Hydras
-;; TODO: add, clean.
+;; TODO: add, clean up.
(defhydra hydra-highlight (:color blue)
("q" nil "quit" :column "highlight")
("s" highlight-symbol-at-point "symbol" :color blue :column "do")
@@ -658,7 +671,6 @@
("w" hydra-windows/body "windows" :column "hydras"))
;; KEYBINDINGS
-(global-set-key (kbd "C-c a") 'org-agenda)
(global-set-key (kbd "C-c b") 'ibuffer)
(global-set-key (kbd "C-c c") 'dwrz-org-capture-at-point)
(global-set-key (kbd "C-c d") nil)