init.el
author Luke Hoersten <luke@hoersten.org>
Thu, 02 Oct 2025 10:54:52 -0500
changeset 112 c4c346aa93ab
parent 111 025f0680d73a
child 113 79c72453f70d
permissions -rw-r--r--
Replaced flyspell mode with jinx. Changes: - Added jinx package - Replaced flyspell-mode with jinx-mode in text-mode and markdown-mode - Added enchant detection that shows a helpful warning in Warnings buffer if enchant is not installed, with OS-specific install instructions If enchant isn't installed when you start Emacs, you'll see a warning popup with instructions for your OS (brew for macOS, apt for Ubuntu).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
103
f76683958fb4 Replaced ag with rg.
Luke Hoersten <luke@hoersten.org>
parents: 102
diff changeset
     1
;;; init --- Summary: Luke Hoersten <[email protected]> personal init file
f76683958fb4 Replaced ag with rg.
Luke Hoersten <luke@hoersten.org>
parents: 102
diff changeset
     2
f76683958fb4 Replaced ag with rg.
Luke Hoersten <luke@hoersten.org>
parents: 102
diff changeset
     3
;;; Commentary:
f76683958fb4 Replaced ag with rg.
Luke Hoersten <luke@hoersten.org>
parents: 102
diff changeset
     4
;;; ~/.emacs.d/init.el (~/.emacs)
0
c25fee3c92e9 Initial commit.
Luke Hoersten <Luke@Hoersten.org>
parents:
diff changeset
     5
100
e1c2df47261d Fixed pager in eshell.
Luke Hoersten <luke@hoersten.org>
parents: 99
diff changeset
     6
;;; Code:
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
     7
