summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--tag-emacs/emacs.d/init.org65
1 files changed, 32 insertions, 33 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index a522628..a41c341 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -212,45 +212,44 @@ ones.  I added a couple of functions to allow me to open new projects
 based upon some folder conventions I use.
 
 #+BEGIN_SRC emacs-lisp
-(use-package projectile
-  :bind (("C-c C-f" . projectile-find-file)
-         ("s-x s-f" . projectile-find-file)
-         ("C-x g" . projectile-vc)
-         ("s-G"   . projectile-vc))
-  :init (projectile-global-mode)
-  :diminish projectile-mode
-  :config (progn
-            (defun ap/subfolder-projects (dir)
-              (--map (file-relative-name it dir)
-                     (-filter (lambda (subdir)
-                                (--reduce-from (or acc (funcall it subdir)) nil
-                                               projectile-project-root-files-functions))
-                              (-filter #'file-directory-p (directory-files dir t "\\<")))))
-
-            (defun ap/-add-known-subfolder-projects (dir)
-              (-map #'projectile-add-known-project (--map (concat (file-name-as-directory dir) it) (ap/subfolder-projects dir))))
+  (use-package projectile
+    :bind (("C-c C-f" . projectile-find-file)
+           ("s-x s-f" . projectile-find-file)
+           ("C-x g" . projectile-vc)
+           ("s-G"   . projectile-vc))
+    :init (projectile-global-mode)
+    :diminish projectile-mode
+    :config (progn
+              (defun ap/subfolder-projects (dir)
+                (--map (file-relative-name it dir)
+                       (-filter (lambda (subdir)
+                                  (--reduce-from (or acc (funcall it subdir)) nil
+                                                 projectile-project-root-files-functions))
+                                (-filter #'file-directory-p (directory-files dir t "\\<")))))
 
-            (defun ap/add-known-subfolder-projects ()
-              (interactive)
-              (ap/-add-known-subfolder-projects (read-directory-name "Add projects under: ")))
+              (defun ap/-add-known-subfolder-projects (dir)
+                (-map #'projectile-add-known-project (--map (concat (file-name-as-directory dir) it) (ap/subfolder-projects dir))))
 
-            (defun ap/open-subfolder-project (from-dir &optional arg)
-              (let ((project-dir (projectile-completing-read "Open project: "
-                                                             (ap/subfolder-projects from-dir))))
-                (projectile-switch-project-by-name (expand-file-name project-dir from-dir) arg)))
+              (defun ap/add-known-subfolder-projects ()
+                (interactive)
+                (ap/-add-known-subfolder-projects (read-directory-name "Add projects under: ")))
 
-            (defun ap/open-work-project (&optional arg)
-              (interactive "P")
-              (ap/open-subfolder-project work-project-directory arg))
+              (defun ap/open-subfolder-project (from-dir &optional arg)
+                (let ((project-dir (projectile-completing-read "Open project: "
+                                                               (ap/subfolder-projects from-dir))))
+                  (projectile-switch-project-by-name (expand-file-name project-dir from-dir) arg)))
 
-            (defun ap/open-home-project (&optional arg)
-              (interactive "P")
-              (ap/open-subfolder-project home-project-directory arg))
+              (defun ap/open-work-project (&optional arg)
+                (interactive "P")
+                (ap/open-subfolder-project work-project-directory arg))
 
+              (defun ap/open-home-project (&optional arg)
+                (interactive "P")
+                (ap/open-subfolder-project home-project-directory arg))
 
-            (setq projectile-switch-project-action #'projectile-dired
-                  projectile-remember-window-configs t
-                  projectile-completion-system 'ivy)))
+              (setq projectile-switch-project-action #'projectile-dired
+                    projectile-remember-window-configs t
+                    projectile-completion-system 'ivy)))
 #+END_SRC
 
 ** perspective