counsel-projectile: preselect current project
This commit is contained in:
parent
9abc3463b9
commit
2611d99ac1
1 changed files with 3 additions and 4 deletions
|
|
@ -117,10 +117,9 @@ With a prefix ARG invalidates the cache first."
|
|||
With a prefix ARG invalidates the cache first."
|
||||
(interactive "P")
|
||||
(ivy-read (projectile-prepend-project-name "Switch to project: ")
|
||||
(if (projectile-project-p)
|
||||
(cons (abbreviate-file-name (projectile-project-root))
|
||||
(projectile-relevant-known-projects))
|
||||
projectile-known-projects)
|
||||
projectile-known-projects
|
||||
:preselect (and (projectile-project-p)
|
||||
(abbreviate-file-name (projectile-project-root)))
|
||||
:action (lambda (dir)
|
||||
(projectile-switch-project-by-name dir arg))
|
||||
:require-match t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue