-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.el
143 lines (123 loc) · 4.39 KB
/
init.el
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
142
143
;; Set up package manager
(load (concat user-emacs-directory "config/elpaca.el"))
(elpaca-wait)
;; Custom definitions
(load (concat user-emacs-directory "config/definitions.el"))
(use-package emacs
:elpaca nil
:custom
(recentf-save-file (concat user-emacs-directory "temporal/recentf"))
;; (make-backup-files nil) ; Don't make backups
(auto-save-default nil) ; Don't autosave
(org-image-actual-width 700) ; Define size of images
(backup-directory-alist `(("." . ,(concat user-emacs-directory "saves"))))
(browse-url-browser-function 'browse-url-generic)
(browse-url-generic-program "vivaldi-stable")
(inhibit-startup-message t) ; Don't bother me
(x-select-enable-clipboard t)
(ring-bell-function 'ignore)
(c-basic-offset tab-width)
(backward-delete-char-untabify-method 'nil)
(initial-scratch-message ";; Scratch buffer for emacs-lisp-mode")
(frame-resize-pixelwise t)
(fast-but-imprecise-scrolling t)
(tab-always-indent 'complete)
(use-dialog-box nil) ; No GUI elements
(history-length 25)
;; (eldoc-echo-area-use-multiline-p nil)
(org-agenda-tags-column 0)
(recentf-exclude '(".*gz"
".*pdf"
"bookmarks"
".*log"
".*png"
".*jpg"
".*gif"
".*_db"))
:config
;; Declutter UI
(menu-bar-mode -1)
(scroll-bar-mode -1)
(tool-bar-mode -1)
(recentf-mode 1)
(repeat-mode)
(pixel-scroll-precision-mode t) ; Smooth scrolling
(defalias 'yes-or-no-p 'y-or-n-p) ; Alias yes-or-no
;; Line numbers in programming files
(add-hook 'prog-mode-hook 'display-line-numbers-mode)
(add-hook 'emacs-lisp-mode-hook 'emacs-lisp-pretty-icons)
(add-hook 'java-mode-hook (lambda ()
(setq c-basic-offset 4
tab-width 4
indent-tabs-mode t)))
;; (set-frame-size-aecording-to-resolution)
(setq-default fill-column 80) ; Ruler at line 80
(setq-default display-line-numbers-type 'visual)
(setq-default display-line-numbers-width 3)
(setq-default display-line-numbers-grow-only t)
(setq-default prettify-symbols-unprettify-at-point 'right-edge)
;; Start Emacs maximized
(add-to-list 'default-frame-alist
'(fullscreen . maximized))
;; Font family and size
(add-to-list 'default-frame-alist
'(font . "mononoki Nerd Font Mono:style=Regular"))
;; (add-to-list 'recentf-exclude "bookmarks")
(org-babel-do-load-languages
'org-babel-load-languages
'((octave . t)))
)
(use-package server
:elpaca nil
:config
(unless (server-running-p)
(server-start)))
;; CONFIG
;; Evil general (Keybinds)
(load (concat user-emacs-directory "config/keybinds.el"))
;; Dashboard setup
(load (concat user-emacs-directory "config/dashboard.el"))
;; Nerd Icons
(use-package nerd-icons)
;; UI
(load (concat user-emacs-directory "config/ui.el"))
;; Project
(load (concat user-emacs-directory "config/project.el"))
;; Tools
(load (concat user-emacs-directory "config/tools.el"))
;; Modeline
(load (concat user-emacs-directory "config/modeline.el"))
;; Tabline
;; (load (concat user-emacs-directory "config/tabline.el"))
;; Minibuffer
(load (concat user-emacs-directory "config/minibuffer.el"))
;; LaTeX
(load (concat user-emacs-directory "config/latex.el"))
;; Org Mode
(load (concat user-emacs-directory "config/org.el"))
;; Code
(load (concat user-emacs-directory "config/code.el"))
;; Java
;; (load (concat user-emacs-directory "config/java.el"))
(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
'("45e409674661674c12070af5f8ef71741599eeb9fccd84557f1b822509f3b100" "4ae2387bb3bcfb3419d88f586b41c1fef3ff8620b80d06d53f98ec30df469407" "38457f8afb329ce87e1a41d31e155acb4dcdf5ee6a1ea703d401f2042747a69f" default))
'(ignored-local-variable-values '((TeX-master . t)))
'(package-selected-packages '(eglot auctex))
'(safe-local-variable-values
'((eval TeX-run-style-hooks "beamer")
(TeX-master . "../main"))))
(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 'narrow-to-page 'disabled nil)
(put 'narrow-to-region 'disabled nil)
(put 'TeX-narrow-to-group 'disabled nil)
(put 'LaTeX-narrow-to-environment 'disabled nil)