-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_emacs.tmpl
122 lines (92 loc) · 2.83 KB
/
dot_emacs.tmpl
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
;; -*- mode: Lisp -*-
(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 '(modus-vivendi))
'(package-selected-packages
'(typescript-mode kubernetes-evil kubernetes org-roam evil company-go company go-mode lsp-mode use-package))
'(scroll-bar-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.
)
;; Font
(set-face-attribute 'default nil :font "JetBrains Mono 15")
(menu-bar-mode -1)
;; Misc
{{- if eq .chezmoi.os "darwin" }}
(add-to-list 'image-types 'svg)
{{- end }}
;; MELPA
(require 'package)
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
(package-initialize)
(package-install 'company)
(package-install 'company-go)
;;(package-install 'company-mode)
(package-install 'evil)
(package-install 'go-mode)
(package-install 'kubernetes)
(package-install 'kubernetes-evil)
(package-install 'lsp-mode)
(package-install 'lsp-ui)
(package-install 'org-roam)
(package-install 'package)
(package-install 'typescript-mode)
(package-install 'use-package)
(package-install 'yaml-mode)
(package-install 'yasnippet)
(require 'use-package)
;; Company
(require 'company)
;; Evil
(require 'evil)
(evil-mode 1)
(require 'lsp-mode)
(require 'yaml-mode)
;; Org Mode
(require 'org-roam)
(global-set-key (kbd "C-c l") #'org-store-link)
(global-set-key (kbd "C-c a") #'org-agenda)
(global-set-key (kbd "C-c c") #'org-capture)
{{ with (index . "user") }}{{ with (index . "org_roam_dir") }}
;; Org Roam
(use-package org-roam
:ensure t
:custom
(org-roam-directory {{ . | quote }})
(org-roam-completion-everywhere t)
(org-roam-db-autosync-mode)
:bind (("C-c n l" . org-roam-buffer-toggle)
("C-c n f" . org-roam-node-find)
("C-c n i" . org-roam-node-insert)
:map org-mode-map
("C-M-i" . completion-at-point))
:config
(org-roam-setup))
{{ end }}{{ end }}
;; Kubernetes
(require 'kubernetes)
(require 'kubernetes-evil)
(use-package kubernetes)
(use-package kubernetes-evil
:ensure t
:after kubernetes)
;; Go
(require 'company-go)
(require 'go-mode)
(add-to-list 'auto-mode-alist '("\\.go\\'" . go-mode))
(add-hook 'go-mode-hook #'lsp-deferred)
(defun lsp-go-install-save-hooks ()
(add-hook 'before-save-hook #'lsp-format-buffer t t)
(add-hook 'before-save-hook #'lsp-organize-imports t t))
(add-hook 'go-mode-hook #'lsp-go-install-save-hooks)
;; Typescript
(require 'typescript-mode)
(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-mode))
;; Yaml
(add-to-list 'auto-mode-alist '("\\.yml\\'" . yaml-mode))