diff options
-rw-r--r-- | dotfiles/.emacs.d/init.el | 93 |
1 files changed, 43 insertions, 50 deletions
diff --git a/dotfiles/.emacs.d/init.el b/dotfiles/.emacs.d/init.el index e504d96..b9acce2 100644 --- a/dotfiles/.emacs.d/init.el +++ b/dotfiles/.emacs.d/init.el @@ -1,19 +1,7 @@ -;; Added by Package.el. This must come before configurations of -;; installed packages. Don't delete this line. If you don't want it, -;; just comment it out by adding a semicolon to the start of the line. -;; You may delete these explanatory comments. -(require 'package) -(add-to-list 'package-archives (cons "melpa-stable" "https://stable.melpa.org/packages/") t) -(package-initialize) - -;; Remove UI clutter. -(tool-bar-mode -1) -(menu-bar-mode -1) -(scroll-bar-mode -1) -(tooltip-mode -1) +(require 'better-defaults) + (set-fringe-mode 10) (setq inhibit-startup-message t) ; no splash screen - (setq visible-bell t) ;; Maximize frames @@ -34,16 +22,13 @@ (require 'use-package) -(add-to-list 'load-path - (home-file "/.guix-profile/share/emacs/site-lisp")) - ;;; ;;; Look and Feel ;;; ;; Use Inconsolata font. -(add-to-list 'default-frame-alist '(font . "Inconsolata-12")) +(add-to-list 'default-frame-alist '(font . "Inconsolata-14")) (use-package doom-themes :config @@ -60,6 +45,8 @@ :custom ((doom-modeline-irc t) (doom-modeline-irc-buffers t))) +(require 'doom-modeline) + (column-number-mode t) (which-function-mode t) (add-hook 'prog-mode-hook (lambda () (display-line-numbers-mode t))) @@ -74,7 +61,12 @@ ;;; Dired ;;; -(use-package dired-x) +;; Don't create buffer litter when moving through directories with +;; dired. +(setq dired-kill-when-opening-new-dired-buffer t) + +;; Revert dired buffer after a copy, rename, etc. +(setq dired-do-revert-buffer t) ;;; @@ -107,33 +99,26 @@ ;;; -;;; Minibuffer and completion +;;; Searching ;;; -(use-package swiper - :bind (("C-s" . swiper) - ("C-r" . swiper-backward))) +;; Highlight the current "error" (or rgrep search result, etc. it's a +;; bad name.) +(setq next-error-message-highlight t) -(use-package ivy - :config (ivy-mode t) - :custom ((ivy-initial-inputs-alist nil))) + +;;; +;;; Minibuffer and completion +;;; -(use-package ivy-rich - :init (ivy-rich-mode 1)) +(use-package smex) -(use-package counsel - :bind (("M-x" . counsel-M-x) - ("C-x b" . counsel-switch-buffer) - ("C-x C-f" . counsel-find-file) - ("C-h f" . counsel-describe-function) - ("C-h v" . counsel-describe-variable) - :map minibuffer-local-map - ("C-r" . counsel-minibuffer-history))) +;; Present more information when looking at completions via the +;; describe-* family of commands. +(setq completions-detailed t) -(use-package helpful - :bind (("C-h k" . helpful-key)) - :custom ((counsel-describe-function-function 'helpful-callable) - (counsel-describe-variable-function 'helpful-variable))) +;; Prompt for y/n instead of yes/no. +(setq user-short-answers t) ;;; @@ -171,6 +156,9 @@ might be bad." (setq view-read-only t) +;; Attempt to make buffers with long lines not slow Emacs to a crawl. +(global-so-long-mode) + ;;; ;;; Tabs and Newlines @@ -205,13 +193,14 @@ might be bad." ;;; Project Management ;;; -(use-package projectile - :init (projectile-mode 1) - :bind-keymap (("C-c p" . projectile-command-map)) - :custom ((projectile-completion-system 'ivy))) + +;;; +;;; Compilation +;;; + +(require 'ansi-color) -(use-package neotree - :bind (("C-c n" . neotree))) +(add-hook 'compilation-filter-hook #'ansi-color-compilation-filter) ;;; @@ -363,6 +352,7 @@ indentation." ;;; (use-package ox-beamer) +(use-package cl-lib) (defun org-sort-by-priority-and-todo () "Sort org entries first by priority, and then by TODO status." @@ -395,6 +385,7 @@ indentation." (use-package erc :init + (require 'erc-join) (erc-autojoin-mode t) (erc-track-mode t) :custom ((erc-interpret-mirc-color t) @@ -403,7 +394,7 @@ indentation." (erc-kill-server-buffer-on-quit t) (erc-server-coding-system '(utf-8 . utf-8)) (erc-autojoin-channels-alist - '(("freenode.net" "#gnuassembly" "#guile" "#guix" "#lispgames"))) + '(("libera.chat" "#gnuassembly" "#guile" "#guix" "#lispgames" "#chickadee"))) ;; Don't open channel buffers in place of the current ;; buffer because that drives me fucking crazy. (erc-join-buffer 'bury) @@ -420,15 +411,15 @@ indentation." (use-package erc-notify) (use-package erc-autoaway) (use-package erc-services) -(use-package tls) +(use-package gnutls) ;; Start and stop erc (defun start-irc () "Connect to IRC." (interactive) - (erc-tls :server "irc.freenode.net" + (erc-tls :server "irc.libera.chat" :port 6697 - :nick "davexunit" + :nick "dthompson" :password (read-passwd "Password: "))) (defun stop-irc () @@ -455,6 +446,8 @@ indentation." (global-set-key (kbd "M-%") 'query-replace-regexp) ;; No more minimizing Emacs by accident. (global-unset-key (kbd "C-z")) +;; No more closing Emacs by accident. +(global-unset-key (kbd "C-x C-c")) ;; Enable some disabled-by-default functions. (put 'upcase-region 'disabled nil) (put 'downcase-region 'disabled nil) |