about summary refs log tree commit diff
path: root/modules/workstation/emacs/init.el
blob: 7d65b30dc7baa0a309196de659249aa304d201ae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
;;; UI customization ;;;
(menu-bar-mode -1)
(scroll-bar-mode -1)
(tool-bar-mode -1)
(setq-default truncate-lines t)
(load-theme 'monokai t)

;; <102 or >109 will make Ioveska look squished rather than tall,
;; narrow, and beautiful.
(set-face-attribute 'default nil :height 104)

;;; Major modes ;;;
(add-to-list 'auto-mode-alist '("\\.adoc\\'" . adoc-mode))
(add-to-list 'auto-mode-alist '("\\.quirks\\'" . conf-unix-mode))

;;; Ibuffer ;;;
;; Open ibuffer in other window, to match behaviour of the default
;; list-buffers.
(global-set-key
 (kbd "C-x C-b")
 (lambda ()
   (interactive)
   (ibuffer t)))

;;; ispell ;;;
;; System locale is Esperanto, but I write in English much more, and
;; spelling in Esperanto is easy anyway. ;)
(setq ispell-dictionary "english")

;;; Magit ;;;
(setq magit-delete-by-moving-to-trash delete-by-moving-to-trash)
(global-set-key (kbd "C-x g") 'magit-status)
(global-set-key (kbd "C-x M-g") 'magit-dispatch)

;;; Rainbow Delimiters ;;;
(add-hook 'prog-mode-hook #'rainbow-delimiters-mode)

;;; Rust ;;;
(add-hook 'rust-mode-hook (lambda () (setq indent-tabs-mode nil)))