Add non-vc backed project backend
This commit is contained in:
parent
21df11c7c2
commit
d39d3b2d41
9
init.el
9
init.el
@ -527,6 +527,8 @@ visual states."
|
|||||||
(stringp val)))
|
(stringp val)))
|
||||||
(defvar my/-project-run-history '()
|
(defvar my/-project-run-history '()
|
||||||
"Commands previously run with `my/project-run'")
|
"Commands previously run with `my/project-run'")
|
||||||
|
(defvar my/project-root-marker ".project-root"
|
||||||
|
"Marker file to look for in non-vc backed projects.")
|
||||||
(defun my/project-get-root-dir ()
|
(defun my/project-get-root-dir ()
|
||||||
"Get the root dir for the current project"
|
"Get the root dir for the current project"
|
||||||
(let* ((proj (project-current nil))
|
(let* ((proj (project-current nil))
|
||||||
@ -559,7 +561,12 @@ COMMAND and COMINT are like `compile'."
|
|||||||
(compile-command nil))
|
(compile-command nil))
|
||||||
(compile command comint)
|
(compile command comint)
|
||||||
(when (not my/project-run-command)
|
(when (not my/project-run-command)
|
||||||
(setq my/project-run-command command)))))
|
(setq my/project-run-command command))))
|
||||||
|
:config
|
||||||
|
(defun my/project-try-dotfile (dir)
|
||||||
|
(if-let (root (locate-dominating-file dir my/project-root-marker))
|
||||||
|
(list 'vc nil root)))
|
||||||
|
(add-hook 'project-find-functions #'my/project-try-dotfile))
|
||||||
|
|
||||||
;; nxml
|
;; nxml
|
||||||
(use-package nxml-mode
|
(use-package nxml-mode
|
||||||
|
Loading…
Reference in New Issue
Block a user