1 | ;;;; Emacs --- My config for Emacs that I use in day-to-day work
|
---|
2 | ;;;;
|
---|
3 | ;;;; https://w96k.com/
|
---|
4 | ;;;; 2018-2019 (c) Mikhail w96k Kirillov
|
---|
5 |
|
---|
6 | ;;;; INIT
|
---|
7 |
|
---|
8 | (eval-when-compile
|
---|
9 | ;; increase GC-limit up to 100M for boot speedup
|
---|
10 | (setq gc-cons-threshold 500000000)
|
---|
11 |
|
---|
12 | ;;; Set font
|
---|
13 | (add-to-list 'default-frame-alist '(font . "terminus-12"))
|
---|
14 |
|
---|
15 | ;;; Disable emacs gui
|
---|
16 | (menu-bar-mode -1)
|
---|
17 | (scroll-bar-mode -1)
|
---|
18 | (tool-bar-mode -1)
|
---|
19 | (tooltip-mode -1)
|
---|
20 |
|
---|
21 | (require 'package)
|
---|
22 |
|
---|
23 | (setq package-archives
|
---|
24 | '(("gnu" . "http://elpa.gnu.org/packages/")
|
---|
25 | ("melpa" . "http://melpa.org/packages/")))
|
---|
26 |
|
---|
27 | (package-initialize)
|
---|
28 |
|
---|
29 | ;; restore GC-limit after timeout
|
---|
30 | (run-with-idle-timer
|
---|
31 | 15 nil
|
---|
32 | (lambda ()
|
---|
33 | (setq gc-cons-threshold 100000)))
|
---|
34 |
|
---|
35 | ;; Optimize loading
|
---|
36 | (setq load-prefer-newer t
|
---|
37 | package-user-dir "~/.emacs.d/elpa"
|
---|
38 | package--init-file-ensured t
|
---|
39 | package-enable-at-startup nil)
|
---|
40 |
|
---|
41 | (require 'use-package))
|
---|
42 |
|
---|
43 | (use-package use-package
|
---|
44 | :defer nil
|
---|
45 | :config
|
---|
46 | (setq use-package-verbose t)
|
---|
47 | (setq use-package-always-defer t)
|
---|
48 | (setq use-package-always-ensure t))
|
---|
49 |
|
---|
50 | (use-package use-package-ensure-system-package :ensure)
|
---|
51 |
|
---|
52 | (add-to-list 'load-path "~/.guix-profile/share/emacs/site-lisp/")
|
---|
53 |
|
---|
54 | ;; Information about me
|
---|
55 | (setq user-full-name "Mikhail Kirillov"
|
---|
56 | user-mail-address "w96k@posteo.net")
|
---|
57 |
|
---|
58 | ;;;; VISUALS
|
---|
59 |
|
---|
60 | ;;; Color parens
|
---|
61 | (use-package rainbow-delimiters
|
---|
62 | :hook ((prog-mode . rainbow-delimiters-mode)))
|
---|
63 |
|
---|
64 | ;;; Display numbers
|
---|
65 | (global-display-line-numbers-mode)
|
---|
66 |
|
---|
67 | ;;; Display current line
|
---|
68 | (global-hl-line-mode)
|
---|
69 |
|
---|
70 | ;;; Set Theme
|
---|
71 | (use-package color-theme-sanityinc-tomorrow
|
---|
72 | :demand
|
---|
73 | :config (load-theme 'sanityinc-tomorrow-eighties t))
|
---|
74 |
|
---|
75 | ;;; Doom modeline
|
---|
76 | (use-package doom-modeline
|
---|
77 | :config
|
---|
78 | (setq doom-modeline-height 0.95)
|
---|
79 | (set-face-attribute 'mode-line nil :height 95)
|
---|
80 | (set-face-attribute 'mode-line-inactive nil :height 100)
|
---|
81 | (setq doom-modeline-indent-info t
|
---|
82 | doom-modeline-lsp t
|
---|
83 | doom-modeline-env-version t
|
---|
84 | column-number-mode t
|
---|
85 | line-number-mode t)
|
---|
86 | :hook (after-init . doom-modeline-mode))
|
---|
87 |
|
---|
88 | ;;; Org-mode
|
---|
89 | (use-package org
|
---|
90 | :config
|
---|
91 | (setq org-publish-project-alist
|
---|
92 | `(("blog" :components ("blog-content" "blog-styles"))
|
---|
93 | ("blog-styles"
|
---|
94 | :base-directory "~/github/blog/public"
|
---|
95 | :base-extension "jpg\\|gif\\|png\\|ico\\|css"
|
---|
96 | :publishing-directory "~/github/blog/dist/public/"
|
---|
97 | :recursive t
|
---|
98 | :publishing-function org-publish-attachment
|
---|
99 | )
|
---|
100 | ("blog-content"
|
---|
101 | :base-directory "~/github/blog/content"
|
---|
102 | :publishing-directory "~/github/blog/dist"
|
---|
103 | :recursive t
|
---|
104 | :publishing-function org-html-publish-to-html
|
---|
105 |
|
---|
106 | :html-doctype "xhtml5"
|
---|
107 |
|
---|
108 | :with-title nil
|
---|
109 | :with-author t
|
---|
110 | :with-creator nil
|
---|
111 | :with-date t
|
---|
112 | :with-email t
|
---|
113 | :with-footnotes t
|
---|
114 | :html-html5-fancy t
|
---|
115 | :html-preamble "
|
---|
116 | <header class=\"navbar\">
|
---|
117 | <a href=\"/\" class=\"logo\">@w96k</a>
|
---|
118 | <a class=\"button\" href=\"/about.html\">Обо мне</a>
|
---|
119 | <a class=\"button\" href=\"https://github.com/w96k/cv/raw/master/cv.pdf\">CV</a>
|
---|
120 | <a class=\"button\" href=\"/feed.xml\"><span class=\"icon-rss\"></span></a>
|
---|
121 | </header>"
|
---|
122 |
|
---|
123 | :html-head "
|
---|
124 | <link rel=\"shortcut icon\" href=\"/public/favicon.ico\">
|
---|
125 | <link rel=\"stylesheet\" href=\"/public/css/mini.css\" type=\"text/css\"/>
|
---|
126 | <link rel=\"stylesheet\" href=\"/public/css/custom.css\" type=\"text/css\"/>
|
---|
127 | "
|
---|
128 |
|
---|
129 | :html-container "article"
|
---|
130 | :html-postamble "
|
---|
131 | <div class=\"row\">
|
---|
132 | <div class=\"col-sm\">
|
---|
133 | <p class=\"licenses\">
|
---|
134 | <a href=\"https://creativecommons.org/licenses/by/4.0/\">
|
---|
135 | <img alt=\"Лицензия Creative Commons\" src=\"https://i.creativecommons.org/l/by/4.0/88x31.png\" />
|
---|
136 | </a>
|
---|
137 | <a href=\"https://www.gnu.org/licenses/gpl-3.0.txt\">
|
---|
138 | <img src=\"/public/images/gpl.png\">
|
---|
139 | </a>
|
---|
140 | </p>
|
---|
141 | </div>
|
---|
142 |
|
---|
143 | <div class=\"col-sm\" align=\"center\">
|
---|
144 | <p>© 2020 Mikhail Kirillov</p>
|
---|
145 | <p><a href=\"https://git.sr.ht/~w96k/blog\">Исходный код</a></p>
|
---|
146 | </div>
|
---|
147 |
|
---|
148 | <div class=\"col-sm\" align=\"right\">
|
---|
149 | <p><span class=\"icon-settings\"></span> %c</p>
|
---|
150 | <p><span class=\"icon-calendar\"></span> %C</p>
|
---|
151 | </div>
|
---|
152 | </div>
|
---|
153 |
|
---|
154 | <br>
|
---|
155 | <div align=\"center\">
|
---|
156 | <small>
|
---|
157 | <p>Содержимое данного сайта доступно по лицензии
|
---|
158 | <a href=\"https://creativecommons.org/licenses/by/4.0/\">
|
---|
159 | Creative Commons «Attribution» («Атрибуция») 4.0 Всемирная
|
---|
160 | </a>
|
---|
161 | </p>
|
---|
162 | <p>Исходный код данного сайта доступен по лицензии GNU General Public License Version 3</p>
|
---|
163 | </small>
|
---|
164 | </div>"
|
---|
165 |
|
---|
166 | :section-numbers nil
|
---|
167 | ;;:with-sub-superscript nil ;; important!!
|
---|
168 |
|
---|
169 | ;; sitemap - list of blog articles
|
---|
170 | :auto-sitemap t
|
---|
171 | :sitemap-filename "sitemap.org"
|
---|
172 | :sitemap-title "@w96k"
|
---|
173 | :sitemap-sort-files anti-chronologically))))
|
---|
174 |
|
---|
175 | (use-package simple-httpd)
|
---|
176 |
|
---|
177 | ;;; Bullets for org-mode
|
---|
178 | (use-package org-bullets
|
---|
179 | :if window-system
|
---|
180 | :commands org-bullets-mode
|
---|
181 | :hook (org-mode . org-bullets-mode))
|
---|
182 |
|
---|
183 | ;;;; EDITING
|
---|
184 |
|
---|
185 | ;;; Easy undo system
|
---|
186 | (use-package undo-tree
|
---|
187 | :diminish
|
---|
188 | :commands
|
---|
189 | (global-undo-tree-mode)
|
---|
190 | :init
|
---|
191 | (setq
|
---|
192 | undo-tree-visualizer-timestamps t
|
---|
193 | undo-tree-enable-undo-in-region nil
|
---|
194 | undo-tree-history-directory-alist
|
---|
195 | `(("." . ,(expand-file-name "undo" user-emacs-directory))))
|
---|
196 | (global-undo-tree-mode))
|
---|
197 |
|
---|
198 | ;;; Jump to defenition
|
---|
199 | (use-package dumb-jump
|
---|
200 | :bind (("M-g o" . dumb-jump-go-other-window)
|
---|
201 | ("M-g j" . dumb-jump-go)
|
---|
202 | ("M-g i" . dumb-jump-go-prompt)
|
---|
203 | ("M-g x" . dumb-jump-go-prefer-external)
|
---|
204 | ("M-g z" . dumb-jump-go-prefer-external-other-window))
|
---|
205 | :config (setq dumb-jump-selector 'ivy) ;; (setq dumb-jump-selector 'helm)
|
---|
206 | :ensure)
|
---|
207 |
|
---|
208 | (progn
|
---|
209 | (show-paren-mode))
|
---|
210 |
|
---|
211 | ;;; Edit with root user
|
---|
212 | (use-package sudo-edit)
|
---|
213 |
|
---|
214 | ;;; Look eslint config
|
---|
215 | (defun my/use-eslint-from-node-modules ()
|
---|
216 | (let* ((root (locate-dominating-file
|
---|
217 | (or (buffer-file-name) default-directory)
|
---|
218 | "node_modules"))
|
---|
219 | (eslint
|
---|
220 | (and root
|
---|
221 | (expand-file-name "node_modules/.bin/eslint"
|
---|
222 | root))))
|
---|
223 | (when (and eslint (file-executable-p eslint))
|
---|
224 | (setq-local flycheck-javascript-eslint-executable eslint))))
|
---|
225 |
|
---|
226 | ;;; Live-checking text
|
---|
227 | (use-package flycheck
|
---|
228 | :config
|
---|
229 | (add-hook 'after-init-hook #'global-flycheck-mode)
|
---|
230 | (add-hook 'flycheck-mode-hook #'my/use-eslint-from-node-modules)
|
---|
231 | (setq-default flycheck-disabled-checkers
|
---|
232 | (append flycheck-disabled-checkers
|
---|
233 | '(javascript-jshint)))
|
---|
234 | (flycheck-add-mode 'javascript-eslint 'web-mode)
|
---|
235 | (setq-default flycheck-temp-prefix ".flycheck"))
|
---|
236 |
|
---|
237 | ;;; No tabs
|
---|
238 | (setq-default indent-tabs-mode nil)
|
---|
239 |
|
---|
240 | ;;; Version control
|
---|
241 | (use-package magit
|
---|
242 | :defer 2
|
---|
243 | :bind ("C-x g" . magit-status)
|
---|
244 | :config (setq magit-refresh-status-buffer nil))
|
---|
245 |
|
---|
246 | ;;; Magit forge (magit integration with git hostings)
|
---|
247 | (use-package forge
|
---|
248 | :after magit)
|
---|
249 |
|
---|
250 | ;;; Git flow
|
---|
251 | (use-package magit-gitflow
|
---|
252 | :after magit
|
---|
253 | :init (add-hook 'magit-mode-hook 'turn-on-magit-gitflow))
|
---|
254 |
|
---|
255 | ;;; Show added & removed git lines
|
---|
256 | (use-package git-gutter+
|
---|
257 | :ensure t
|
---|
258 | :init (global-git-gutter+-mode)
|
---|
259 | :config
|
---|
260 | (progn
|
---|
261 | (define-key git-gutter+-mode-map (kbd "C-x n") 'git-gutter+-next-hunk)
|
---|
262 | (define-key git-gutter+-mode-map (kbd "C-x p") 'git-gutter+-previous-hunk)
|
---|
263 | (define-key git-gutter+-mode-map (kbd "C-x v =") 'git-gutter+-show-hunk)
|
---|
264 | (define-key git-gutter+-mode-map (kbd "C-x r") 'git-gutter+-revert-hunks)
|
---|
265 | (define-key git-gutter+-mode-map (kbd "C-x t") 'git-gutter+-stage-hunks)
|
---|
266 | (define-key git-gutter+-mode-map (kbd "C-x c") 'git-gutter+-commit)
|
---|
267 | (define-key git-gutter+-mode-map (kbd "C-x C") 'git-gutter+-stage-and-commit)
|
---|
268 | (define-key git-gutter+-mode-map (kbd "C-x C-y") 'git-gutter+-stage-and-commit-whole-buffer)
|
---|
269 | (define-key git-gutter+-mode-map (kbd "C-x U") 'git-gutter+-unstage-whole-buffer))
|
---|
270 | :diminish (git-gutter+-mode . "gg"))
|
---|
271 |
|
---|
272 | ;;; Autoformatting code
|
---|
273 | (use-package aggressive-indent
|
---|
274 | :config (global-aggressive-indent-mode))
|
---|
275 |
|
---|
276 | ;;; 80 column width limit highlighter
|
---|
277 | (use-package column-enforce-mode
|
---|
278 | :defer t
|
---|
279 | :diminish
|
---|
280 | :config (80-column-rule)
|
---|
281 | :hook (prog-mode . column-enforce-mode))
|
---|
282 |
|
---|
283 | ;;; General autocomplete
|
---|
284 | (use-package ivy
|
---|
285 | :demand
|
---|
286 | :diminish
|
---|
287 | :config
|
---|
288 | (ivy-mode)
|
---|
289 | (setq ivy-use-virtual-buffers t)
|
---|
290 | (setq enable-recursive-minibuffers t)
|
---|
291 | (global-set-key "\C-s" 'swiper)
|
---|
292 | (global-set-key (kbd "C-c C-r") 'ivy-resume)
|
---|
293 | (global-set-key (kbd "<f6>") 'ivy-resume))
|
---|
294 |
|
---|
295 | (use-package counsel
|
---|
296 | :demand
|
---|
297 | :config
|
---|
298 | (global-set-key (kbd "M-x") 'counsel-M-x)
|
---|
299 | (global-set-key (kbd "C-x C-f") 'counsel-find-file)
|
---|
300 | (global-set-key (kbd "<f1> f") 'counsel-describe-function)
|
---|
301 | (global-set-key (kbd "<f1> v") 'counsel-describe-variable)
|
---|
302 | (global-set-key (kbd "<f1> l") 'counsel-find-library)
|
---|
303 | (global-set-key (kbd "<f2> i") 'counsel-info-lookup-symbol)
|
---|
304 | (global-set-key (kbd "<f2> u") 'counsel-unicode-char)
|
---|
305 | (global-set-key (kbd "C-c g") 'counsel-git)
|
---|
306 | (global-set-key (kbd "C-c j") 'counsel-git-grep)
|
---|
307 | (global-set-key (kbd "C-x b") 'counsel-ibuffer)
|
---|
308 | (global-set-key (kbd "C-c k") 'counsel-ag)
|
---|
309 | (global-set-key (kbd "C-x l") 'counsel-locate)
|
---|
310 | (global-set-key (kbd "C-S-o") 'counsel-rhythmbox)
|
---|
311 | (define-key minibuffer-local-map (kbd "C-r") 'counsel-minibuffer-history))
|
---|
312 |
|
---|
313 | (use-package ivy-hydra)
|
---|
314 |
|
---|
315 | (use-package company
|
---|
316 | :demand
|
---|
317 | :diminish
|
---|
318 | :custom
|
---|
319 | (company-require-match nil)
|
---|
320 | (company-minimum-prefix-length 1)
|
---|
321 | (company-idle-delay 0.1)
|
---|
322 | (company-tooltip-align-annotation t)
|
---|
323 | :hook ((prog-mode . company-mode))
|
---|
324 | :config
|
---|
325 | (add-hook 'after-init-hook 'global-company-mode)
|
---|
326 | :bind (:map company-active-map
|
---|
327 | ("C-n" . company-select-next)
|
---|
328 | ("C-p" . company-select-previous)))
|
---|
329 |
|
---|
330 | ;;;; LANGUAGES
|
---|
331 |
|
---|
332 | ;;; Python
|
---|
333 | (use-package elpy
|
---|
334 | :init
|
---|
335 | (elpy-enable)
|
---|
336 | :config
|
---|
337 | (setq elpy-rpc-python-command "python3")
|
---|
338 | (when (load "flycheck" t t)
|
---|
339 | (setq elpy-modules (delq 'elpy-module-flymake elpy-modules))
|
---|
340 | (add-hook 'elpy-mode-hook 'flycheck-mode)))
|
---|
341 |
|
---|
342 | ;;; Vue
|
---|
343 | (use-package vue-mode
|
---|
344 | :config (setq mmm-submode-decoration-level 0))
|
---|
345 |
|
---|
346 | ;;; PHP
|
---|
347 | (use-package php-mode)
|
---|
348 |
|
---|
349 | ;;; Templates
|
---|
350 | (use-package web-mode
|
---|
351 | :config
|
---|
352 | (add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
|
---|
353 | (setq web-mode-markup-indent-offset 2)
|
---|
354 | (setq web-mode-enable-auto-pairing t)
|
---|
355 | (setq web-mode-enable-current-element-highlight t)
|
---|
356 | (setq web-mode-enable-current-column-highlight t))
|
---|
357 |
|
---|
358 | ;;; Javascript
|
---|
359 | (use-package js2-mode
|
---|
360 | :config
|
---|
361 | (add-to-list 'auto-mode-alist '("\\.js\\'" . js2-mode))
|
---|
362 | (setq-default js2-basic-offset 2)
|
---|
363 | (add-hook 'js2-mode-hook
|
---|
364 | (lambda ()
|
---|
365 | (define-key js-mode-map (kbd "C-x C-e") 'nodejs-repl-send-last-expression)
|
---|
366 | (define-key js-mode-map (kbd "C-c C-j") 'nodejs-repl-send-line)
|
---|
367 | (define-key js-mode-map (kbd "C-c C-r") 'nodejs-repl-send-region)
|
---|
368 | (define-key js-mode-map (kbd "C-c C-l") 'nodejs-repl-load-file)
|
---|
369 | (define-key js-mode-map (kbd "C-c C-z") 'nodejs-repl-switch-to-repl))))
|
---|
370 |
|
---|
371 | ;;; Eslint
|
---|
372 | (use-package eslint-fix
|
---|
373 | :ensure-system-package (eslint . "npm install -g eslint")
|
---|
374 | :config
|
---|
375 | (eval-after-load 'js2-mode
|
---|
376 | '(add-hook 'js2-mode-hook (lambda () (add-hook 'after-save-hook 'eslint-fix nil t)))))
|
---|
377 |
|
---|
378 | (use-package json-mode)
|
---|
379 |
|
---|
380 | (use-package rjsx-mode
|
---|
381 | :config
|
---|
382 | (add-to-list 'auto-mode-alist '(".*\.js\'" . rjsx-mode)))
|
---|
383 |
|
---|
384 | ;;; Yasnippet
|
---|
385 | (use-package yasnippet
|
---|
386 | :demand
|
---|
387 | :diminish
|
---|
388 | :init (yas-global-mode 1))
|
---|
389 |
|
---|
390 | (use-package yasnippet-snippets
|
---|
391 | :diminish
|
---|
392 | :after yasnippet)
|
---|
393 |
|
---|
394 | ;;; LSP
|
---|
395 | (use-package lsp-mode
|
---|
396 | :hook
|
---|
397 | (ruby-mode . lsp)
|
---|
398 | (javascript-mode . lsp)
|
---|
399 | (vue-mode . lsp)
|
---|
400 | :commands lsp)
|
---|
401 |
|
---|
402 | ;;; LSP Flycheck
|
---|
403 | (use-package lsp-ui
|
---|
404 | :after (lsp-mode)
|
---|
405 | :hook lsp-mode
|
---|
406 | :commands lsp-ui-mode)
|
---|
407 |
|
---|
408 | (use-package company-lsp
|
---|
409 | :after (lsp-mode lsp-ui)
|
---|
410 | :commands company-lsp)
|
---|
411 |
|
---|
412 | ;;; Debugger
|
---|
413 | (use-package dap-mode
|
---|
414 | :config
|
---|
415 | (dap-mode 1)
|
---|
416 | (dap-ui-mode 1))
|
---|
417 |
|
---|
418 | ;;; Ruby On Rails
|
---|
419 | (use-package rinari)
|
---|
420 |
|
---|
421 | ;;; Node.js Repl
|
---|
422 | (use-package nodejs-repl)
|
---|
423 |
|
---|
424 | ;;; Haskell
|
---|
425 | (use-package haskell-mode)
|
---|
426 |
|
---|
427 | ;;; Haskell support
|
---|
428 | (use-package intero
|
---|
429 | :config (add-hook 'haskell-mode-hook 'intero-mode))
|
---|
430 |
|
---|
431 | ;;; Typescript support
|
---|
432 | (use-package typescript-mode)
|
---|
433 |
|
---|
434 | (use-package tide
|
---|
435 | :ensure t
|
---|
436 | :diminish
|
---|
437 | :after (typescript-mode company flycheck)
|
---|
438 | :hook ((typescript-mode . tide-setup)
|
---|
439 | (typescript-mode . tide-hl-identifier-mode)
|
---|
440 | (before-save . tide-format-before-save)))
|
---|
441 |
|
---|
442 | ;;; Clojure REPL
|
---|
443 | (use-package cider)
|
---|
444 |
|
---|
445 | ;;;; MISC
|
---|
446 |
|
---|
447 | ;;; Show last key and command in modeline
|
---|
448 | (use-package keycast
|
---|
449 | :config (keycast-mode))
|
---|
450 |
|
---|
451 | ;;; IRC
|
---|
452 | (use-package erc
|
---|
453 | :config
|
---|
454 | (erc-autojoin-enable)
|
---|
455 | (setq erc-autojoin-channels-alist
|
---|
456 | '(("freenode.net" "#emacs" "#wiki" "#next-browser"))))
|
---|
457 |
|
---|
458 | ;;; Show TODO, FIX in comments
|
---|
459 | (use-package fic-mode)
|
---|
460 |
|
---|
461 | (electric-pair-mode)
|
---|
462 |
|
---|
463 | ;;; Rest client
|
---|
464 | (use-package restclient)
|
---|
465 |
|
---|
466 | ;;; Telegram
|
---|
467 | (use-package telega
|
---|
468 | :config (telega-mode-line-mode 1))
|
---|
469 |
|
---|
470 | (use-package exec-path-from-shell
|
---|
471 | :config
|
---|
472 | (when (memq window-system '(mac ns x))
|
---|
473 | (exec-path-from-shell-initialize)
|
---|
474 | (exec-path-from-shell-copy-env "PATH")))
|
---|
475 |
|
---|
476 | ;; Kill whole line
|
---|
477 | (global-set-key (kbd "C-u") 'kill-whole-line)
|
---|
478 |
|
---|
479 | ;;; Volume management using thinkpad volume buttons
|
---|
480 | (use-package volume
|
---|
481 | :config
|
---|
482 | (global-set-key (kbd "<XF86AudioRaiseVolume>") 'volume-raise-10)
|
---|
483 | (global-set-key (kbd "<XF86AudioLowerVolume>") 'volume-lower-10))
|
---|
484 |
|
---|
485 | ;;; Screenshot
|
---|
486 | (use-package frameshot
|
---|
487 | :if window-system
|
---|
488 | :config (frameshot-setup
|
---|
489 | '((name . "w96k")
|
---|
490 | (height . 800)
|
---|
491 | (width . 1280))))
|
---|
492 |
|
---|
493 | ;;; Change Move to end & beginning of the line behavior
|
---|
494 | (use-package mwim
|
---|
495 | :config
|
---|
496 | (global-set-key (kbd "C-a") 'mwim-beginning)
|
---|
497 | (global-set-key (kbd "C-e") 'mwim-end))
|
---|
498 |
|
---|
499 | (use-package command-log-mode)
|
---|
500 |
|
---|
501 | ;;; Benchmark init
|
---|
502 | (use-package benchmark-init
|
---|
503 | :demand
|
---|
504 | :ensure t
|
---|
505 | :config
|
---|
506 | ;; To disable collection of benchmark data after init is done.
|
---|
507 | (add-hook 'after-init-hook 'benchmark-init/deactivate))
|
---|
508 |
|
---|
509 | ;;; Bug-Tracker DebBugs
|
---|
510 | (use-package debbugs)
|
---|
511 |
|
---|
512 | ;;; Icons
|
---|
513 | (use-package all-the-icons
|
---|
514 | :if window-system)
|
---|
515 |
|
---|
516 | ;;; Icons for dired
|
---|
517 | (use-package all-the-icons-dired
|
---|
518 | :if window-system
|
---|
519 | :diminish
|
---|
520 | :after all-the-icons
|
---|
521 | :config
|
---|
522 | (add-hook 'dired-mode-hook 'all-the-icons-dired-mode))
|
---|
523 |
|
---|
524 | ;;; Sidebar File-Manager
|
---|
525 | (use-package dired-sidebar
|
---|
526 | :after exwm
|
---|
527 | :bind (("C-x C-n" . dired-sidebar-toggle-sidebar))
|
---|
528 | :diminish
|
---|
529 | :after all-the-icons
|
---|
530 | :commands (dired-sidebar-toggle-sidebar)
|
---|
531 | :init
|
---|
532 | (add-hook 'dired-sidebar-mode-hook
|
---|
533 | (lambda ()
|
---|
534 | (unless (file-remote-p default-directory)
|
---|
535 | (auto-revert-mode))))
|
---|
536 | :config
|
---|
537 | (push 'toggle-window-split dired-sidebar-toggle-hidden-commands)
|
---|
538 | (push 'rotate-windows dired-sidebar-toggle-hidden-commands)
|
---|
539 | (setq dired-sidebar-subtree-line-prefix "__")
|
---|
540 | (setq dired-sidebar-use-term-integration t)
|
---|
541 | (setq dired-sidebar-use-custom-font t))
|
---|
542 |
|
---|
543 | ;;; Manage docker in emacs
|
---|
544 | (use-package docker
|
---|
545 | :bind ("C-c d" . docker))
|
---|
546 |
|
---|
547 | ;;; hide some minor modes
|
---|
548 | (use-package diminish
|
---|
549 | :demand)
|
---|
550 |
|
---|
551 | ;;; org
|
---|
552 | (use-package org
|
---|
553 | :config
|
---|
554 | (setq org-todo-keywords
|
---|
555 | (quote ((sequence "TODO(t)" "MIGRATE(m)" "|" "DONE(d)")
|
---|
556 | (sequence "WAITING(w@/!)" "HOLD(h@/!)" "|" "CANCELLED(c@/!)" "PHONE" "MEETING"))))
|
---|
557 | (setq org-todo-keyword-faces
|
---|
558 | (quote (("TODO" :foreground "red" :weight bold)
|
---|
559 | ("NEXT" :foreground "blue" :weight bold)
|
---|
560 | ("DONE" :foreground "forest green" :weight bold)
|
---|
561 | ("WAITING" :foreground "orange" :weight bold)
|
---|
562 | ("HOLD" :foreground "magenta" :weight bold)
|
---|
563 | ("CANCELLED" :foreground "forest green" :weight bold)
|
---|
564 | ("MEETING" :foreground "forest cyan" :weight bold)
|
---|
565 | ("PHONE" :foreground "blue" :weight bold)))))
|
---|
566 |
|
---|
567 | ;;; Smart mode line
|
---|
568 | (use-package smart-mode-line
|
---|
569 | :demand
|
---|
570 | :config
|
---|
571 | (setq sml/no-confirm-load-theme t)
|
---|
572 | (setq sml/theme 'respectful)
|
---|
573 | (sml/setup))
|
---|
574 |
|
---|
575 | ;;; Delete trailing whitespace on save
|
---|
576 | (use-package whitespace-cleanup-mode
|
---|
577 | :diminish
|
---|
578 | :config (global-whitespace-cleanup-mode))
|
---|
579 |
|
---|
580 | ;;; convert org to html in gnus
|
---|
581 | (use-package org-mime)
|
---|
582 |
|
---|
583 | ;;; Presentation
|
---|
584 | (use-package epresent)
|
---|
585 |
|
---|
586 | ;;; Email
|
---|
587 | (use-package pinentry
|
---|
588 | :config
|
---|
589 | (setq epa-pinentry-mode 'loopback)
|
---|
590 | (pinentry-start))
|
---|
591 |
|
---|
592 | ;;; Guru mode (disable arrows and stuff)
|
---|
593 | (use-package guru-mode
|
---|
594 | :diminish
|
---|
595 | :config (guru-global-mode +1))
|
---|
596 |
|
---|
597 | ;;; Hackernews
|
---|
598 | (use-package hackernews)
|
---|
599 |
|
---|
600 | ;;; PDF Tools
|
---|
601 | (use-package pdf-tools
|
---|
602 | :if window-system
|
---|
603 | :demand
|
---|
604 | :config (pdf-loader-install))
|
---|
605 |
|
---|
606 | ;;; Twitter
|
---|
607 | (use-package twittering-mode
|
---|
608 | :config (setq twittering-use-master-password t))
|
---|
609 |
|
---|
610 | ;;; Short messages
|
---|
611 | (defalias 'yes-or-no-p 'y-or-n-p)
|
---|
612 |
|
---|
613 | (setq-default confirm-nonexistent-file-or-buffer t)
|
---|
614 |
|
---|
615 | (setq
|
---|
616 | save-place-forget-unreadable-files t
|
---|
617 | save-place-limit 200)
|
---|
618 |
|
---|
619 | (save-place-mode 1)
|
---|
620 |
|
---|
621 | ;;; Show Emoji in emacs
|
---|
622 | (use-package emojify
|
---|
623 | :if window-system
|
---|
624 | :config (add-hook 'after-init-hook #'global-emojify-mode))
|
---|
625 |
|
---|
626 |
|
---|
627 | ;;; Server for editing web-forms in emacs
|
---|
628 | (use-package edit-server
|
---|
629 | :if window-system
|
---|
630 | :config (edit-server-start))
|
---|
631 |
|
---|
632 | ;;; Markdown preview
|
---|
633 | (use-package flymd)
|
---|
634 |
|
---|
635 | ;;; AG Search
|
---|
636 | (use-package ag)
|
---|
637 |
|
---|
638 | ;;; Remove permission info from dired
|
---|
639 | (defun dired-mode-setup ()
|
---|
640 | "to be run as hook for `dired-mode'."
|
---|
641 | (dired-hide-details-mode 1))
|
---|
642 | (add-hook 'dired-mode-hook 'dired-mode-setup)
|
---|
643 |
|
---|
644 | ;;; Dired Ranger like
|
---|
645 | (use-package peep-dired)
|
---|
646 |
|
---|
647 | ;;; Project Management
|
---|
648 | (use-package projectile
|
---|
649 | :diminish
|
---|
650 | :bind (("s-p" . projectile-command-map)
|
---|
651 | ("C-c p" . projectile-command-map))
|
---|
652 | :config
|
---|
653 | (projectile-global-mode))
|
---|
654 |
|
---|
655 | ;;; Editor Config support
|
---|
656 | (use-package editorconfig
|
---|
657 | :ensure t
|
---|
658 | :diminish
|
---|
659 | :config
|
---|
660 | (editorconfig-mode 1))
|
---|
661 |
|
---|
662 | ;;; Parens editing
|
---|
663 | (use-package paredit)
|
---|
664 |
|
---|
665 | ;;; Parens colorizing
|
---|
666 | (use-package rainbow-delimiters)
|
---|
667 |
|
---|
668 | ;;; Break line at 80 symbols
|
---|
669 | (use-package visual-fill-column
|
---|
670 | :config
|
---|
671 | (setq fill-column 80)
|
---|
672 | (global-visual-fill-column-mode)
|
---|
673 | (global-visual-line-mode))
|
---|
674 |
|
---|
675 | ;;; Disable mouse
|
---|
676 | (use-package disable-mouse
|
---|
677 | :diminish
|
---|
678 | :defer 5
|
---|
679 | :config (global-disable-mouse-mode))
|
---|
680 |
|
---|
681 |
|
---|
682 | (setq create-lockfiles nil)
|
---|
683 | (setq
|
---|
684 | make-backup-files nil ; disable backup files
|
---|
685 | auto-save-list-file-name nil ; disable .saves files
|
---|
686 | auto-save-default nil ; disable auto saving
|
---|
687 | ring-bell-function 'ignore) ; turn off alarms completely
|
---|
688 |
|
---|
689 | ;;; No savefiles
|
---|
690 | (progn
|
---|
691 | (setq make-backup-files nil)
|
---|
692 | (setq auto-save-default nil)
|
---|
693 | (setq create-lockfiles nil))
|
---|
694 |
|
---|
695 | ;;; Org-mode Setup
|
---|
696 | (setq org-agenda-files (list
|
---|
697 | "~/Documents/life.org"))
|
---|
698 |
|
---|
699 | ;;; Pomodoro technique tracking for org-mode
|
---|
700 | (use-package org-pomodoro)
|
---|
701 |
|
---|
702 | ;;; Hugo org exporter
|
---|
703 | (use-package ox-hugo
|
---|
704 | :after oxxb
|
---|
705 | :config
|
---|
706 | (setq org-hugo-default-section-directory "posts")
|
---|
707 | (setq HUGO_BASE_DIR "~/github/w96k.gitlab.io/content/"))
|
---|
708 |
|
---|
709 | ;;; Accounting
|
---|
710 | (use-package ledger-mode)
|
---|
711 |
|
---|
712 | ;;; Diary
|
---|
713 | (use-package org-journal)
|
---|
714 |
|
---|
715 | ;;; Lilypond
|
---|
716 | (progn
|
---|
717 | (autoload 'lilypond "lilypond")
|
---|
718 | (autoload 'lilypond-mode "lilypond-mode")
|
---|
719 | (setq auto-mode-alist
|
---|
720 | (cons '("\\.ly$" . LilyPond-mode) auto-mode-alist))
|
---|
721 | (add-hook 'LilyPond-mode-hook (lambda () (turn-on-font-lock))))
|
---|
722 |
|
---|
723 | ;;; Flycheck lilypond
|
---|
724 | (use-package flycheck-lilypond)
|
---|
725 |
|
---|
726 | ;;; Publishing system
|
---|
727 | (use-package muse)
|
---|
728 |
|
---|
729 | ;; (global-set-key [(control ?h)] 'delete-backward-char)
|
---|
730 | (custom-set-variables
|
---|
731 | ;; custom-set-variables was added by Custom.
|
---|
732 | ;; If you edit it by hand, you could mess it up, so be careful.
|
---|
733 | ;; Your init file should contain only one such instance.
|
---|
734 | ;; If there is more than one, they won't work right.
|
---|
735 | '(company-idle-delay 0.1)
|
---|
736 | '(company-minimum-prefix-length 1)
|
---|
737 | '(company-require-match nil)
|
---|
738 | '(company-tooltip-align-annotation t t)
|
---|
739 | '(package-selected-packages
|
---|
740 | (quote
|
---|
741 | (simple-httpd web-server ox-twbst ox-twbs org-mode yasnippet-snippets whitespace-cleanup-mode web-mode w3m vue-mode volume use-package-ensure-system-package undo-tree twittering-mode tide theme-magic telega symon sudoku sudo-edit smart-mode-line sed-mode rjsx-mode rinari restclient restart-emacs rainbow-delimiters quelpa-use-package projectile prettier-js powerline pinentry php-mode peep-dired pdf-tools paredit paradox ox-hugo org-pomodoro org-mime org-journal org-bullets nodejs-repl mwim muse moody matrix-client magithub magit-gitflow lsp-ui leerzeichen ledger-mode keycast kaolin-themes ivy-hydra intero highlight-indent-guides hackernews guru-mode git-gutter git-gutter+ frameshot forge flymd flycheck-lilypond fic-mode exwm exec-path-from-shell eslint-fix epresent emojify elpy editorconfig edit-server dumb-jump doom-modeline dockerfile-mode docker disable-mouse dired-sidebar diminish debbugs dashboard dap-mode counsel company-lsp command-log-mode column-enforce-mode color-theme-sanityinc-tomorrow cider benchmark-init all-the-icons-dired aggressive-indent ag))))
|
---|
742 | (custom-set-faces
|
---|
743 | ;; custom-set-faces was added by Custom.
|
---|
744 | ;; If you edit it by hand, you could mess it up, so be careful.
|
---|
745 | ;; Your init file should contain only one such instance.
|
---|
746 | ;; If there is more than one, they won't work right.
|
---|
747 | )
|
---|