| author | Luke Hoersten <luke@hoersten.org> | 
| Thu, 02 Oct 2025 10:12:51 -0500 | |
| changeset 106 | 21828209cc73 | 
| parent 105 | e45e60614994 | 
| child 107 | 79cddb8296e6 | 
| permissions | -rw-r--r-- | 
| 103 | 1 | ;;; init --- Summary: Luke Hoersten <[email protected]> personal init file | 
| 2 | ||
| 3 | ;;; Commentary: | |
| 4 | ;;; ~/.emacs.d/init.el (~/.emacs) | |
| 0 | 5 | |
| 100 | 6 | ;;; Code: | 
| 75 | 7 | (add-to-list 'load-path "~/.emacs.d/elisp") ; set default emacs load path | 
| 0 | 8 | |
| 21 | 9 | (setq-default | 
| 82 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 10 | gc-cons-threshold 20000000 ; gc every 20 MB allocated (form flx-ido docs) | 
| 75 | 11 | inhibit-splash-screen t ; disable splash screen | 
| 12 | truncate-lines t ; truncate, not wrap, lines | |
| 13 | indent-tabs-mode nil ; only uses spaces for indentation | |
| 14 | split-width-threshold 181 ; min width to split window horizontially | |
| 15 | split-height-threshold 120 ; min width to split window vertically | |
| 16 | reb-re-syntax 'string ; use string syntax for regexp builder | |
| 99 
c50532aea1f3
Added haskell compile command.
 Luke Hoersten <luke@hoersten.org> parents: 
98diff
changeset | 17 | fill-column 120 ; line width | 
| 75 | 18 | require-final-newline 'visit-save) ; add a newline automatically | 
| 0 | 19 | |
| 75 | 20 | (put 'set-goal-column 'disabled nil) ; enable goal column setting | 
| 21 | (put 'narrow-to-region 'disabled nil) ; enable hiding | |
| 21 | 22 | (put 'narrow-to-page 'disabled nil) | 
| 23 | ||
| 85 
0b91f7fe5a89
Reorganized global modes a bit. Fixed multi-frame font changes.
 Luke Hoersten <luke@hoersten.org> parents: 
84diff
changeset | 24 | (fset 'yes-or-no-p 'y-or-n-p) ; replace yes/no prompts with y/n | 
| 
0b91f7fe5a89
Reorganized global modes a bit. Fixed multi-frame font changes.
 Luke Hoersten <luke@hoersten.org> parents: 
84diff
changeset | 25 | (windmove-default-keybindings) ; move between windows with shift-arrow | 
| 
0b91f7fe5a89
Reorganized global modes a bit. Fixed multi-frame font changes.
 Luke Hoersten <luke@hoersten.org> parents: 
84diff
changeset | 26 | |
| 75 | 27 | (column-number-mode t) ; show column numbers | 
| 28 | (delete-selection-mode t) ; replace highlighted text | |
| 85 
0b91f7fe5a89
Reorganized global modes a bit. Fixed multi-frame font changes.
 Luke Hoersten <luke@hoersten.org> parents: 
84diff
changeset | 29 | (which-function-mode t) ; function name at point in mode line | 
| 
0b91f7fe5a89
Reorganized global modes a bit. Fixed multi-frame font changes.
 Luke Hoersten <luke@hoersten.org> parents: 
84diff
changeset | 30 | (transient-mark-mode t) ; highlight selection between point and mark | 
| 
0b91f7fe5a89
Reorganized global modes a bit. Fixed multi-frame font changes.
 Luke Hoersten <luke@hoersten.org> parents: 
84diff
changeset | 31 | (electric-pair-mode t) ; automatically close opening characters | 
| 75 | 32 | (global-font-lock-mode t) ; syntax highlighting | 
| 85 
0b91f7fe5a89
Reorganized global modes a bit. Fixed multi-frame font changes.
 Luke Hoersten <luke@hoersten.org> parents: 
84diff
changeset | 33 | (global-subword-mode t) ; move by camelCase words | 
| 
0b91f7fe5a89
Reorganized global modes a bit. Fixed multi-frame font changes.
 Luke Hoersten <luke@hoersten.org> parents: 
84diff
changeset | 34 | (global-hl-line-mode t) ; highlight current line | 
| 75 | 35 | (global-set-key (kbd "C-c c") 'compile) ; compile | 
| 36 | (global-set-key (kbd "C-c r") 'recompile) ; recompile | |
| 37 | (global-set-key (kbd "C-c a") 'align-regexp) ; align | |
| 105 
e45e60614994
Moved from ido and smex to vertico, orderless, consult, marginalia for auto complete.
 Luke Hoersten <luke@hoersten.org> parents: 
104diff
changeset | 38 | (global-set-key (kbd "C-c g") 'consult-ripgrep) ; ripgrep with preview | 
| 45 
12715da9a300
Changes to reflect Ubuntu 11.10 upgrade.
 Luke Hoersten <Luke@Hoersten.org> parents: 
44diff
changeset | 39 | |
| 0 | 40 | |
| 86 | 41 | ;;; ediff | 
| 42 | (setq-default | |
| 43 | ediff-split-window-function 'split-window-horizontally | |
| 44 | ediff-window-setup-function 'ediff-setup-windows-plain) | |
| 45 | ||
| 46 | ||
| 32 
68b57950fa11
Fixed font problem and removed os-specific config files.
 Luke Hoersten <Luke@Hoersten.org> parents: 
31diff
changeset | 47 | ;;; Darwin | 
| 59 
f346d7591eac
Removed more unused init code.
 Luke Hoersten <Luke@Hoersten.org> parents: 
58diff
changeset | 48 | (setq is-mac (equal system-type 'darwin)) | 
| 
f346d7591eac
Removed more unused init code.
 Luke Hoersten <Luke@Hoersten.org> parents: 
58diff
changeset | 49 | (when is-mac | 
| 
f346d7591eac
Removed more unused init code.
 Luke Hoersten <Luke@Hoersten.org> parents: 
58diff
changeset | 50 | (setq-default | 
| 66 
b6182e0be08d
Removed bell and added menu bar on OS X.
 Luke Hoersten <Luke@Hoersten.org> parents: 
65diff
changeset | 51 | ring-bell-function 'ignore | 
| 59 
f346d7591eac
Removed more unused init code.
 Luke Hoersten <Luke@Hoersten.org> parents: 
58diff
changeset | 52 | mac-command-modifier 'meta | 
| 
f346d7591eac
Removed more unused init code.
 Luke Hoersten <Luke@Hoersten.org> parents: 
58diff
changeset | 53 | ns-pop-up-frames nil | 
| 
f346d7591eac
Removed more unused init code.
 Luke Hoersten <Luke@Hoersten.org> parents: 
58diff
changeset | 54 | ispell-program-name "/usr/local/bin/aspell")) | 
| 32 
68b57950fa11
Fixed font problem and removed os-specific config files.
 Luke Hoersten <Luke@Hoersten.org> parents: 
31diff
changeset | 55 | |
| 78 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 56 | |
| 32 
68b57950fa11
Fixed font problem and removed os-specific config files.
 Luke Hoersten <Luke@Hoersten.org> parents: 
31diff
changeset | 57 | ;;; Xorg | 
| 59 
f346d7591eac
Removed more unused init code.
 Luke Hoersten <Luke@Hoersten.org> parents: 
58diff
changeset | 58 | (when window-system | 
| 75 | 59 | (tool-bar-mode -1) ; remove tool bar | 
| 60 | (scroll-bar-mode -1) ; remove scroll bar | |
| 61 | (unless is-mac (menu-bar-mode -1)) ; remove menu bar | |
| 97 
f7640b0bab67
Removed marmalade and rainbow-mode. Added ag package. Defaulted to Inconsolata on all OSs.
 Luke Hoersten <luke@hoersten.org> parents: 
96diff
changeset | 62 | (set-frame-font "Inconsolata-12" nil t)) | 
| 31 
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
 Luke Hoersten <Luke@Hoersten.org> parents: 
30diff
changeset | 63 | |
| 78 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 64 | |
| 82 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 65 | ;;;; Packages ;;;; | 
| 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 66 | (require 'package-require) | 
| 105 
e45e60614994
Moved from ido and smex to vertico, orderless, consult, marginalia for auto complete.
 Luke Hoersten <luke@hoersten.org> parents: 
104diff
changeset | 67 | (package-require '(rg company exec-path-from-shell expand-region vertico | 
| 
e45e60614994
Moved from ido and smex to vertico, orderless, consult, marginalia for auto complete.
 Luke Hoersten <luke@hoersten.org> parents: 
104diff
changeset | 68 | orderless consult marginalia magit markdown-mode hgignore-mode move-text paredit | 
| 97 
f7640b0bab67
Removed marmalade and rainbow-mode. Added ag package. Defaulted to Inconsolata on all OSs.
 Luke Hoersten <luke@hoersten.org> parents: 
96diff
changeset | 69 | rainbow-delimiters json-mode json-reformat flycheck | 
| 82 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 70 | solarized-theme terraform-mode visual-regexp yasnippet yaml-mode | 
| 106 
21828209cc73
Moved from zencoding for html to emmet:
 Luke Hoersten <luke@hoersten.org> parents: 
105diff
changeset | 71 | emmet-mode)) | 
| 82 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 72 | |
| 104 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 73 | ;; (custom-set-variables | 
| 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 74 | ;;  '(package-selected-packages | 
| 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 75 | ;;    '(magit magit-ido ansible-doc company-ansible jinja2-mode ac-js2 auto-complete zencoding-mode | 
| 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 76 | ;;            yasnippet yaml-mode visual-regexp terraform-mode solarized-theme smex rg rainbow-delimiters | 
| 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 77 | ;;            paredit move-text markdown-mode json-reformat json-mode hgignore-mode haskell-mode flycheck flx-ido expand-region exec-path-from-shell company))) | 
| 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 78 | |
| 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 79 | |
| 82 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 80 | |
| 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 81 | ;;; custom requires | 
| 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 82 | (require 'javascript-init) | 
| 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 83 | (require 'c-init) | 
| 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 84 | (require 'ansible-init) | 
| 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 85 | |
| 31 
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
 Luke Hoersten <Luke@Hoersten.org> parents: 
30diff
changeset | 86 | |
| 
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
 Luke Hoersten <Luke@Hoersten.org> parents: 
30diff
changeset | 87 | ;;; text-mode | 
| 75 | 88 | (add-hook 'fundamental-mode-hook 'flyspell-mode) ; spellcheck text | 
| 89 | (add-hook 'fundamental-mode-hook 'turn-on-auto-fill) ; autofill text | |
| 28 
8f4bd2f2cc06
Aquamacs comes with more features so I removed some mac stuff.
 Luke Hoersten <Luke@Hoersten.org> parents: 
26diff
changeset | 90 | |
| 78 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 91 | |
| 31 
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
 Luke Hoersten <Luke@Hoersten.org> parents: 
30diff
changeset | 92 | ;;; whitespace-mode | 
| 75 | 93 | (global-whitespace-mode t) ; show whitespace | 
| 94 | (add-hook 'before-save-hook 'whitespace-cleanup) ; cleanup whitespace on exit | |
| 31 
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
 Luke Hoersten <Luke@Hoersten.org> parents: 
30diff
changeset | 95 | (setq-default | 
| 75 | 96 | whitespace-line-column 120 ; column width | 
| 97 | whitespace-style ; whitespace to highlight | |
| 31 
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
 Luke Hoersten <Luke@Hoersten.org> parents: 
30diff
changeset | 98 | '(trailing lines-tail empty indentation | 
| 
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
 Luke Hoersten <Luke@Hoersten.org> parents: 
30diff
changeset | 99 | space-before-tab space-after-tab)) | 
| 21 | 100 | |
| 78 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 101 | |
| 31 
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
 Luke Hoersten <Luke@Hoersten.org> parents: 
30diff
changeset | 102 | ;;; org-mode | 
| 21 | 103 | (add-hook | 
| 104 | 'org-mode-hook | |
| 105 | (lambda () | |
| 106 | (local-set-key (kbd "M-p") 'org-move-item-up) | |
| 107 | (local-set-key (kbd "M-S-p") 'org-move-subtree-up) | |
| 108 | (local-set-key (kbd "M-n") 'org-move-item-down) | |
| 109 | (local-set-key (kbd "M-S-n") 'org-move-subtree-down))) | |
| 31 
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
 Luke Hoersten <Luke@Hoersten.org> parents: 
30diff
changeset | 110 | |
| 78 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 111 | |
| 32 
68b57950fa11
Fixed font problem and removed os-specific config files.
 Luke Hoersten <Luke@Hoersten.org> parents: 
31diff
changeset | 112 | ;;; ibuffer | 
| 75 | 113 | (global-set-key (kbd "C-x C-b") 'ibuffer) ; better buffer browser | 
| 87 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 114 | (require 'ibuffer) | 
| 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 115 | (require 'ibuf-ext) | 
| 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 116 | (defun ibuffer-generate-filter-groups-by-major-mode () | 
| 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 117 | (flet | 
| 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 118 | ((mode-group | 
| 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 119 | (mode) | 
| 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 120 | (let ((mode-title | 
| 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 121 | (capitalize (car (split-string (symbol-name mode) "-" t))))) | 
| 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 122 | (cons mode-title `((mode . ,mode))))) | 
| 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 123 | (buffer-modes | 
| 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 124 | () | 
| 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 125 | (flet ((buffer-mode (buffer) (buffer-local-value 'major-mode buffer))) | 
| 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 126 | (ibuffer-remove-duplicates (remq nil (mapcar 'buffer-mode (buffer-list))))))) | 
| 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 127 | (mapcar 'mode-group (buffer-modes)))) | 
| 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 128 | |
| 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 129 | (defun ibuffer-major-mode-group-hook () | 
| 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 130 | (interactive) | 
| 104 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 131 | (setq-default ibuffer-filter-groups (ibuffer-generate-filter-groups-by-major-mode)) | 
| 87 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 132 | (ibuffer-update nil t) | 
| 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 133 | (message "ibuffer-major-mode: groups set")) | 
| 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 134 | |
| 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 135 | (setq-default ibuffer-show-empty-filter-groups nil) | 
| 
5e8b9d224e3e
Created dynamic major mode grouping for ibuffer.
 Luke Hoersten <luke@hoersten.org> parents: 
85diff
changeset | 136 | (add-hook 'ibuffer-hook (lambda () (ibuffer-major-mode-group-hook))) | 
| 73 
8167de2d2daa
Lots of random changes. Stopped using Chris Done's haskell-flycheck.
 Luke Hoersten <Luke@Hoersten.org> parents: 
72diff
changeset | 137 | |
| 78 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 138 | |
| 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 139 | ;;; shell | 
| 75 | 140 | (global-set-key (kbd "C-c s") 'eshell) ; start shell | 
| 77 | 141 | (exec-path-from-shell-copy-env "PYTHONPATH") | 
| 73 
8167de2d2daa
Lots of random changes. Stopped using Chris Done's haskell-flycheck.
 Luke Hoersten <Luke@Hoersten.org> parents: 
72diff
changeset | 142 | (exec-path-from-shell-initialize) | 
| 
8167de2d2daa
Lots of random changes. Stopped using Chris Done's haskell-flycheck.
 Luke Hoersten <Luke@Hoersten.org> parents: 
72diff
changeset | 143 | (eshell) | 
| 104 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 144 | (setq-default tramp-default-method "ssh") | 
| 100 | 145 | (add-hook 'eshell-mode-hook | 
| 146 | (lambda () | |
| 147 | (setenv "TERM" "emacs") | |
| 148 | (setenv "PAGER" "cat"))) | |
| 58 
c25a7ccd237a
Stabalized new packages and modes.
 Luke Hoersten <Luke@Hoersten.org> parents: 
57diff
changeset | 149 | |
| 105 
e45e60614994
Moved from ido and smex to vertico, orderless, consult, marginalia for auto complete.
 Luke Hoersten <luke@hoersten.org> parents: 
104diff
changeset | 150 | ;;; vertico / orderless / consult / marginalia | 
| 
e45e60614994
Moved from ido and smex to vertico, orderless, consult, marginalia for auto complete.
 Luke Hoersten <luke@hoersten.org> parents: 
104diff
changeset | 151 | (vertico-mode t) ; vertical completion UI | 
| 
e45e60614994
Moved from ido and smex to vertico, orderless, consult, marginalia for auto complete.
 Luke Hoersten <luke@hoersten.org> parents: 
104diff
changeset | 152 | (marginalia-mode t) ; annotations in completion | 
| 82 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 153 | (setq-default | 
| 105 
e45e60614994
Moved from ido and smex to vertico, orderless, consult, marginalia for auto complete.
 Luke Hoersten <luke@hoersten.org> parents: 
104diff
changeset | 154 | completion-styles '(orderless basic) ; orderless completion style | 
| 
e45e60614994
Moved from ido and smex to vertico, orderless, consult, marginalia for auto complete.
 Luke Hoersten <luke@hoersten.org> parents: 
104diff
changeset | 155 | completion-category-defaults nil | 
| 
e45e60614994
Moved from ido and smex to vertico, orderless, consult, marginalia for auto complete.
 Luke Hoersten <luke@hoersten.org> parents: 
104diff
changeset | 156 | completion-category-overrides '((file (styles partial-completion)))) | 
| 76 
af643427e1be
Added ido-at-point completion.
 Luke Hoersten <Luke@Hoersten.org> parents: 
75diff
changeset | 157 | (global-set-key (kbd "M-/") 'completion-at-point) | 
| 105 
e45e60614994
Moved from ido and smex to vertico, orderless, consult, marginalia for auto complete.
 Luke Hoersten <luke@hoersten.org> parents: 
104diff
changeset | 158 | (global-set-key (kbd "C-x b") 'consult-buffer) ; enhanced buffer switching | 
| 
e45e60614994
Moved from ido and smex to vertico, orderless, consult, marginalia for auto complete.
 Luke Hoersten <luke@hoersten.org> parents: 
104diff
changeset | 159 | (global-set-key (kbd "C-x 4 b") 'consult-buffer-other-window) | 
| 
e45e60614994
Moved from ido and smex to vertico, orderless, consult, marginalia for auto complete.
 Luke Hoersten <luke@hoersten.org> parents: 
104diff
changeset | 160 | (global-set-key (kbd "C-x 5 b") 'consult-buffer-other-frame) | 
| 
e45e60614994
Moved from ido and smex to vertico, orderless, consult, marginalia for auto complete.
 Luke Hoersten <luke@hoersten.org> parents: 
104diff
changeset | 161 | (global-set-key (kbd "M-y") 'consult-yank-pop) ; enhanced yank-pop | 
| 76 
af643427e1be
Added ido-at-point completion.
 Luke Hoersten <Luke@Hoersten.org> parents: 
75diff
changeset | 162 | |
| 78 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 163 | |
| 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 164 | ;;; emacs-lisp-mode | 
| 85 
0b91f7fe5a89
Reorganized global modes a bit. Fixed multi-frame font changes.
 Luke Hoersten <luke@hoersten.org> parents: 
84diff
changeset | 165 | (add-hook 'emacs-lisp-mode-hook 'enable-paredit-mode) | 
| 77 | 166 | |
| 167 | ||
| 168 | ;;; company-mode | |
| 85 
0b91f7fe5a89
Reorganized global modes a bit. Fixed multi-frame font changes.
 Luke Hoersten <luke@hoersten.org> parents: 
84diff
changeset | 169 | (global-company-mode t) | 
| 77 | 170 | (global-set-key (kbd "M-/") 'company-complete) | 
| 78 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 171 | (setq-default | 
| 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 172 | company-idle-delay nil | 
| 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 173 | company-minimum-prefix-length 2 | 
| 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 174 | company-selection-wrap-around t | 
| 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 175 | company-show-numbers t | 
| 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 176 | company-tooltip-align-annotations t) | 
| 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 177 | |
| 59 
f346d7591eac
Removed more unused init code.
 Luke Hoersten <Luke@Hoersten.org> parents: 
58diff
changeset | 178 | |
| 85 
0b91f7fe5a89
Reorganized global modes a bit. Fixed multi-frame font changes.
 Luke Hoersten <luke@hoersten.org> parents: 
84diff
changeset | 179 | ;;; flycheck-mode | 
| 
0b91f7fe5a89
Reorganized global modes a bit. Fixed multi-frame font changes.
 Luke Hoersten <luke@hoersten.org> parents: 
84diff
changeset | 180 | (global-flycheck-mode t) | 
| 
0b91f7fe5a89
Reorganized global modes a bit. Fixed multi-frame font changes.
 Luke Hoersten <luke@hoersten.org> parents: 
84diff
changeset | 181 | |
| 
0b91f7fe5a89
Reorganized global modes a bit. Fixed multi-frame font changes.
 Luke Hoersten <luke@hoersten.org> parents: 
84diff
changeset | 182 | |
| 55 
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
 Luke Hoersten <Luke@Hoersten.org> parents: 
54diff
changeset | 183 | ;;; uniquify | 
| 75 | 184 | (require 'uniquify) ; unique buffer names with dirs | 
| 104 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 185 | (setq-default | 
| 55 
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
 Luke Hoersten <Luke@Hoersten.org> parents: 
54diff
changeset | 186 | uniquify-buffer-name-style 'post-forward | 
| 
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
 Luke Hoersten <Luke@Hoersten.org> parents: 
54diff
changeset | 187 | uniquify-separator ":") | 
| 
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
 Luke Hoersten <Luke@Hoersten.org> parents: 
54diff
changeset | 188 | |
| 78 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 189 | |
| 55 
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
 Luke Hoersten <Luke@Hoersten.org> parents: 
54diff
changeset | 190 | ;;; color-theme | 
| 104 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 191 | (setq custom-safe-themes t) | 
| 85 
0b91f7fe5a89
Reorganized global modes a bit. Fixed multi-frame font changes.
 Luke Hoersten <luke@hoersten.org> parents: 
84diff
changeset | 192 | (when window-system (load-theme 'solarized-light)) | 
| 42 | 193 | |
| 78 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 194 | |
| 82 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 195 | ;;; show-paren-mode - needs to be loaded after theme | 
| 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 196 | (setq-default | 
| 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 197 | show-paren-style 'expression | 
| 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 198 | show-paren-delay 0) | 
| 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 199 | (set-face-attribute | 
| 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 200 | 'show-paren-match nil | 
| 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 201 | :background (face-background 'highlight) | 
| 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 202 | :foreground (face-foreground 'highlight)) | 
| 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 203 | (show-paren-mode t) | 
| 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 204 | |
| 
12cf67bc486c
Added paredit, flx-ido and projectile.
 Luke Hoersten <luke@hoersten.org> parents: 
78diff
changeset | 205 | |
| 31 
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
 Luke Hoersten <Luke@Hoersten.org> parents: 
30diff
changeset | 206 | ;;; yasnippets | 
| 94 | 207 | (with-eval-after-load 'yasnippet | 
| 208 | (setq yas-snippet-dirs (remq 'yas-installed-snippets-dir yas-snippet-dirs))) | |
| 209 | (setq-default yas-prompt-functions '(yas-ido-prompt yas-dropdown-prompt)) ; use ido for multiple snippets | |
| 210 | (yas-global-mode t) | |
| 31 
27930e0310d6
Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
 Luke Hoersten <Luke@Hoersten.org> parents: 
30diff
changeset | 211 | |
| 71 
b5976ed7311a
Big updates to haskell-mode stuff.
 Luke Hoersten <Luke@Hoersten.org> parents: 
70diff
changeset | 212 | |
| 
b5976ed7311a
Big updates to haskell-mode stuff.
 Luke Hoersten <Luke@Hoersten.org> parents: 
70diff
changeset | 213 | ;;; markdown-mode | 
| 
b5976ed7311a
Big updates to haskell-mode stuff.
 Luke Hoersten <Luke@Hoersten.org> parents: 
70diff
changeset | 214 | (add-hook 'markdown-mode-hook 'flyspell-mode) | 
| 101 | 215 | (setq-default markdown-command "pandoc -f gfm") | 
| 71 
b5976ed7311a
Big updates to haskell-mode stuff.
 Luke Hoersten <Luke@Hoersten.org> parents: 
70diff
changeset | 216 | |
| 55 
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
 Luke Hoersten <Luke@Hoersten.org> parents: 
54diff
changeset | 217 | |
| 58 
c25a7ccd237a
Stabalized new packages and modes.
 Luke Hoersten <Luke@Hoersten.org> parents: 
57diff
changeset | 218 | ;;; html-mode | 
| 53 | 219 | (add-to-list 'auto-mode-alist '("\\.tpl\\'" . html-mode)) | 
| 106 
21828209cc73
Moved from zencoding for html to emmet:
 Luke Hoersten <luke@hoersten.org> parents: 
105diff
changeset | 220 | (add-hook 'html-mode-hook 'emmet-mode) | 
| 58 
c25a7ccd237a
Stabalized new packages and modes.
 Luke Hoersten <Luke@Hoersten.org> parents: 
57diff
changeset | 221 | |
| 78 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 222 | |
| 85 
0b91f7fe5a89
Reorganized global modes a bit. Fixed multi-frame font changes.
 Luke Hoersten <luke@hoersten.org> parents: 
84diff
changeset | 223 | ;;; color-modes map | 
| 37 
3c51085957be
Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
 Luke Hoersten <Luke@Hoersten.org> parents: 
36diff
changeset | 224 | (mapc | 
| 59 
f346d7591eac
Removed more unused init code.
 Luke Hoersten <Luke@Hoersten.org> parents: 
58diff
changeset | 225 | (lambda (x) | 
| 60 
8beb028f936c
Fixed a bug with the haskell-mode-hook
 Luke Hoersten <Luke@Hoersten.org> parents: 
59diff
changeset | 226 | (add-hook x | 
| 65 | 227 | (lambda () | 
| 104 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 228 | (display-line-numbers-mode t) | 
| 73 
8167de2d2daa
Lots of random changes. Stopped using Chris Done's haskell-flycheck.
 Luke Hoersten <Luke@Hoersten.org> parents: 
72diff
changeset | 229 | (rainbow-delimiters-mode t)))) | 
| 37 
3c51085957be
Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
 Luke Hoersten <Luke@Hoersten.org> parents: 
36diff
changeset | 230 | '(text-mode-hook | 
| 
3c51085957be
Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
 Luke Hoersten <Luke@Hoersten.org> parents: 
36diff
changeset | 231 | c-mode-common-hook | 
| 
3c51085957be
Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
 Luke Hoersten <Luke@Hoersten.org> parents: 
36diff
changeset | 232 | python-mode-hook | 
| 
3c51085957be
Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
 Luke Hoersten <Luke@Hoersten.org> parents: 
36diff
changeset | 233 | haskell-mode-hook | 
| 58 
c25a7ccd237a
Stabalized new packages and modes.
 Luke Hoersten <Luke@Hoersten.org> parents: 
57diff
changeset | 234 | js2-mode-hook | 
| 
c25a7ccd237a
Stabalized new packages and modes.
 Luke Hoersten <Luke@Hoersten.org> parents: 
57diff
changeset | 235 | html-mode-hook | 
| 
c25a7ccd237a
Stabalized new packages and modes.
 Luke Hoersten <Luke@Hoersten.org> parents: 
57diff
changeset | 236 | css-mode-hook | 
| 86 | 237 | sass-mode-hook | 
| 50 | 238 | clojure-mode-hook | 
| 77 | 239 | emacs-lisp-mode-hook | 
| 240 | conf-mode-hook | |
| 100 | 241 | yaml-mode-hook | 
| 242 | sql-mode-hook)) | |
| 55 
d4adcd3d5ef9
Updated to emacs24 with package management and load-theme
 Luke Hoersten <Luke@Hoersten.org> parents: 
54diff
changeset | 243 | |
| 78 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 244 | |
| 71 
b5976ed7311a
Big updates to haskell-mode stuff.
 Luke Hoersten <Luke@Hoersten.org> parents: 
70diff
changeset | 245 | ;;; expand-region | 
| 72 | 246 | (global-set-key (kbd "C-=") 'er/expand-region) | 
| 69 
b3baf25406f8
Messing with new haskell mode.
 Luke Hoersten <Luke@Hoersten.org> parents: 
68diff
changeset | 247 | |
| 78 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 248 | |
| 71 
b5976ed7311a
Big updates to haskell-mode stuff.
 Luke Hoersten <Luke@Hoersten.org> parents: 
70diff
changeset | 249 | ;;; move-text | 
| 
b5976ed7311a
Big updates to haskell-mode stuff.
 Luke Hoersten <Luke@Hoersten.org> parents: 
70diff
changeset | 250 | (global-set-key (kbd "M-p") 'move-text-up) | 
| 
b5976ed7311a
Big updates to haskell-mode stuff.
 Luke Hoersten <Luke@Hoersten.org> parents: 
70diff
changeset | 251 | (global-set-key (kbd "M-n") 'move-text-down) | 
| 59 
f346d7591eac
Removed more unused init code.
 Luke Hoersten <Luke@Hoersten.org> parents: 
58diff
changeset | 252 | |
| 78 
7d7662fcc8d1
Started using shm and paredit.
 Luke Hoersten <Luke@Hoersten.org> parents: 
77diff
changeset | 253 | |
| 59 
f346d7591eac
Removed more unused init code.
 Luke Hoersten <Luke@Hoersten.org> parents: 
58diff
changeset | 254 | ;;; visual-regexp | 
| 
f346d7591eac
Removed more unused init code.
 Luke Hoersten <Luke@Hoersten.org> parents: 
58diff
changeset | 255 | (global-set-key (kbd "C-M-%") 'vr/query-replace) | 
| 
f346d7591eac
Removed more unused init code.
 Luke Hoersten <Luke@Hoersten.org> parents: 
58diff
changeset | 256 | (global-set-key (kbd "M-%") 'vr/replace) | 
| 103 | 257 | |
| 258 | (provide 'init) | |
| 259 | ;;; init.el ends here | |
| 104 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 260 | (custom-set-variables | 
| 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 261 | ;; custom-set-variables was added by Custom. | 
| 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 262 | ;; If you edit it by hand, you could mess it up, so be careful. | 
| 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 263 | ;; Your init file should contain only one such instance. | 
| 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 264 | ;; If there is more than one, they won't work right. | 
| 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 265 | '(package-selected-packages | 
| 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 266 | '(magit-ido magit zencoding-mode yasnippet yaml-mode visual-regexp terraform-mode solarized-theme smex rg rainbow-delimiters paredit move-text markdown-mode json-reformat json-mode jinja2-mode hgignore-mode haskell-mode flycheck flx-ido expand-region exec-path-from-shell company-ansible auto-complete ansible-doc ac-js2))) | 
| 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 267 | (custom-set-faces | 
| 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 268 | ;; custom-set-faces was added by Custom. | 
| 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 269 | ;; If you edit it by hand, you could mess it up, so be careful. | 
| 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 270 | ;; Your init file should contain only one such instance. | 
| 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 271 | ;; If there is more than one, they won't work right. | 
| 
2b7a3925317e
Fixed some code rot issues.
 Luke Hoersten <luke@hoersten.org> parents: 
103diff
changeset | 272 | ) |