-
Notifications
You must be signed in to change notification settings - Fork 1
/
про-управление-проектами.el
223 lines (184 loc) · 6.97 KB
/
про-управление-проектами.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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
;;; про-управление-проектами.el --- Управление проектами -*- lexical-binding: t -*-
;;; Commentary:
;;; Code:
;;;; Модуль для работы с проектами
(use-package projectile
:defer t
:ensure t
:defines (projectile-command-map)
:custom ((projectile-sort-order 'recently-active)
;(projectile-project-search-path '("~/Проекты/"))
(projectile-switch-project-action #'projectile-dired))
:bind (:map projectile-command-map
("ss" . consult-ag))
:config
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
(projectile-mode t))
;;;; Заметки к проекту
(use-package org-projectile
:defer t
:ensure t
:functions (org-projectile-per-project)
:defines (org-projectile-per-project-filepath)
:after (projectile org)
:bind (:map projectile-mode-map
("C-c pt" . org-projectile-project-todo-completing-read)
("C-c c" . org-projectile-capture-for-current-project))
:config
(setq org-projectile-per-project-filepath "TODO.org")
;(setq org-agenda-files (append org-agenda-files (org-projectile-todo-files)))
;; (progn
;; (setq org-projectile-projects-file
;; "/Projects/projects.org")
;; (setq org-agenda-files (append org-agenda-files (org-projectile-todo-files)))
;; (push (org-projectile-project-todo-entry) org-capture-templates))
:init
(org-projectile-per-project))
(cl-defun org-projectile-capture-for-current-project
(&rest additional-options &key capture-template &allow-other-keys)
"Capture a TODO for the current active project.
If CAPTURE-TEMPLATE is provided use it as the capture template
for the TODO. ADDITIONAL-OPTIONS will be supplied as though they
were part of the capture template definition."
(declare (obsolete org-project-capture-capture-for-current-project "3.0.1"))
(interactive)
(let ((project-name
(org-project-capture-current-project
(org-project-capture-strategy-get-backend org-projectile-strategy)))
(project-file (if (file-exists-p (concat (projectile-project-root) "ЧТОДЕЛ.org"))
(concat (projectile-project-root) "ЧТОДЕЛ.org")
(concat projectile-project-root "todo.org"))))
(print project-file)
(if project-name
(occ-capture
(make-instance 'occ-context
:category project-name
:template (or capture-template
org-project-capture-capture-template)
:options (append additional-options `(:file ,project-file))
:strategy org-projectile-strategy))
(error (format "%s is not a recognized project."
project-name)))))
;; (cl-defun org-projectile-capture-for-current-project
;; (&rest additional-options &key capture-template &allow-other-keys)
;; "Capture a TODO for the current active project.
;; If CAPTURE-TEMPLATE is provided use it as the capture template
;; for the TODO. ADDITIONAL-OPTIONS will be supplied as though they
;; were part of the capture template definition."
;; (declare (obsolete org-project-capture-capture-for-current-project "3.0.1"))
;; (interactive)
;; (let* ((project-root (org-project-capture-current-project-root
;; (org-project-capture-strategy-get-backend org-projectile-strategy)))
;; (project-file (if (file-exists-p (concat project-root "ЧТОДЕЛ.org"))
;; (concat project-root "ЧТОДЕЛ.org")
;; (concat project-root "todo.org")))
;; (project-name
;; (org-project-capture-current-project
;; (org-project-capture-strategy-get-backend org-projectile-strategy))))
;; (if project-name
;; (occ-capture
;; (make-instance 'occ-context
;; :category project-name
;; :template (or capture-template
;; org-project-capture-capture-template)
;; :options (append additional-options `(:file ,project-file))
;; :strategy org-projectile-strategy))
;; (error (format "%s is not a recognized project."
;; project-name)))))
;;;; Текстовые меню - Transient
(require 'установить-из)
;; (use-package transient
;; :init (установить-из :repo "magit/transient" :name "transient"))
;(add-to-list 'package--builtin-versions '(transient 0 4 3))
;;;; Система контроля версий Git
(use-package magit
:defer t
:after transient
:ensure t
:custom ((magit-log-margin '(t age-abbreviated magit-log-margin-width t 7))
(magit-after-save-refresh-buffers t))
:init
(add-hook 'magit-process-find-password-functions
'magit-process-password-auth-source))
;; Кто это сделал?
(use-package blamer
:defer t
:ensure t
:bind (("C-c M-i" . blamer-show-commit-info)
("C-c M-b" . blamer-mode))
:defer t
:custom
(blamer-idle-time 0.3)
(blamer-min-offset 10)
:custom-face
(blamer-face ((t :foreground "#9099AB"
:background "#AB9990"
:height .9
:italic t))))
;; Улучшенная раскраска git diff
;; (use-package magit-delta
;; :ensure t
;; :after magit
;; :commands magit-delta-mode
;; :hook (magit-mode . magit-delta-mode))
;; Показываем незакоммиченные участки слева
(use-package diff-hl
:defer t
:ensure t
:functions (global-diff-hl-mode)
;;:hook
;; (dired-mode . diff-hl-dired-mode-unless-remote)
:custom
(diff-hl-side 'right)
:config
(global-diff-hl-mode -1))
;;;; Машина времени для GIT
(use-package git-timemachine
:defer t
:ensure t)
;;;; Управление Github и Gitlab
;; (use-package forge
;; :ensure t
;; :after magit
;; :config
;; (transient-append-suffix 'forge-dispatch '(0)
;; ["Edit"
;; ("e a" "assignees" forge-edit-topic-assignees)
;; ("e r" "review requests" forge-edit-topic-review-requests)]))
;;;; Автоматизация проекта
(use-package prodigy
:defer t
:ensure t)
;;;; Контейнеры
(use-package docker
:defer t
:ensure t
:init
:config)
(use-package dockerfile-mode
:defer t
:ensure t
:init
:config)
;; (use-package slime-docker
;; :ensure t
;; :init
;; :config)
(use-package docker-compose-mode
:defer t
:ensure t
:init
:config)
;; (use-package docker-tramp
;; :ensure t
;; :init
;; :config)
;;;; Поддержка Gitlab
(use-package gitlab
:defer t
:ensure t)
;; (use-package lab
;; :init (установить-из :repo "isamert/lab.el"))
;;(use-package github :ensure t)
(provide 'про-управление-проектами)
;;; про-управление-проектами.el ends here