-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.el
204 lines (167 loc) · 4.77 KB
/
init.el
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
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
;;; init.el --- Simple config
;;; Commentary:
(require 'package) ;; You might already have this line
;;; Code:
(add-to-list 'package-archives
'("melpa-stable" . "http://melpa.org/packages/") t)
(package-initialize) ;; You might already have this line
;; make sure the use-package package is installed
(if (not (package-installed-p 'use-package))
(progn
(package-refresh-contents)
(package-install 'use-package)))
(eval-when-compile
(require 'use-package))
(require 'diminish) ;; if you use :diminish
(require 'bind-key) ;; if you use any :bind variant
;; load a default theme
(use-package zenburn-theme
:ensure t
:init
(load-theme 'zenburn t))
;; frame
(use-package frame
:ensure nil
:config
(add-to-list 'default-frame-alist '(fullscreen . maximized))
(tool-bar-mode 0)
(menu-bar-mode 0)
(scroll-bar-mode 0)
(column-number-mode 1)
:bind ([f12] . menu-bar-mode))
(auto-save-mode 0)
;; guide-key
(use-package guide-key
:ensure t
:diminish guide-key-mode
:init (guide-key-mode 1)
:config
(setq
guide-key/guide-key-sequence '("C-x" "C-c" "C-h")
guide-key/recursive-key-sequence-flag t
guide-key/idle-delay 0.2))
;; neotree
(use-package neotree
:ensure t
:bind ([f8] . neotree-toggle))
;; helm-M-x
(use-package helm
:ensure t
:bind ("M-x" . helm-M-x)
:config
(setq helm-M-x-fuzzy-match t))
;; helm-themes
(use-package helm-themes
:ensure t
:bind ("C-x t" . helm-themes))
;; ido and flx-ido
(use-package ido
:init (progn (ido-mode 1)
(ido-everywhere 1))
:config
(setq ido-enable-flex-matching t
ido-use-faces nil))
(use-package flx-ido
:ensure t
:init (flx-ido-mode 1))
;; programming
(use-package linum
:config
(add-hook 'prog-mode-hook 'linum-mode))
(use-package flycheck
:ensure t
:config
(add-hook 'prog-mode-hook 'flycheck-mode))
(use-package haskell-mode
:ensure t
:config
(add-hook 'haskell-mode-hook 'turn-on-haskell-indentation))
(use-package windmove
:init (windmove-default-keybindings 'meta))
(use-package recentf
:config
(setq recentf-save-file "~/.emacs.d/.recentf"
recentf-max-saved-items 1000)
(recentf-mode))
(use-package magit
:ensure t
:bind ("C-x g" . magit-status)
:config
(progn
(defadvice magit-status (around magit-fullscreen activate)
(window-configuration-to-register :magit-fullscreen)
ad-do-it
(delete-other-windows))
(defun magit-quit-session ()
"Restores the previous window configuration and kills the magit buffer"
(interactive)
(kill-buffer)
(jump-to-register :magit-fullscreen))
(bind-key "q" 'magit-quit-session magit-status-mode-map)))
(use-package ace-jump-mode
:ensure t
:bind ("C-a" . ace-jump-mode))
(use-package autorevert
:init (global-auto-revert-mode 1))
(use-package hl-line
:config
(add-hook 'prog-mode-hook 'hl-line-mode))
(defun toggle-transparency ()
"Toggle between transparent or opaque display."
(interactive)
;; Define alpha if it's nil
(if (eq (frame-parameter (selected-frame) 'alpha) nil)
(set-frame-parameter (selected-frame) 'alpha '(100 100)))
;; Do the actual toggle
(if (/= (cadr (frame-parameter (selected-frame) 'alpha)) 100)
(set-frame-parameter (selected-frame) 'alpha '(100 100))
(set-frame-parameter (selected-frame) 'alpha
(list 90 90))))
(use-package projectile
:ensure t
:config
(projectile-global-mode)
:bind ("<C-tab>" . projectile-find-other-file))
(use-package cider
:ensure t)
(use-package rtags
:ensure t)
(use-package cmake-ide
:ensure t
:config
(cmake-ide-setup)
:bind ([f9] . recompile))
(use-package indent
:ensure nil
:bind ("<backtab>" . indent-rigidly-left-to-tab-stop))
(setq auto-save-default nil)
(setq compilation-scroll-output t)
(fset 'yes-or-no-p 'y-or-n-p)
(delete-selection-mode)
(cua-mode)
(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.
'(cmake-ide-rc-executable "~/dev/rtags/build/bin/rc")
'(cmake-ide-rdm-executable "~/dev/rtags/build/bin/rdm")
'(cursor-type (quote bar))
'(inhibit-startup-screen t)
'(rtags-path "~/dev/rtags/build/bin/")
'(safe-local-variable-values
(quote
((cmake-ide-rc-executable . "~/dev/rtags/build/bin/rc")
(cmake-ide-rdm-executable . "~/dev/rtags/build/bin/rdm")
(cmake-ide-dir . "/home/rosen/projects/g2s/buildninja"))))
'(tab-width 4)
'(transient-mark-mode nil)
'(truncate-lines 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.
)
(provide 'init)
;;; init.el ends here