-
Notifications
You must be signed in to change notification settings - Fork 0
/
_emacs
182 lines (165 loc) · 5.86 KB
/
_emacs
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
;;; .emacs -- Emacs configuration file
;;; Commentary:
;;; This is a fork of manpages .emacs, using some good stuff by volhovm
;;; Code:
(load "~/.emacs.d/wilderness/defuns.el")
;; while deploying emacs on a new machine, cross your fingers and hope for best
(require 'package)
(add-to-list 'package-archives
'("melpa" . "http://melpa.org/packages/") t)
(package-initialize)
(unless package-archive-contents
(package-refresh-contents))
(unless (require 'quelpa nil t)
(with-temp-buffer
(url-insert-file-contents "https://raw.github.com/quelpa/quelpa/master/bootstrap.el")
(eval-buffer)))
;; Sorrow.
;(quelpas 'evil 'evil-magit 'evil-surround 'evil-leader
; 'rainbow-delimiters 'haskell-mode 'flycheck-haskell 'psc-ide 'purescript-mode)
(package-initialize)
(setq evil-want-C-i-jump nil)
(add-to-list 'load-path "~/.emacs.d/plugins/evil-org-mode")
(require 'evil-org)
;; Leader
(global-evil-leader-mode)
(evil-leader/set-leader ",")
;; Happiness
(evil-mode 1)
;; Org-mode
(setq org-todo-keywords
'((sequence "TODO(t)" "NEXT(n)" "DOING(d)"
"WAITING(w@/!)" "DELEGATED(x@/!)" "|"
"DONE(o!)" "CANCELED(c@/!)")))
; \emsp fix by Misha
(defun my-org-clocktable-indent-string (level)
"LEVEL -- indentation level."
(if (= level 1)
""
(let ((str ">"))
(while (> level 2)
(setq level (1- level)
str (concat str " ")))
(concat str " ")))
)
(advice-add 'org-clocktable-indent-string :override #'my-org-clocktable-indent-string)
; Clocking
(setq org-clock-into-drawer t)
(setq org-clock-out-remove-zero-time-clocks t)
(setq org-columns-default-format "%80ITEM(Task) %10CLOCKSUM")
(setq org-capture-templates
'( ("j" "Journal" entry (file+datetree "~/org/diary.org") "* %?\n%U\n" :clock-in t :clock-resume t) ))
; Refiling
(setq org-refile-targets (quote ((nil :maxlevel . 9)
(org-agenda-files :maxlevel . 9))))
(setq org-refile-use-outline-path t)
(setq org-outline-path-complete-in-steps nil)
(setq org-refile-allow-creating-parent-nodes (quote confirm))
(setq org-completion-use-ido t)
; Tags
(setq org-tag-alist '(("PERSONAL" . ?p)
("WORK" . ?w)))
;; Haskell
;; smart stuff by Misha
(require 'haskell-process)
;(require 'hindent)
(setq-default hindent-style "johan-tibell")
(add-hook 'haskell-mode-hook 'volhovm-haskell-mode-hook)
(defun volhovm-haskell-mode-hook ()
"Func for haskell-mode hook."
(interactive-haskell-mode)
(whitespace-mode)
(volhovm-haskell-style)
(hindent-mode))
;; make advanced tools usable
'(flycheck-ghc-args (quote ("-v")))
'(flycheck-haskell-runghc-command
(quote
("stack" "--verbosity" "silent" "runghc" "--")))
'(haskell-interactive-popup-errors nil)
'(haskell-process-args-stack-ghci (quote ("--ghc-options=-ferror-spans")))
'(haskell-process-log t)
'(haskell-process-type (quote auto))
;; eye-candy
(global-prettify-symbols-mode t)
(load "~/.emacs.d/wilderness/haskell.el")
(setq haskell-stylish-on-save t)
;; we've got style, we've got moves
(defun volhovm-haskell-style ()
"Style properties for haskell."
(interactive)
(setq tab-width 4
haskell-indentation-layout-offset 4
haskell-indentation-left-offset 4
haskell-indentation-ifte-offset 4))
;; not-so-smart stuff by Jonn
(add-hook 'after-init-hook #'global-flycheck-mode)
(add-hook 'text-mode-hook 'turn-on-auto-fill)
(eval-after-load 'flycheck
'(add-hook 'flycheck-mode-hook #'flycheck-haskell-setup))
;; purescript
(require 'psc-ide)
(add-hook 'purescript-mode-hook
(lambda ()
(psc-ide-mode)
(company-mode)
(flycheck-mode)
(turn-on-purescript-indentation)))
;; monochrome scheme is ok
(load "~/.emacs.d/wilderness/monochrome-theme.el")
(require 'rainbow-delimiters)
;; warm and fuzzy
(setq ido-enable-flex-matching t)
(setq ido-everywhere t)
(setq ido-create-new-buffer 'always)
(ido-mode 1)
;; backups
(setq backup-directory-alist `(("." . "~/.saves")))
(setq backup-by-copying-when-linked t
delete-old-versions t
kept-new-versions 10
kept-old-versions 5
version-control t)
(setq auto-save-default nil)
;; boring shit
(set-cursor-color "#997A8D")
(set-mouse-color "#997A8D")
(blink-cursor-mode 0)
(tool-bar-mode -1)
(menu-bar-mode -1)
;(scroll-bar-mode -1)
(setq inhibit-splash-screen t)
(setq inhibit-startup-message t)
(set-default-font "Ubuntu Mono-8")
(set-face-background 'rainbow-delimiters-unmatched-face "red")
(set-face-foreground 'rainbow-delimiters-unmatched-face "black")
(set-face-foreground 'rainbow-delimiters-depth-9-face "#BBBBBB")
(set-face-foreground 'rainbow-delimiters-depth-8-face "#90B0B0")
(set-face-foreground 'rainbow-delimiters-depth-6-face "#B0B095")
(set-face-foreground 'rainbow-delimiters-depth-4-face "#907590")
(set-face-foreground 'rainbow-delimiters-depth-5-face "#B0B0B0")
(set-face-foreground 'rainbow-delimiters-depth-2-face "#909075")
(set-face-foreground 'rainbow-delimiters-depth-1-face "#909090")
(set-face-foreground 'rainbow-delimiters-depth-7-face "#B090B0")
(set-face-foreground 'rainbow-delimiters-depth-3-face "#759090")
(put 'downcase-region 'disabled nil)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(org-agenda-files
(quote
("~/org" "~/org/self" "~/org/company" "~/org/projects")))
'(org-modules '(org-habit))
'(safe-local-variable-values (quote ((auto-revert-mode . t)))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(secondary-selection ((((class color) (min-colors 10)) (:foreground: "white" :background "black"))))
'(whitespace-newline ((t (:foreground "black" :weight normal))))
'(whitespace-space ((t (:background "black" :foreground "black")))))
(provide '.emacs)
;;; .emacs ends here