-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinit.el
More file actions
141 lines (120 loc) · 4.2 KB
/
init.el
File metadata and controls
141 lines (120 loc) · 4.2 KB
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
;; __ __ __ __
;; | \/ | ___| \/ | __ _ ___ ___
;; | |\/| |/ _ \ |\/| |/ _` |/ __/ __|
;; | | | | __/ | | | (_| | (__\__ \
;; |_| |_|\___|_| |_|\__,_|\___|___/
;;
;; Light Emacs Distribution
;; add nix binaries to load path
(let ((nix-bin (expand-file-name "~/.nix-profile/bin")))
(when (file-directory-p nix-bin)
(setenv "PATH" (concat nix-bin ":" (getenv "PATH")))
(add-to-list 'exec-path nix-bin)))
(load "~/.emacs.d/memacs.el")
(global-display-line-numbers-mode t)
(defun nolinum ()
(display-line-numbers-mode 0)
)
;; hint key bindings
(which-key-mode)
;; transparent background
(add-to-list 'default-frame-alist '(background-color . "unspecified"))
(setq lsp-disabled-clients '(ts-ls)) ;; deno instead of node
(defvar memacs/package-refreshed-p nil
"Non-nil if package archives have been refreshed this Emacs session.")
(enable-command-line-clipboard)
(require 'package) ; load package managment
;; add sources to load our packages from
(add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/"))
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize) ; load and activate the installed packages
(ensure-package-is-installed 'use-package)
(customize-window)
(setup-editor-for-programming)
;; move save files to a central space
;; avoiding cluttering project directories
(setq backup-directory-alist
`((".*" . "~/.saves")))
(setq auto-save-file-name-transforms
`((".*" "~/.saves" t)))
;; Dashboard Configuration
(customize-dashboard)
;; Language Server Hooks
(install-language-server-hooks)
;;(require 'languages)
(load "~/.emacs.d/languages.el")
(add-language-support)
;; Setup Theme
(ensure-package-is-installed 'doom-themes)
(use-package doom-themes
:ensure t
:config
(setq doom-themes-enable-bold t
doom-themes-enable-italic t)
(load-theme 'doom-nord t)
(setq doom-themes-treemacs-theme "doom-atom")
)
;; Terminal
(ensure-package-is-installed 'eat)
(use-package eat)
(add-hook 'eat-mode-hook 'nolinum)
;; don't show undo-tree as minor mode
(eval-after-load 'undo-tree
'(setq minor-mode-alist (assq-delete-all 'undo-tree-mode minor-mode-alist)))
;; Prevent undo tree files from polluting your git repo
(setq undo-tree-history-directory-alist '(("." . "~/.emacs.d/undo")))
;; globaly enable undo tree
(ensure-package-is-installed 'undo-tree)
(use-package undo-tree
:config
(global-undo-tree-mode)
)
(ensure-package-is-installed 'org-ref)
(use-package org-ref)
;; color for source code listings in org mode latex exports
(setq org-latex-pdf-process
'("pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"
"pdflatex -shell-escape -interaction nonstopmode -output-directory %o %f"))
(setq org-latex-src-block-backend 'minted)
;;iedit
(ensure-package-is-installed 'iedit)
(global-set-key (kbd "C-;") 'iedit-mode)
;; quickrun
(ensure-package-is-installed 'quickrun)
(use-package quickrun)
;; Snippets
(ensure-package-is-installed 'dirvish)
(ensure-package-is-installed 'yasnippet)
(use-package yasnippet
:ensure t
:hook ((text-mode
prog-mode
conf-mode
snippet-mode) . yas-minor-mode-on)
:bind (:map yas-minor-mode-map
("TAB" . nil)
("<tab>" . nil)
("C-c C-l" . yas-insert-snippet)
("C-c C-w" . yas-expand)
)
:init
(setq yas-snippet-dir "~/.emacs.d/snippets"))
(add-hook 'after-save-hook 'autocompile-init-file)
(run-with-idle-timer 0 nil #'async-startup)
(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-safe-themes
'("0325a6b5eea7e5febae709dab35ec8648908af12cf2d2b569bedc8da0a3a81c1"
default))
'(package-selected-packages 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.
)
(put 'downcase-region 'disabled nil)