-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.emacs
68 lines (62 loc) · 2.67 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
(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.
'(package-selected-packages
(quote
(## go-eldoc yaml-mode fiplr go-mode exec-path-from-shell rebecca-theme auto-complete rbenv web-mode go-autocomplete puppet-mode doom-themes emmet-mode)))
'(vc-annotate-very-old-color 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.
)
(require 'package) ;; You might already have this line
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
(when (< emacs-major-version 24)
;; For important compatibility libraries like cl-lib
(add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")))
(package-initialize) ;; You might already have this line
(defun go-mode-setup ()
(go-eldoc-setup)
(setq gofmt-command "goimports")
(setq compile-command "go build -v && go test -v && go vet")
(add-hook 'before-save-hook 'gofmt-before-save)
(if (not (string-match "go" compile-command))
(set (make-local-variable 'compile-command)
"go build -v && go test -v && go vet"))
(local-set-key (kbd "M-.") 'godef-jump))
(add-hook 'go-mode-hook 'go-mode-setup)
(load-theme #'doom-molokai t)
(add-to-list 'load-path "~/.emacs.d/lisp/")
(require 'go-autocomplete)
(require 'auto-complete-config)
(ac-config-default)
(when (memq window-system '(mac ns x))
(exec-path-from-shell-initialize))
(require 'rbenv)
(global-rbenv-mode)
(require 'web-mode)
(add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.[agj]sp\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode))
(add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode))
; ------------------------------------------
; => fiplr
; ------------------------------------------
(unless (package-installed-p 'fiplr)
(package-refresh-contents)
(package-install 'fiplr))
(global-set-key (kbd "M-p") 'fiplr-find-file)
(global-set-key (kbd "M-y") 'fiplr-clear-cache)
(setq fiplr-ignored-globs '((directories (".git" ".svn" "vendor"))
(files ("*.jpg" "*.png" "*.zip" "*~"))))
(load "server")
(unless (server-running-p) (server-start))
(setq rust-format-on-save t)