Commit 4d379997f8e3
Changed files (1)
tools
emacs
config
tools/emacs/config/config-projects.el
@@ -22,10 +22,21 @@
("C-x p s" . vde-project-vterm)
("C-x p X" . vde-project-run-in-vterm)
("C-x p G" . checkout-github-pr))
+ :init
+ (require project-rootfile)
+ (add-to-list 'project-find-functions #'project-rootfile-try-detect t)
+ (setq project-rootfile-list '(".project"
+ "default.nix" "flake.nix" ; nix
+ "Makefile" "GNUMakefile" "CMakeLists.txt" ; Make & CMake
+ "Cask" "Eldev" "Keg" "Eask" ; Emacs
+ "stack.yaml" ; Haskell
+ "Cargo.toml" ; Rust
+ "go.mod" ; Go
+ ))
:config
(setq vde/project-local-identifier '(".project")) ;; "go.mod"
- (add-hook 'project-find-functions #'vde/project-try-local)
+ ;; (add-hook 'project-find-functions #'vde/project-try-local)
(setq-default project-compilation-buffer-name-function 'project-prefixed-buffer-name)
(defun vde-project-magit-status ()
@@ -51,7 +62,6 @@ switch to it. Otherwise, create a new vterm shell."
(when command
(vterm-send-string command)
(vterm-send-return))))
- :config
(general-leader
"p" '(:ignore :which-key "Project")
"pp" #'(project-switch-project :which-key "Switch to Project")