blob: 01be640c5978f61c39c94d6214113eb28fcd3b24 (
plain)
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
;; Disable package.el
(setq package-enable-at-startup nil)
;; straight.el booststrap (https://github.com/raxod502/straight.el#getting-started)
(defvar bootstrap-version)
(let ((bootstrap-file
(expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
(bootstrap-version 5))
(unless (file-exists-p bootstrap-file)
(with-current-buffer
(url-retrieve-synchronously
"https://raw.githubusercontent.com/raxod502/straight.el/develop/install.el"
'silent 'inhibit-cookies)
(goto-char (point-max))
(eval-print-last-sexp)))
(load bootstrap-file nil 'nomessage))
;; [package] use-package
(straight-use-package 'use-package)
;; [config] straight: use use-package by default
(use-package straight
:custom (straight-use-package-by-default t))
9
;; [package] acme-mouse
(use-package acme-mouse)
;; [package] magit
(use-package magit)
;; [package] dired-sidebar
(use-package dired-sidebar
:bind
(("C-x C-n" . dired-sidebar-toggle-sidebar))
:commands (dired-sidebar-toggle-sidebar)
:config
(setq dired-sidebar-theme 'vscode)
(setq dired-sidebar-use-term-integration t)
(setq dired-sidebar-use-custom-font t))
;; [package] vscode-icon
(use-package vscode-icon
:commands (vscode-icon-for-file))
;; [package] vertico: better selection buffer
(use-package vertico
:init
(vertico-mode))
;; [config] disable electric indent
(electric-indent-mode -1)
(add-hook 'after-change-major-mode-hook (lambda()
(electric-indent-mode -1)))
;; [package] pdf-tools: opens pdfs
(use-package pdf-tools)
;; [package] rust-mode: mode for rust syntax highlighting
(use-package rust-mode
:init
(add-to-list 'auto-mode-alist '("\\.rs\\'" . rust-mode)))
;; [package] hare-mode: mode for hare
(use-package hare-mode
:straight (hare-mode :type git :host nil
:repo "https://git.sr.ht/~bbuccianti/hare-mode")
:init
(add-to-list 'auto-mode-alist '("\\.ha\\'" . hare-mode)))
;; [package] tex: latex stuff
(use-package tex
:straight auctex
:init
(setq TeX-auto-save t)
(setq TeX-parse-self t)
(setq-default TeX-master nil))
;; [package] modus-themes: cool theme
;; XXX: included in emacs?
(use-package modus-themes
:init
(modus-themes-load-themes)
(modus-themes-load-vivendi))
;; [package] tmr: useful timers (finally, because I used to use my phone
;; previously
(use-package tmr
:straight (tmr :type git :host nil
:repo "https://git.sr.ht/~protesilaos/tmr"))
;; [package] plz: (dep) ement
(use-package plz
:straight (plz :type git :host nil
:repo "https://github.com/alphapapa/plz.el"))
;; [package] ement: matrix client
(use-package ement
:straight (ement :type git :host nil
:repo "https://github.com/alphapapa/ement.el"))
;; [config] display line numbers
(global-display-line-numbers-mode 1)
;; [config] disable menu-bar-mode scroll-bar and menu-bar
(menu-bar-mode -1)
(toggle-scroll-bar -1)
(tool-bar-mode -1)
;; [config] more natural scrolling
(setq mouse-wheel-progressive-speed nil)
(setq mouse-wheel-follow-mouse 't)
(pixel-scroll-precision-mode)
;; [config] highlighting
(global-hl-line-mode 1)
;; [config] backups in fixed directory
(setq backup-directory-alist `(("." . "~/.saves")))
;; [config] keyboard exit modal: add M-c as alias for C-g
(define-key key-translation-map (kbd "M-c") (kbd "C-g"))
;; [INTERFACE] set with the custom interface
(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
'("02fff7eedb18d38b8fd09a419c579570673840672da45b77fde401d8708dc6b5" default))
'(fill-nobreak-predicate '(fill-french-nobreak-p)))
(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.
'(default ((t (:inherit nil :extend nil :stipple nil :background "#000000" :foreground "#ffffff" :inverse-video nil :box nil :strike-through nil :overline nil :underline nil :slant normal :weight regular :height 120 :width normal :foundry "PfEd" :family "Go Mono"))))
'(fringe ((t (:inherit background)))))
;; [command] open-line-above: mimicks vim shift+o behavior
(defun open-line-above ()
(interactive)
(move-beginning-of-line nil)
(newline-and-indent)
(forward-line -1)
(indent-according-to-mode))
(global-set-key (kbd "M-o") 'open-line-above)
;; [config] set tabs
(setq indent-tabs-mode t)
(setq tab-width 4)
(defvaralias 'c-basic-offset 'tab-width)
(add-hook 'java-mode-hook (lambda ()
(setq c-basic-offset 4
tab-width 4
indent-tabs-mode nil)))
(put 'dired-find-alternate-file 'disabled nil)
|