-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.el
188 lines (149 loc) · 6.22 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
;; (let ((benchmark-init.el (expand-file-name "elpa/benchmark-init-20141004.609/benchmark-init.el" user-emacs-directory) ))
;; (load benchmark-init.el))
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
;;(package-initialize)
(set-language-environment "UTF-8")
(set-default-coding-systems 'utf-8)
(when (window-system)
(set-frame-font "Fira Code"))
(let ((alist '((33 . ".\\(?:\\(?:==\\|!!\\)\\|[!=]\\)")
(35 . ".\\(?:###\\|##\\|_(\\|[#(?[_{]\\)")
(36 . ".\\(?:>\\)")
(37 . ".\\(?:\\(?:%%\\)\\|%\\)")
(38 . ".\\(?:\\(?:&&\\)\\|&\\)")
(42 . ".\\(?:\\(?:\\*\\*/\\)\\|\\(?:\\*[*/]\\)\\|[*/>]\\)")
;(43 . ".\\(?:\\(?:\\+\\+\\)\\|[+>]\\)")
;(45 . ".\\(?:\\(?:-[>-]\\|<<\\|>>\\)\\|[<>}~-]\\)")
;(46 . ".\\(?:\\(?:\\.[.<]\\)\\|[.=-]\\)")
(47 . ".\\(?:\\(?:\\*\\*\\|//\\|==\\)\\|[*/=>]\\)")
(48 . ".\\(?:x[a-zA-Z]\\)")
(58 . ".\\(?:::\\|[:=]\\)")
(59 . ".\\(?:;;\\|;\\)")
(60 . ".\\(?:\\(?:!--\\)\\|\\(?:~~\\|->\\|\\$>\\|\\*>\\|\\+>\\|--\\|<[<=-]\\|=[<=>]\\||>\\)\\|[*$+~/<=>|-]\\)")
(61 . ".\\(?:\\(?:/=\\|:=\\|<<\\|=[=>]\\|>>\\)\\|[<=>~]\\)")
(62 . ".\\(?:\\(?:=>\\|>[=>-]\\)\\|[=>-]\\)")
;(63 . ".\\(?:\\(\\?\\?\\)\\|[:=?]\\)")
(91 . ".\\(?:]\\)")
(92 . ".\\(?:\\(?:\\\\\\\\\\)\\|\\\\\\)")
(94 . ".\\(?:=\\)")
(119 . ".\\(?:ww\\)")
(123 . ".\\(?:-\\)")
(124 . ".\\(?:\\(?:|[=|]\\)\\|[=>|]\\)")
(126 . ".\\(?:~>\\|~~\\|[>=@~-]\\)")
)
))
(dolist (char-regexp alist)
(set-char-table-range composition-function-table (car char-regexp)
`([,(cdr char-regexp) 0 font-shape-gstring]))))
;; No splash screen
;;(setq inhibit-startup-message t)
(setq inhibit-startup-echo-area-message "tomaskacur")
(setq fancy-about-text nil)
(defun fancy-startup-tail (&optional concise)
(fancy-splash-insert )
)
(setq fancy-startup-text nil)
(setq fancy-splash-image (expand-file-name "geko.jpg" user-emacs-directory))
(defun display-startup-echo-area-message ()
(message (concat "Loaded in " (emacs-init-time))))
;; Turn off mouse interface early in startup to avoid momentary display
(if (fboundp 'menu-bar-mode) (menu-bar-mode -1))
(if (fboundp 'tool-bar-mode) (tool-bar-mode -1))
(if (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
(add-to-list 'load-path (expand-file-name "lisp" user-emacs-directory))
(add-to-list 'load-path "~/.emacs.d/lisp/cc-mode-5.33/")
(defconst *spell-check-support-enabled* nil) ;; Enable with t if you prefer
(defconst *is-a-mac* (eq system-type 'darwin))
;;----------------------------------------------------------------------------
;; Bootstrap config
;;----------------------------------------------------------------------------
(require 'init-utils)
;;(require 'init-site-lisp) ;; Must come before elpa, as it may provide package.el
(require 'init-elpa) ;; Machinery for installing required packages
(require 'init-exec-path) ;; Set up $PATH
;;----------------------------------------------------------------------------
;; Load configs for specific features and modes
;;----------------------------------------------------------------------------
(require-package 'wgrep)
(require-package 'diminish)
(tooltip-mode nil)
(setq tooltip-use-echo-area t)
(require 'init-scrolling)
(require 'init-key-chord)
(require 'init-ido)
(require 'init-swiper)
(require 'init-ace-jump) ;and ace-window
(require 'init-guide-key)
(require 'init-hippie-expand)
(setq default-directory "~")
(require 'init-dired)
(require 'init-dash)
(require 'init-hightlight)
(require 'init-undo-tree)
(require 'init-multiple-cursors)
;;devel
;; (require 'init-lsp)
(require 'init-company-mode)
(require 'init-paredit)
(require 'init-js-stack)
(require 'init-flycheck) ;; check syntax errors
(require 'init-html)
(require 'init-coffee-mode)
(require 'init-whitespace-cleanup-mode)
(require 'init-projectile)
(require 'init-helm);;helm and projectile-helm and helm-git-grep
(require 'init-git)
(require 'init-clojure)
(require 'init-editing)
(require 'init-others)
(require 'init-bookmarks)
; (require 'init-spotlight) ;only for OSX
(require 'init-markdown-mode)
(require 'init-json)
(require 'init-elm)
(require 'init-themes)
;;(require 'jade)
(require 'init-php)
(require 'init-docker)
(require 'init-yaml)
;,---------------------------------------------------------
;| install packages that dont require special configuration
;`---------------------------------------------------------
;;(require-package 'tramp-term)
;;(require-package 'restclient) melpa problem installing?
(require-package 'visual-regexp)
(require-package 'highlight-escape-sequences)
;;(require-package 'yasnippet) ;; code snippets and templates
(require-package 'smartparens)
(require-package 'ggtags)
;;(require-package 'list-processes+)
(require-package 'kubernetes)
(require-package 'draft-mode)
(require-package 'nginx-mode)
(require-package 'smooth-scrolling)
(smooth-scrolling-mode 1)
(setq smooth-scroll-margin 3)
;;----------------------------------------------------------------------------
;; Allow access from emacsclient
;;----------------------------------------------------------------------------
(require 'server)
(unless (server-running-p)
(server-start))
;; set the scratch buffer to be in text-mode and empty
(setq initial-major-mode (quote text-mode))
(setq initial-scratch-message nil)
;;CUSTOM.EL
(setq custom-file (expand-file-name "custom.el" user-emacs-directory))
(if (file-exists-p custom-file)
(load custom-file))
;; allow risky variable older eslint for kbc-ui project
(add-to-list 'safe-local-variable-values '(flycheck-javascript-eslint-executable . "/Users/tomaskacur/keboola/devel/kbc-ui/node_modules/eslint/bin/eslint.js"))
;;OSX stuff
(toggle-frame-maximized)
;;(put 'dired-find-alternate-file 'disabled nil)
;(load-theme 'ample-zen t)
;;(setq exec-path (append exec-path '("/usr/local/bin")))
(pixel-scroll-mode)