diff options
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/.emacs.d/init.org | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/emacs/.emacs.d/init.org b/emacs/.emacs.d/init.org index 58300552..84609ac2 100644 --- a/emacs/.emacs.d/init.org +++ b/emacs/.emacs.d/init.org @@ -479,22 +479,6 @@ based upon some folder conventions I use. (projectile-global-mode) (add-to-list 'projectile-globally-ignored-directories ".stversions") - (defun directory-directories (dir) - (seq-filter #'file-directory-p - (directory-files dir t (rx string-start - (char alnum))))) - - (defun project-directories (start-dir) - (seq-map (lambda (x) (file-relative-name x start-dir)) - (seq-mapcat #'directory-directories - (seq-mapcat #'directory-directories - (directory-directories start-dir))))) - - (defun ap/open-subfolder-project (from-dir &optional arg) - (let ((project-dir (projectile-completing-read "Open project: " - (project-directories from-dir)))) - (projectile-switch-project-by-name (expand-file-name project-dir from-dir) arg))) - (defun yarn-install (&optional arg) (interactive "P") (projectile-with-default-dir (projectile-project-root) @@ -517,7 +501,11 @@ based upon some folder conventions I use. (defun ap/open-project (&optional arg) (interactive "P") - (ap/open-subfolder-project projects-root-directory arg)) + (let ((project-dir (projectile-completing-read + "Open project: " + (ghq--find-projects)))) + (projectile-switch-project-by-name + (expand-file-name project-dir (ghq--find-root)) arg))) (setq projectile-switch-project-action #'projectile-commander projectile-completion-system 'ivy))) |