-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.emacs
135 lines (118 loc) · 4.43 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
;see https://melpa.org/#/getting-started
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(proto (if no-ssl "http" "https")))
(when no-ssl
(warn "\
Your version of Emacs does not support SSL connections,
which is unsafe because it allows man-in-the-middle attacks.
There are two things you can do about this warning:
1. Install an Emacs version that does support SSL and be safe.
2. Remove this warning from your init file so you won't see it again."))
;; Comment/uncomment these two lines to enable/disable MELPA and MELPA Stable as desired
(add-to-list 'package-archives (cons "melpa" (concat proto "://melpa.org/packages/")) t)
;;(add-to-list 'package-archives (cons "melpa-stable" (concat proto "://stable.melpa.org/packages/")) t)
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives (cons "gnu" (concat proto "://elpa.gnu.org/packages/")))))
(package-initialize)
;(package-refresh-contents)
; see https://github.com/purcell/color-theme-sanityinc-tomorrow
(require 'color-theme-sanityinc-tomorrow)
(require 'use-package)
; Haskell mode, Haskell indent
;(use-package haskell-mode
; :ensure t)
;(use-package hindent
; :ensure t)
; enable REPL for any haskell file
(add-hook 'haskell-mode-hook 'interactive-haskell-mode)
(add-hook 'haskell-mode-hook 'hindent-mode)
(use-package dante
:ensure t
:after haskell-mode
:commands 'dante-mode
:init
(add-hook 'haskell-mode-hook 'flycheck-mode)
;; OR:
;; (add-hook 'haskell-mode-hook 'flymake-mode)
(add-hook 'haskell-mode-hook 'dante-mode)
)
; set path to ghc
; later see: https://github.com/purcell/exec-path-from-shell
(add-to-list 'exec-path "/Users/kippesp/.ghcup/bin")
(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-faces-vector
[default bold shadow italic underline bold bold-italic bold])
'(ansi-color-names-vector
(vector "#000000" "#d54e53" "#b9ca4a" "#e7c547" "#7aa6da" "#c397d8" "#70c0b1" "#eaeaea"))
'(beacon-color "#d54e53")
'(custom-enabled-themes (quote (sanityinc-tomorrow-night)))
'(custom-safe-themes
(quote
("06f0b439b62164c6f8f84fdda32b62fb50b6d00e8b01c2208e55543a6337433a" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" default)))
'(fci-rule-color "#424242")
'(flycheck-color-mode-line-face-to-color (quote mode-line-buffer-id))
'(frame-background-mode (quote dark))
'(package-selected-packages
(quote
(exec-path-from-shell hindent use-package haskell-mode color-theme-sanityinc-tomorrow dante attrap lcr)))
'(vc-annotate-background nil)
'(vc-annotate-color-map
(quote
((20 . "#d54e53")
(40 . "#e78c45")
(60 . "#e7c547")
(80 . "#b9ca4a")
(100 . "#70c0b1")
(120 . "#7aa6da")
(140 . "#c397d8")
(160 . "#d54e53")
(180 . "#e78c45")
(200 . "#e7c547")
(220 . "#b9ca4a")
(240 . "#70c0b1")
(260 . "#7aa6da")
(280 . "#c397d8")
(300 . "#d54e53")
(320 . "#e78c45")
(340 . "#e7c547")
(360 . "#b9ca4a"))))
'(vc-annotate-very-old-color nil)
'(window-divider-mode nil))
(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.
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; FUNCTIONS
(defun font-exists-p (font) "check if font exists" (if (null (x-list-fonts font)) nil t))
;;; ADJUSTMENTS
(blink-cursor-mode 0)
(global-display-line-numbers-mode)
(tool-bar-mode -1)
(toggle-scroll-bar -1)
(set-background-color "#000000")
; font picker
(cond
((find-font (font-spec :name "Source Code Pro"))
(set-frame-font "Source Code Pro-12"))
((find-font (font-spec :name "Inconsolata"))
(set-frame-font "Inconsolata-13"))
((find-font (font-spec :name "Lucida Console"))
(set-frame-font "Lucida Console-12"))
((find-font (font-spec :name "Consolas"))
(set-frame-font "Consolas-14"))
((find-font (font-spec :name "Courier"))
(set-frame-font "Courier-12")))
;;; Fix path issues
; https://github.com/purcell/exec-path-from-shell
(when (memq window-system '(mac ns x))
(exec-path-from-shell-initialize))