feat(emacs): search project
This commit is contained in:
@@ -34,13 +34,6 @@ directory itself."
|
|||||||
"Change the working directory to the root of the current project."
|
"Change the working directory to the root of the current project."
|
||||||
(cd (syd-project-root)))
|
(cd (syd-project-root)))
|
||||||
|
|
||||||
(defun syd-project-search ()
|
|
||||||
(interactive)
|
|
||||||
(require 'syd-file)
|
|
||||||
;; TODO: Prompt for path project root is not found.
|
|
||||||
;; TODO: Respect gitignore.
|
|
||||||
(syd-search-directory (syd-project-root)))
|
|
||||||
|
|
||||||
(with-eval-after-load 'project ; Built-in
|
(with-eval-after-load 'project ; Built-in
|
||||||
;; Stay out of my config directory!
|
;; Stay out of my config directory!
|
||||||
(setq project-list-file (file-name-concat syd-cache-dir "known-projects"))
|
(setq project-list-file (file-name-concat syd-cache-dir "known-projects"))
|
||||||
@@ -64,6 +57,16 @@ directory itself."
|
|||||||
(add-to-list 'project-switch-commands
|
(add-to-list 'project-switch-commands
|
||||||
(funcall switch-cmd #'syd-project-root-find-file "Browse"))))
|
(funcall switch-cmd #'syd-project-root-find-file "Browse"))))
|
||||||
|
|
||||||
|
(defun syd-project-search ()
|
||||||
|
(interactive)
|
||||||
|
;; TODO: Prompt for path project root is not found.
|
||||||
|
;; TODO: Respect gitignore.
|
||||||
|
(syd-search-directory (syd-project-root)))
|
||||||
|
|
||||||
|
(general-def
|
||||||
|
:prefix-map 'syd-leader-map
|
||||||
|
"/" `("Search project" . ,#'syd-project-search))
|
||||||
|
|
||||||
;; Projection provides a Projectile-like project management library atop
|
;; Projection provides a Projectile-like project management library atop
|
||||||
;; Emacs built-in project.el. It's more lightweight, while still featureful.
|
;; Emacs built-in project.el. It's more lightweight, while still featureful.
|
||||||
(use-package projection
|
(use-package projection
|
||||||
|
|||||||
Reference in New Issue
Block a user