116 |
116 |
117 ;; install packages |
117 ;; install packages |
118 (let ((ensure-installed |
118 (let ((ensure-installed |
119 (lambda (name) |
119 (lambda (name) |
120 (unless (package-installed-p name) (package-install name)))) |
120 (unless (package-installed-p name) (package-install name)))) |
121 (packages '(ac-js2 auto-complete expand-region ghc |
121 (packages '(ac-js2, auto-complete, exec-path-from-shell, expand-region, |
122 ghci-completion haskell-mode iy-go-to-char js2-mode |
122 flymake-easy, flymake-hlint, ghc, ghci-completion, haskell-mode, |
123 multiple-cursors rainbow-delimiters rainbow-mode |
123 js2-mode, multiple-cursors, rainbow-delimiters, rainbow-mode, |
124 skewer-mode solarized-theme yasnippet zencoding-mode |
124 skewer-mode, solarized-theme, visual-regexp, yasnippet, |
125 visual-regexp))) |
125 zencoding-mode))) |
126 (mapc ensure-installed packages)) |
126 (mapc ensure-installed packages)) |
127 |
127 |
128 ;;; requires |
128 ;;; requires |
129 (require 'c-init) ; c specific elisp |
129 (require 'c-init) ; c specific elisp |
130 (require 'move-line) ; move line up or down |
130 (require 'move-line) ; move line up or down |
131 (require 'uniquify) ; unique buffer names with dirs |
131 (require 'uniquify) ; unique buffer names with dirs |
132 (require 'auto-complete-config) |
132 (require 'auto-complete-config) |
133 (require 'iy-go-to-char) |
|
134 |
133 |
135 ;;; auto-config-mode |
134 ;;; auto-config-mode |
136 (ac-config-default) |
135 (ac-config-default) |
137 |
136 |
138 ;;; terminal |
137 ;;; terminal |
217 (add-hook 'inferior-haskell-mode-hook 'turn-on-ghci-completion) |
216 (add-hook 'inferior-haskell-mode-hook 'turn-on-ghci-completion) |
218 |
217 |
219 ;;; expand-region |
218 ;;; expand-region |
220 (global-set-key (kbd "C-=") 'er/expand-region) |
219 (global-set-key (kbd "C-=") 'er/expand-region) |
221 |
220 |
222 ;;; iy-go-to-char |
|
223 (global-set-key (kbd "C-c f") 'iy-go-to-char) |
|
224 (global-set-key (kbd "C-c F") 'iy-go-to-char-backward) |
|
225 (global-set-key (kbd "C-c ;") 'iy-go-to-char-continue) |
|
226 (global-set-key (kbd "C-c ,") 'iy-go-to-char-continue-backward) |
|
227 |
|
228 ;;; flymake-mode |
221 ;;; flymake-mode |
229 (add-hook |
222 (add-hook |
230 'flymake-mode-hook |
223 'flymake-mode-hook |
231 (lambda () |
224 (lambda () |
232 (local-set-key (kbd "C-1") 'flymake-display-err-menu-for-current-line) |
225 (local-set-key (kbd "C-1") 'flymake-display-err-menu-for-current-line) |