Archived
1
0
Fork 0

cleanup and tune persp-mode and projectile

This commit is contained in:
KemoNine 2022-08-26 10:25:29 -04:00
parent d49c6a7b60
commit 50c17ff520
4 changed files with 27 additions and 22 deletions

3
.gitignore vendored
View file

@ -10,4 +10,5 @@ org/deft
**/beancount-mode **/beancount-mode
**/transient **/transient
**/.org-id-locations **/.org-id-locations
**/xapian-lite.so **/xapian-lite.so
**/projectile.cache

View file

@ -66,6 +66,30 @@
; misc config ; misc config
(set-default 'truncate-lines t) (set-default 'truncate-lines t)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; projectile
(projectile-mode +1)
(define-key projectile-mode-map (kbd "C-c j") 'projectile-command-map)
(setq projectile-mode-line-function '(lambda () (format " [%s]" (projectile-project-name))))
;(setq projectile-project-search-path '("~/../src/"))
(require 'helm-projectile)
(helm-projectile-on)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; persp-mode
(diminish 'projectile-mode)
(with-eval-after-load "persp-mode-projectile-bridge-autoloads"
(add-hook 'persp-mode-projectile-bridge-mode-hook
#'(lambda ()
(if persp-mode-projectile-bridge-mode
(persp-mode-projectile-bridge-find-perspectives-for-all-buffers)
(persp-mode-projectile-bridge-kill-perspectives))))
(add-hook 'after-init-hook
#'(lambda ()
(persp-mode-projectile-bridge-mode 1))
t))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; programming ; programming
; general ; general

View file

@ -345,16 +345,6 @@
(add-to-list 'helm-completing-read-handlers-alist '(org-capture . helm-org-completing-read-tags)) (add-to-list 'helm-completing-read-handlers-alist '(org-capture . helm-org-completing-read-tags))
(add-to-list 'helm-completing-read-handlers-alist '(org-set-tags . helm-org-completing-read-tags)) (add-to-list 'helm-completing-read-handlers-alist '(org-set-tags . helm-org-completing-read-tags))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; projectile
(projectile-mode +1)
(define-key projectile-mode-map (kbd "C-c j") 'projectile-command-map)
(setq projectile-mode-line-function '(lambda () (format " [%s]" (projectile-project-name))))
;(setq projectile-project-search-path '("~/../src/"))
(require 'helm-projectile)
(helm-projectile-on)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; persp-mode ; persp-mode
(setq persp-auto-resume-time 0.25) (setq persp-auto-resume-time 0.25)
@ -363,16 +353,6 @@
(setq wg-morph-on nil) ;; switch off animation (setq wg-morph-on nil) ;; switch off animation
(setq persp-autokill-buffer-on-remove 'kill-weak) (setq persp-autokill-buffer-on-remove 'kill-weak)
(add-hook 'window-setup-hook #'(lambda () (persp-mode 1)))) (add-hook 'window-setup-hook #'(lambda () (persp-mode 1))))
(with-eval-after-load "persp-mode-projectile-bridge-autoloads"
(add-hook 'persp-mode-projectile-bridge-mode-hook
#'(lambda ()
(if persp-mode-projectile-bridge-mode
(persp-mode-projectile-bridge-find-perspectives-for-all-buffers)
(persp-mode-projectile-bridge-kill-perspectives))))
(add-hook 'after-init-hook
#'(lambda ()
(persp-mode-projectile-bridge-mode 1))
t))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; diminish config ; diminish config

View file

@ -142,7 +142,7 @@
(with-eval-after-load "persp-mode-autoload" (with-eval-after-load "persp-mode-autoload"
(with-eval-after-load "org" (with-eval-after-load "org"
(persp-def-auto-persp "KmN" (persp-def-auto-persp "kmn"
:mode-name ".*org-mode.*" :mode-name ".*org-mode.*"
:noauto :noauto
:dyn-env '(after-switch-to-buffer-functions ;; prevent recursion :dyn-env '(after-switch-to-buffer-functions ;; prevent recursion