-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path+misc.el
135 lines (108 loc) · 4.22 KB
/
+misc.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
;;; ~/.doom.d/+misc.el -*- lexical-binding: t; -*-
(use-package! screenshot
:defer t)
(use-package! keycast
:defer t)
(after! ssh-deploy
(setq ssh-deploy-automatically-detect-remote-changes 1))
(use-package! imenu-list
:defer t
:config
(set-popup-rules! '(("^\\*Ilist\\*" :side right :size 40 :select t))))
(add-hook! 'better-jumper-post-jump-hook #'recenter)
(after! nav-flash
(defun +advice/nav-flash-show (orig-fn &rest args)
(ignore-errors (apply orig-fn args)))
(advice-add 'nav-flash-show :around #'+advice/nav-flash-show))
(after! dired
:config
(when (string= system-type "darwin")
(setq dired-use-ls-dired t
insert-directory-program "gls")))
(use-package! dired-x
:config
(setq dired-omit-files
(concat dired-omit-files "\\|^\\..*$")))
(use-package! diredfl
:hook
((dired-mode . diredfl-mode))
:config
(set-face-attribute 'diredfl-dir-name nil :bold t))
(after! dash-docs
(setq dash-docs-use-workaround-for-emacs-bug nil)
(setq dash-docs-browser-func 'browse-url-generic))
(remove-hook! '(prog-mode-hook text-mode-hook conf-mode-hook) #'highlight-indent-guides-mode)
(use-package! citre
:defer t
:init
(require 'citre-config)
:config
;; better jump set marker
(advice-add #'citre-jump :around #'doom-set-jump-a)
(remove-hook! 'citre-after-jump-hook #'citre-recenter-and-blink)
(add-hook 'citre-after-jump-hook #'+nav-flash-blink-cursor-maybe-h)
(setq
;; Set this if you use project management plugin like projectile. It's
;; used for things like displaying paths relatively, see its docstring.
citre-project-root-function #'projectile-project-root
;; Set this if you want to always use one location to create a tags file.
citre-default-create-tags-file-location 'package-cache
;; See the "Create tags file" section above to know these options
citre-use-project-root-when-creating-tags t
citre-prompt-language-for-ctags-command t))
;; By default, when you open any file, and a tags file can be found for it,
;; `citre-mode' is automatically enabled. If you only want this to work for
;; certain modes (like `prog-mode'), set it like this.
;; citre-auto-enable-citre-mode-modes '(prog-mode)
(use-package! go-translate
:defer t
:config
(setq gts-translate-list '(("en" "ru") ("ru" "en") ("en" "de")))
(setq gts-default-translator
(gts-translator
:picker (gts-prompt-picker)
:engines (list (gts-google-engine) (gts-google-rpc-engine))
:render (gts-buffer-render))))
(after! quickrun
;; quickrun--language-alist
(when (featurep :system 'macos)
(quickrun-set-default "c++" "c++/g++")))
(after! projectile
(setq compilation-read-command nil) ; no prompt in projectile-compile-project
;; . -> Build
(projectile-register-project-type 'cmake '("CMakeLists.txt")
:configure "cmake %s"
:compile "cmake --build build --config Debug --target all -j 14 --"
:test "ctest -j14 -C Debug -T test --output-on-failure"))
(when (modulep! :completion vertico)
;; Fix jump issue for vertico, https://github.com/hlissner/doom-emacs/issues/5386
(dolist (func '(+default/search-project))
(advice-add func :around #'doom-set-jump-a)))
(after! eshell
;; eshell-mode imenu index
(add-hook! 'eshell-mode-hook (setq-local imenu-generic-expression '(("Prompt" " λ \\(.*\\)" 1))))
(defun eshell/l (&rest args) (eshell/ls "-l" args))
(defun eshell/e (file) (find-file file))
(defun eshell/md (dir) (eshell/mkdir dir) (eshell/cd dir))
(defun eshell/ft (&optional arg) (treemacs arg))
(defun eshell/up (&optional pattern)
(let ((p (locate-dominating-file
(f-parent default-directory)
(lambda (p)
(if pattern
(string-match-p pattern (f-base p))
t)))))
(eshell/pushd p))))
(after! term
(add-hook! 'term-mode-hook (setq-local imenu-generic-expression '(("Prompt" "➜\\(.*\\)" 1)))))
(use-package! super-save
:config
(super-save-mode +1)
(setq super-save-auto-save-when-idle t))
(use-package! hackernews
:commands (hackernews))
(use-package! tokei
:commands (tokei))
(use-package! auto-sudoedit
:config
(auto-sudoedit-mode 1))