-
Notifications
You must be signed in to change notification settings - Fork 0
/
.emacs
60 lines (54 loc) · 1.88 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
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;; Comment/uncomment this line to enable MELPA Stable if desired. See `package-archive-priorities`
;; and `package-pinned-packages`. Most users will not need or want to do this.
;;(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(package-initialize)
(ido-mode)
(setq inhibit-startup-screen t)
(menu-bar-mode 0)
(tool-bar-mode 0)
(set-frame-font "Inconsolata 20" nil t)
(setq backup-directory-alist '(("." . "~/.emacs_saves")))
(global-font-lock-mode 0)
(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.
'(custom-enabled-themes '(whiteboard))
'(package-selected-packages
'(flycheck go-mode use-package which-key company lsp-mode)))
(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.
)
(add-to-list 'load-path "~/.emacs-extensions/")
(load "keywiz.el")
(require 'use-package)
(use-package which-key
:ensure t
:config
(which-key-mode))
(use-package lsp-mode
:ensure t
:config
(lsp-enable-which-key-integration t))
;;; Go
(use-package go-mode
:ensure t
:hook ((go-mode . lsp-deferred)
(go-mode . company-mode))
:config
(require 'lsp-go)
;; https://github.com/golang/tools/blob/master/gopls/doc/analyzers.md
(setq lsp-go-analyses
'((fieldalignment . t)
(nilness . t)
(unusedwrite . t)
(unusedparams . t)))
(add-to-list 'exec-path "~/go/bin")
;; requires goimports to be installed
(setq gofmt-command "goimports"))