-
Notifications
You must be signed in to change notification settings - Fork 0
/
emacs
67 lines (56 loc) · 2.28 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
(require 'package)
(setq package-enable-at-startup nil)
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(package-initialize)
;; Bootstrap `use-package'
(unless (package-installed-p 'use-package)
(package-refresh-contents)
(package-install 'use-package))
(use-package try
:ensure t)
(add-hook 'before-save-hook 'delete-trailing-whitespace)
(add-to-list 'load-path "~/.opam/system/share/emacs/site-lisp/")
(add-to-list 'load-path "~/.emacs.d/lisp")
(setq auto-mode-alist
(append '(("\\.ml[ily]?$" . tuareg-mode)
("\\.eliom$" . tuareg-mode))
auto-mode-alist))
(autoload 'tuareg-mode "tuareg" "Major mode for editing Caml code." t)
(autoload 'camldebug "cameldeb" "Run the Caml debugger." t)
(setq column-number-mode t)
(show-paren-mode 1)
(setq-default indent-tabs-mode t)
(setq-default tab-width 4)
(setq require-final-newline 'visit-save)
(let ((opam-share (ignore-errors (car (process-lines "opam"
"config" "var" "share")))))
(when (and opam-share (file-directory-p opam-share))
;; Register Merlin
(add-to-list 'load-path (expand-file-name "emacs/site-lisp"
opam-share))
(autoload 'merlin-mode "merlin" nil t nil)
;; Automatically start it in OCaml buffers
(add-hook 'tuareg-mode-hook 'merlin-mode t)
(add-hook 'caml-mode-hook 'merlin-mode t)
;; Use opam switch to lookup ocamlmerlin binary
(setq merlin-command 'opam)))
(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.
'(default ((t (:family "Ubuntu Mono" :foundry "DAMA" :slant normal :weight normal :height 203 :width normal)))))
(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.
'(ansi-color-names-vector
["#2d3743" "#ff4242" "#74af68" "#dbdb95" "#34cae2" "#008b8b" "#00ede1" "#e1e1e0"])
'(custom-enabled-themes (quote (wheatgrass)))
'(inhibit-startup-screen t)
'(package-selected-packages
(quote
(yaml-mode merlin tuareg dockerfile-mode try use-package))))
(winner-mode 1)