(add-to-list 'load-path "~/.emacs.d/elisp")   ; set default emacs load path
0
c25fee3c92e9 Initial commit.
Luke Hoersten <Luke@Hoersten.org>
parents:
diff changeset
     8
110
7a84acce27ec Cleaned out some last remaining custome variable and ido stuff.
Luke Hoersten <luke@hoersten.org>
parents: 109
diff changeset
     9
(setq custom-file (concat user-emacs-directory "custom.el")) ; don't auto-edit init.el
7a84acce27ec Cleaned out some last remaining custome variable and ido stuff.
Luke Hoersten <luke@hoersten.org>
parents: 109
diff changeset
    10
21
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    11
(setq-default
110
7a84acce27ec Cleaned out some last remaining custome variable and ido stuff.
Luke Hoersten <luke@hoersten.org>
parents: 109
diff changeset
    12
 gc-cons-threshold 20000000                   ; gc every 20 MB allocated
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    13
 inhibit-splash-screen t                      ; disable splash screen
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    14
 truncate-lines t                             ; truncate, not wrap, lines
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    15
 indent-tabs-mode nil                         ; only uses spaces for indentation
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    16
 split-width-threshold 181                    ; min width to split window horizontially
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    17
 split-height-threshold 120                   ; min width to split window vertically
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    18
 reb-re-syntax 'string                        ; use string syntax for regexp builder
99
c50532aea1f3 Added haskell compile command.
Luke Hoersten <luke@hoersten.org>
parents: 98
diff changeset
    19
 fill-column 120                              ; line width
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    20
 require-final-newline 'visit-save)           ; add a newline automatically
0
c25fee3c92e9 Initial commit.
Luke Hoersten <Luke@Hoersten.org>
parents:
diff changeset
    21
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    22
(put 'set-goal-column 'disabled nil)          ; enable goal column setting
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    23
(put 'narrow-to-region 'disabled nil)         ; enable hiding
21
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    24
(put 'narrow-to-page 'disabled nil)
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
    25
85
0b91f7fe5a89 Reorganized global modes a bit. Fixed multi-frame font changes.
Luke Hoersten <luke@hoersten.org>
parents: 84
diff changeset
    26
(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: 84
diff changeset
    27
(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: 84
diff changeset
    28
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    29
(column-number-mode t)                        ; show column numbers
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    30
(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: 84
diff changeset
    31
(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: 84
diff changeset
    32
(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: 84
diff changeset
    33
(electric-pair-mode t)                        ; automatically close opening characters
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    34
(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: 84
diff changeset
    35
(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: 84
diff changeset
    36
(global-hl-line-mode t)                       ; highlight current line
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    37
(global-set-key (kbd "C-c c") 'compile)       ; compile
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    38
(global-set-key (kbd "C-c r") 'recompile)     ; recompile
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    39
(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: 104
diff changeset
    40
(global-set-key (kbd "C-c g") 'consult-ripgrep) ; ripgrep with preview
108
459d16e3e34e Added git stuff:
Luke Hoersten <luke@hoersten.org>
parents: 107
diff changeset
    41
(global-set-key (kbd "C-x g") 'magit-status)  ; magit status
45
12715da9a300 Changes to reflect Ubuntu 11.10 upgrade.
Luke Hoersten <Luke@Hoersten.org>
parents: 44
diff changeset
    42
0
c25fee3c92e9 Initial commit.
Luke Hoersten <Luke@Hoersten.org>
parents:
diff changeset
    43
86
22b2ad459bc1 Ediff better defaults.
Luke Hoersten <luke@hoersten.org>
parents: 85
diff changeset
    44
;;; ediff
22b2ad459bc1 Ediff better defaults.
Luke Hoersten <luke@hoersten.org>
parents: 85
diff changeset
    45
(setq-default
22b2ad459bc1 Ediff better defaults.
Luke Hoersten <luke@hoersten.org>
parents: 85
diff changeset
    46
  ediff-split-window-function 'split-window-horizontally
22b2ad459bc1 Ediff better defaults.
Luke Hoersten <luke@hoersten.org>
parents: 85
diff changeset
    47
  ediff-window-setup-function 'ediff-setup-windows-plain)
22b2ad459bc1 Ediff better defaults.
Luke Hoersten <luke@hoersten.org>
parents: 85
diff changeset
    48
22b2ad459bc1 Ediff better defaults.
Luke Hoersten <luke@hoersten.org>
parents: 85
diff changeset
    49
32
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    50
;;; Darwin
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    51
(setq is-mac (equal system-type 'darwin))
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    52
(when is-mac
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    53
  (setq-default
66
b6182e0be08d Removed bell and added menu bar on OS X.
Luke Hoersten <Luke@Hoersten.org>
parents: 65
diff changeset
    54
   ring-bell-function 'ignore
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    55
   mac-command-modifier 'meta
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    56
   ns-pop-up-frames nil
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    57
   ispell-program-name "/usr/local/bin/aspell"))
32
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    58
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
    59
32
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
    60
;;; Xorg
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
    61
(when window-system
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    62
  (tool-bar-mode -1)                          ; remove tool bar
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    63
  (scroll-bar-mode -1)                        ; remove scroll bar
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    64
  (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: 96
diff changeset
    65
  (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: 30
diff changeset
    66
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
    67
82
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    68
;;;; Packages ;;;;
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    69
(require 'package-require)
105
e45e60614994 Moved from ido and smex to vertico, orderless, consult, marginalia for auto complete.
Luke Hoersten <luke@hoersten.org>
parents: 104
diff changeset
    70
(package-require '(rg company exec-path-from-shell expand-region vertico
108
459d16e3e34e Added git stuff:
Luke Hoersten <luke@hoersten.org>
parents: 107
diff changeset
    71
 orderless consult marginalia magit forge magit-todos markdown-mode hgignore-mode move-text paredit
112
c4c346aa93ab Replaced flyspell mode with jinx.
Luke Hoersten <luke@hoersten.org>
parents: 111
diff changeset
    72
 rainbow-delimiters json-mode json-reformat flycheck treesit-auto ibuffer-project jinx
82
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    73
 solarized-theme terraform-mode visual-regexp yasnippet yaml-mode
106
21828209cc73 Moved from zencoding for html to emmet:
Luke Hoersten <luke@hoersten.org>
parents: 105
diff changeset
    74
 emmet-mode))
82
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    75
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    76
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    77
;;; custom requires
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    78
(require 'c-init)
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    79
(require 'ansible-init)
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
    80
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    81
112
c4c346aa93ab Replaced flyspell mode with jinx.
Luke Hoersten <luke@hoersten.org>
parents: 111
diff changeset
    82
;;; jinx spellcheck setup
c4c346aa93ab Replaced flyspell mode with jinx.
Luke Hoersten <luke@hoersten.org>
parents: 111
diff changeset
    83
(with-eval-after-load 'jinx
c4c346aa93ab Replaced flyspell mode with jinx.
Luke Hoersten <luke@hoersten.org>
parents: 111
diff changeset
    84
  (unless (executable-find "enchant-2")
c4c346aa93ab Replaced flyspell mode with jinx.
Luke Hoersten <luke@hoersten.org>
parents: 111
diff changeset
    85
    (display-warning
c4c346aa93ab Replaced flyspell mode with jinx.
Luke Hoersten <luke@hoersten.org>
parents: 111
diff changeset
    86
     'jinx
c4c346aa93ab Replaced flyspell mode with jinx.
Luke Hoersten <luke@hoersten.org>
parents: 111
diff changeset
    87
     (concat "Enchant library not found. Jinx spell-checking requires enchant.\n\n"
c4c346aa93ab Replaced flyspell mode with jinx.
Luke Hoersten <luke@hoersten.org>
parents: 111
diff changeset
    88
             "To install:\n"
c4c346aa93ab Replaced flyspell mode with jinx.
Luke Hoersten <luke@hoersten.org>
parents: 111
diff changeset
    89
             (if (eq system-type 'darwin)
c4c346aa93ab Replaced flyspell mode with jinx.
Luke Hoersten <luke@hoersten.org>
parents: 111
diff changeset
    90
                 "  macOS: brew install enchant\n"
c4c346aa93ab Replaced flyspell mode with jinx.
Luke Hoersten <luke@hoersten.org>
parents: 111
diff changeset
    91
               "  Ubuntu/Debian: sudo apt install libenchant-2-dev\n")
c4c346aa93ab Replaced flyspell mode with jinx.
Luke Hoersten <luke@hoersten.org>
parents: 111
diff changeset
    92
             "\nAfter installation, restart Emacs.")
c4c346aa93ab Replaced flyspell mode with jinx.
Luke Hoersten <luke@hoersten.org>
parents: 111
diff changeset
    93
     :warning)))
c4c346aa93ab Replaced flyspell mode with jinx.
Luke Hoersten <luke@hoersten.org>
parents: 111
diff changeset
    94
c4c346aa93ab Replaced flyspell mode with jinx.
Luke Hoersten <luke@hoersten.org>
parents: 111
diff changeset
    95
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
    96
;;; text-mode
112
c4c346aa93ab Replaced flyspell mode with jinx.
Luke Hoersten <luke@hoersten.org>
parents: 111
diff changeset
    97
(add-hook 'fundamental-mode-hook 'jinx-mode)          ; spellcheck text
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
    98
(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: 26
diff changeset
    99
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   100
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   101
;;; whitespace-mode
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
   102
(global-whitespace-mode t)                            ; show whitespace
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
   103
(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: 30
diff changeset
   104
(setq-default
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
   105
 whitespace-line-column 120                           ; column width
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
   106
 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: 30
diff changeset
   107
 '(trailing lines-tail empty indentation
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   108
            space-before-tab space-after-tab))
21
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   109
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   110
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   111
;;; org-mode
21
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   112
(add-hook
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   113
 'org-mode-hook
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   114
 (lambda ()
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   115
   (local-set-key (kbd "M-p") 'org-move-item-up)
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   116
   (local-set-key (kbd "M-S-p") 'org-move-subtree-up)
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   117
   (local-set-key (kbd "M-n") 'org-move-item-down)
a48713acd5c1 Rearrainged init.el
Luke Hoersten <Luke@Hoersten.org>
parents: 13
diff changeset
   118
   (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: 30
diff changeset
   119
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   120
32
68b57950fa11 Fixed font problem and removed os-specific config files.
Luke Hoersten <Luke@Hoersten.org>
parents: 31
diff changeset
   121
;;; ibuffer
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
   122
(global-set-key (kbd "C-x C-b") 'ibuffer)             ; better buffer browser
109
3718d6c24e45 Replace custom ibuffer code with ibuffer-project
Luke Hoersten <luke@hoersten.org>
parents: 108
diff changeset
   123
(add-hook 'ibuffer-hook
3718d6c24e45 Replace custom ibuffer code with ibuffer-project
Luke Hoersten <luke@hoersten.org>
parents: 108
diff changeset
   124
          (lambda ()
3718d6c24e45 Replace custom ibuffer code with ibuffer-project
Luke Hoersten <luke@hoersten.org>
parents: 108
diff changeset
   125
            (ibuffer-project-set-filter-groups)
3718d6c24e45 Replace custom ibuffer code with ibuffer-project
Luke Hoersten <luke@hoersten.org>
parents: 108
diff changeset
   126
            (unless (eq ibuffer-sorting-mode 'project-file-relative)
3718d6c24e45 Replace custom ibuffer code with ibuffer-project
Luke Hoersten <luke@hoersten.org>
parents: 108
diff changeset
   127
              (ibuffer-do-sort-by-project-file-relative))))
3718d6c24e45 Replace custom ibuffer code with ibuffer-project
Luke Hoersten <luke@hoersten.org>
parents: 108
diff changeset
   128
(setq ibuffer-show-empty-filter-groups nil)
73
8167de2d2daa Lots of random changes. Stopped using Chris Done's haskell-flycheck.
Luke Hoersten <Luke@Hoersten.org>
parents: 72
diff changeset
   129
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   130
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   131
;;; shell
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
   132
(global-set-key (kbd "C-c s") 'eshell)  ; start shell
77
c99c95938a05 Added ansible init.
Luke Hoersten <Luke@Hoersten.org>
parents: 76
diff changeset
   133
(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: 72
diff changeset
   134
(exec-path-from-shell-initialize)
8167de2d2daa Lots of random changes. Stopped using Chris Done's haskell-flycheck.
Luke Hoersten <Luke@Hoersten.org>
parents: 72
diff changeset
   135
(eshell)
104
2b7a3925317e Fixed some code rot issues.
Luke Hoersten <luke@hoersten.org>
parents: 103
diff changeset
   136
(setq-default tramp-default-method "ssh")
100
e1c2df47261d Fixed pager in eshell.
Luke Hoersten <luke@hoersten.org>
parents: 99
diff changeset
   137
(add-hook 'eshell-mode-hook
e1c2df47261d Fixed pager in eshell.
Luke Hoersten <luke@hoersten.org>
parents: 99
diff changeset
   138
          (lambda ()
e1c2df47261d Fixed pager in eshell.
Luke Hoersten <luke@hoersten.org>
parents: 99
diff changeset
   139
            (setenv "TERM" "emacs")
e1c2df47261d Fixed pager in eshell.
Luke Hoersten <luke@hoersten.org>
parents: 99
diff changeset
   140
            (setenv "PAGER" "cat")))
58
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   141
105
e45e60614994 Moved from ido and smex to vertico, orderless, consult, marginalia for auto complete.
Luke Hoersten <luke@hoersten.org>
parents: 104
diff changeset
   142
;;; vertico / orderless / consult / marginalia
e45e60614994 Moved from ido and smex to vertico, orderless, consult, marginalia for auto complete.
Luke Hoersten <luke@hoersten.org>
parents: 104
diff changeset
   143
(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: 104
diff changeset
   144
(marginalia-mode t)                                   ; annotations in completion
82
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   145
(setq-default
105
e45e60614994 Moved from ido and smex to vertico, orderless, consult, marginalia for auto complete.
Luke Hoersten <luke@hoersten.org>
parents: 104
diff changeset
   146
 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: 104
diff changeset
   147
 completion-category-defaults nil
e45e60614994 Moved from ido and smex to vertico, orderless, consult, marginalia for auto complete.
Luke Hoersten <luke@hoersten.org>
parents: 104
diff changeset
   148
 completion-category-overrides '((file (styles partial-completion))))
76
af643427e1be Added ido-at-point completion.
Luke Hoersten <Luke@Hoersten.org>
parents: 75
diff changeset
   149
(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: 104
diff changeset
   150
(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: 104
diff changeset
   151
(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: 104
diff changeset
   152
(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: 104
diff changeset
   153
(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: 75
diff changeset
   154
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   155
108
459d16e3e34e Added git stuff:
Luke Hoersten <luke@hoersten.org>
parents: 107
diff changeset
   156
;;; magit
111
025f0680d73a Minor cleanups.
Luke Hoersten <luke@hoersten.org>
parents: 110
diff changeset
   157
(with-eval-after-load 'magit-todos
025f0680d73a Minor cleanups.
Luke Hoersten <luke@hoersten.org>
parents: 110
diff changeset
   158
  (magit-todos-mode t))                                   ; show TODOs in magit status
108
459d16e3e34e Added git stuff:
Luke Hoersten <luke@hoersten.org>
parents: 107
diff changeset
   159
459d16e3e34e Added git stuff:
Luke Hoersten <luke@hoersten.org>
parents: 107
diff changeset
   160
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   161
;;; emacs-lisp-mode
85
0b91f7fe5a89 Reorganized global modes a bit. Fixed multi-frame font changes.
Luke Hoersten <luke@hoersten.org>
parents: 84
diff changeset
   162
(add-hook 'emacs-lisp-mode-hook 'enable-paredit-mode)
77
c99c95938a05 Added ansible init.
Luke Hoersten <Luke@Hoersten.org>
parents: 76
diff changeset
   163
c99c95938a05 Added ansible init.
Luke Hoersten <Luke@Hoersten.org>
parents: 76
diff changeset
   164
c99c95938a05 Added ansible init.
Luke Hoersten <Luke@Hoersten.org>
parents: 76
diff changeset
   165
;;; company-mode
85
0b91f7fe5a89 Reorganized global modes a bit. Fixed multi-frame font changes.
Luke Hoersten <luke@hoersten.org>
parents: 84
diff changeset
   166
(global-company-mode t)
77
c99c95938a05 Added ansible init.
Luke Hoersten <Luke@Hoersten.org>
parents: 76
diff changeset
   167
(global-set-key (kbd "M-/") 'company-complete)
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   168
(setq-default
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   169
 company-idle-delay nil
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   170
 company-minimum-prefix-length 2
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   171
 company-selection-wrap-around t
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   172
 company-show-numbers t
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   173
 company-tooltip-align-annotations t)
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   174
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   175
85
0b91f7fe5a89 Reorganized global modes a bit. Fixed multi-frame font changes.
Luke Hoersten <luke@hoersten.org>
parents: 84
diff changeset
   176
;;; flycheck-mode
0b91f7fe5a89 Reorganized global modes a bit. Fixed multi-frame font changes.
Luke Hoersten <luke@hoersten.org>
parents: 84
diff changeset
   177
(global-flycheck-mode t)
0b91f7fe5a89 Reorganized global modes a bit. Fixed multi-frame font changes.
Luke Hoersten <luke@hoersten.org>
parents: 84
diff changeset
   178
0b91f7fe5a89 Reorganized global modes a bit. Fixed multi-frame font changes.
Luke Hoersten <luke@hoersten.org>
parents: 84
diff changeset
   179
55
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   180
;;; uniquify
75
5f3bf3a9295b Cleaned up comments.
Luke Hoersten <Luke@Hoersten.org>
parents: 74
diff changeset
   181
(require 'uniquify)                     ; unique buffer names with dirs
104
2b7a3925317e Fixed some code rot issues.
Luke Hoersten <luke@hoersten.org>
parents: 103
diff changeset
   182
(setq-default
55
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   183
 uniquify-buffer-name-style 'post-forward
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   184
 uniquify-separator ":")
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   185
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   186
55
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   187
;;; color-theme
104
2b7a3925317e Fixed some code rot issues.
Luke Hoersten <luke@hoersten.org>
parents: 103
diff changeset
   188
(setq custom-safe-themes t)
85
0b91f7fe5a89 Reorganized global modes a bit. Fixed multi-frame font changes.
Luke Hoersten <luke@hoersten.org>
parents: 84
diff changeset
   189
(when window-system (load-theme 'solarized-light))
42
ade8c2cc1b04 Fixed some minor bugs.
Luke Hoersten <Luke@Hoersten.org>
parents: 40
diff changeset
   190
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   191
82
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   192
;;; show-paren-mode - needs to be loaded after theme
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   193
(setq-default
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   194
 show-paren-style 'expression
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   195
 show-paren-delay 0)
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   196
(set-face-attribute
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   197
 'show-paren-match nil
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   198
 :background (face-background 'highlight)
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   199
 :foreground (face-foreground 'highlight))
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   200
(show-paren-mode t)
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   201
12cf67bc486c Added paredit, flx-ido and projectile.
Luke Hoersten <luke@hoersten.org>
parents: 78
diff changeset
   202
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   203
;;; yasnippets
94
8f7bb9aba71a Moved to haskell intero.
Luke Hoersten <luke@hoersten.org>
parents: 89
diff changeset
   204
(with-eval-after-load 'yasnippet
8f7bb9aba71a Moved to haskell intero.
Luke Hoersten <luke@hoersten.org>
parents: 89
diff changeset
   205
  (setq yas-snippet-dirs (remq 'yas-installed-snippets-dir yas-snippet-dirs)))
110
7a84acce27ec Cleaned out some last remaining custome variable and ido stuff.
Luke Hoersten <luke@hoersten.org>
parents: 109
diff changeset
   206
(setq-default yas-prompt-functions '(yas-completing-read yas-dropdown-prompt)) ; use completing-read for multiple snippets
94
8f7bb9aba71a Moved to haskell intero.
Luke Hoersten <luke@hoersten.org>
parents: 89
diff changeset
   207
(yas-global-mode t)
31
27930e0310d6 Reorganized a ton. Split into 3 main sections: General, Modes, and Requires.
Luke Hoersten <Luke@Hoersten.org>
parents: 30
diff changeset
   208
71
b5976ed7311a Big updates to haskell-mode stuff.
Luke Hoersten <Luke@Hoersten.org>
parents: 70
diff changeset
   209
b5976ed7311a Big updates to haskell-mode stuff.
Luke Hoersten <Luke@Hoersten.org>
parents: 70
diff changeset
   210
;;; markdown-mode
112
c4c346aa93ab Replaced flyspell mode with jinx.
Luke Hoersten <luke@hoersten.org>
parents: 111
diff changeset
   211
(add-hook 'markdown-mode-hook 'jinx-mode)
101
Luke Hoersten <luke@hoersten.org>
parents: 99
diff changeset
   212
(setq-default markdown-command "pandoc -f gfm")
71
b5976ed7311a Big updates to haskell-mode stuff.
Luke Hoersten <Luke@Hoersten.org>
parents: 70
diff changeset
   213
55
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   214
107
79cddb8296e6 Upgraded JS modes.
Luke Hoersten <luke@hoersten.org>
parents: 106
diff changeset
   215
;;; treesit-auto (automatically use tree-sitter modes and install grammars)
111
025f0680d73a Minor cleanups.
Luke Hoersten <luke@hoersten.org>
parents: 110
diff changeset
   216
(with-eval-after-load 'treesit-auto
025f0680d73a Minor cleanups.
Luke Hoersten <luke@hoersten.org>
parents: 110
diff changeset
   217
  (global-treesit-auto-mode))
107
79cddb8296e6 Upgraded JS modes.
Luke Hoersten <luke@hoersten.org>
parents: 106
diff changeset
   218
79cddb8296e6 Upgraded JS modes.
Luke Hoersten <luke@hoersten.org>
parents: 106
diff changeset
   219
58
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   220
;;; html-mode
53
0b3217376059 Minor haskell updates.
Luke Hoersten <Luke@Hoersten.org>
parents: 52
diff changeset
   221
(add-to-list 'auto-mode-alist '("\\.tpl\\'" . html-mode))
106
21828209cc73 Moved from zencoding for html to emmet:
Luke Hoersten <luke@hoersten.org>
parents: 105
diff changeset
   222
(add-hook 'html-mode-hook 'emmet-mode)
58
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   223
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   224
85
0b91f7fe5a89 Reorganized global modes a bit. Fixed multi-frame font changes.
Luke Hoersten <luke@hoersten.org>
parents: 84
diff changeset
   225
;;; color-modes map
37
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   226
(mapc
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   227
 (lambda (x)
60
8beb028f936c Fixed a bug with the haskell-mode-hook
Luke Hoersten <Luke@Hoersten.org>
parents: 59
diff changeset
   228
   (add-hook x
65
839e0a541c76 Updates to moveline.
Luke Hoersten <Luke@Hoersten.org>
parents: 64
diff changeset
   229
    (lambda ()
104
2b7a3925317e Fixed some code rot issues.
Luke Hoersten <luke@hoersten.org>
parents: 103
diff changeset
   230
      (display-line-numbers-mode t)
73
8167de2d2daa Lots of random changes. Stopped using Chris Done's haskell-flycheck.
Luke Hoersten <Luke@Hoersten.org>
parents: 72
diff changeset
   231
      (rainbow-delimiters-mode t))))
37
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   232
 '(text-mode-hook
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   233
   c-mode-common-hook
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   234
   python-mode-hook
3c51085957be Added rainbow-delimiter (multi-colored parens) mode and updated twilight color theme.
Luke Hoersten <Luke@Hoersten.org>
parents: 36
diff changeset
   235
   haskell-mode-hook
58
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   236
   js2-mode-hook
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   237
   html-mode-hook
c25a7ccd237a Stabalized new packages and modes.
Luke Hoersten <Luke@Hoersten.org>
parents: 57
diff changeset
   238
   css-mode-hook
86
22b2ad459bc1 Ediff better defaults.
Luke Hoersten <luke@hoersten.org>
parents: 85
diff changeset
   239
   sass-mode-hook
50
6590d340a568 Added clojure mode.
Luke Hoersten <Luke@Hoersten.org>
parents: 48
diff changeset
   240
   clojure-mode-hook
77
c99c95938a05 Added ansible init.
Luke Hoersten <Luke@Hoersten.org>
parents: 76
diff changeset
   241
   emacs-lisp-mode-hook
c99c95938a05 Added ansible init.
Luke Hoersten <Luke@Hoersten.org>
parents: 76
diff changeset
   242
   conf-mode-hook
100
e1c2df47261d Fixed pager in eshell.
Luke Hoersten <luke@hoersten.org>
parents: 99
diff changeset
   243
   yaml-mode-hook
e1c2df47261d Fixed pager in eshell.
Luke Hoersten <luke@hoersten.org>
parents: 99
diff changeset
   244
   sql-mode-hook))
55
d4adcd3d5ef9 Updated to emacs24 with package management and load-theme
Luke Hoersten <Luke@Hoersten.org>
parents: 54
diff changeset
   245
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   246
71
b5976ed7311a Big updates to haskell-mode stuff.
Luke Hoersten <Luke@Hoersten.org>
parents: 70
diff changeset
   247
;;; expand-region
72
65194c801e61 Tons of updates.
Luke Hoersten <Luke@Hoersten.org>
parents: 71
diff changeset
   248
(global-set-key (kbd "C-=") 'er/expand-region)
69
b3baf25406f8 Messing with new haskell mode.
Luke Hoersten <Luke@Hoersten.org>
parents: 68
diff changeset
   249
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   250
71
b5976ed7311a Big updates to haskell-mode stuff.
Luke Hoersten <Luke@Hoersten.org>
parents: 70
diff changeset
   251
;;; move-text
b5976ed7311a Big updates to haskell-mode stuff.
Luke Hoersten <Luke@Hoersten.org>
parents: 70
diff changeset
   252
(global-set-key (kbd "M-p") 'move-text-up)
b5976ed7311a Big updates to haskell-mode stuff.
Luke Hoersten <Luke@Hoersten.org>
parents: 70
diff changeset
   253
(global-set-key (kbd "M-n") 'move-text-down)
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   254
78
7d7662fcc8d1 Started using shm and paredit.
Luke Hoersten <Luke@Hoersten.org>
parents: 77
diff changeset
   255
59
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   256
;;; visual-regexp
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   257
(global-set-key (kbd "C-M-%") 'vr/query-replace)
f346d7591eac Removed more unused init code.
Luke Hoersten <Luke@Hoersten.org>
parents: 58
diff changeset
   258
(global-set-key (kbd "M-%") 'vr/replace)
103
f76683958fb4 Replaced ag with rg.
Luke Hoersten <luke@hoersten.org>
parents: 102
diff changeset
   259
f76683958fb4 Replaced ag with rg.
Luke Hoersten <luke@hoersten.org>
parents: 102
diff changeset
   260
(provide 'init)
f76683958fb4 Replaced ag with rg.
Luke Hoersten <luke@hoersten.org>
parents: 102
diff changeset
   261
;;; init.el ends here