-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.emacs
175 lines (130 loc) · 4.1 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
; Set up package.el to work with MELPA
(require 'package)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(package-initialize)
(package-refresh-contents)
; This is only needed once, near the top of the file
(eval-when-compile
; Following line is not needed if use-package.el is in ~/.emacs.d
(add-to-list 'load-path "<path where use-package is installed>")
(require 'use-package))
; General
(setq inhibit-startup-screen t)
(menu-bar-mode 0)
(tool-bar-mode 0)
(show-paren-mode 1)
(recentf-mode 1)
(setq recentf-max-menu-items 25)
(global-set-key "\C-x\ \C-r" 'recentf-open-files)
(windmove-default-keybindings)
(display-time-mode 1)
; Theme
(use-package zenburn
:requires zenburn)
(load-theme 'zenburn t)
; Keybindings
(global-set-key (kbd "<M-right>") (kbd "C-x 5 o"))
(setq evil-want-C-u-scroll t)
; Download Evil
(unless (package-installed-p 'evil)
(package-install 'evil))
; Enable Evil
(require 'evil)
(evil-mode 1)
(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.
'(evil-want-fine-undo t)
'(package-selected-packages
(quote
(helm company cider markdown-toc zenburn-theme evil-surround evil))))
(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.
)
; evil plugins
(unless (package-installed-p 'evil-surround)
(package-install 'evil-surround))
(require 'evil-surround)
(global-evil-surround-mode 1)
(define-key evil-insert-state-map (kbd "C-c") 'evil-normal-state)
; Markdown
(use-package markdown-mode
:requires markdown-mode
:demand t
:commands (markdown-mode gfm-mode)
:mode (("README\\.md\\'" . gfm-mode)
("\\.md\\'" . markdown-mode)
("\\.markdown\\'" . markdown-mode))
:init (setq markdown-command "multimarkdown"))
(setq markdown-fontify-code-blocks-natively t)
; Racket
(use-package racket-mode
:requires racket-mode)
; set paths for linux and mac
(if (eq system-type 'gnu/linux)
(setq racket-racket-program "/usr/racket/bin/racket"))
(if (eq system-type 'darwin)
(setq racket-racket-program "/usr/bin/racket"))
; Straight
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
; helm
(straight-use-package 'helm)
(global-set-key (kbd "M-l") 'helm-buffers-list)
; autocomplete
;(use-package auto-complete
; :ensure auto-complete)
(ac-config-default)
; Haskell mode
(setq haskell-program-name "/usr/bin/ghci")
; i3-mode
;(require 'i3)
;(require 'i3-integration)
;i3-one-window-per-frame-mode-on)
; python autocomplete
(use-package epc
:requires epc)
(use-package auto-complete
:requires auto-complete)
(use-package jedi
:requires jedi)
(add-hook 'python-mode-hook 'jedi:ac-setup)
(setq jedi:setup-keys t)
; neotree
(dolist (neotree '(use-package))
(unless (package-installed-p neotree)
(package-install neotree)))
(global-set-key [f8] 'neotree-toggle)
; dockerfile-mode
(use-package dockerfile-mode
:requires dockerfile-mode)
; lua mode
(use-package lua-mode
:requires lua-mode)
(add-hook 'lua-mode-hook
(lambda () (setq compile-command "love .")))
(setq compilation-ask-about-save nil)
(add-hook 'lua-mode-hook
(lambda () (local-set-key (kbd "C-0") #'compile)))
; godot
(use-package gdscript-mode
:straight (gdscript-mode
:type git
:host github
:repo "godotengine/emacs-gdscript-mode"))