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)))
|
||||
(defvar my/-project-run-history '()
|
||||
"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 ()
|
||||
"Get the root dir for the current project"
|
||||
(let* ((proj (project-current nil))
|
||||
@ -559,7 +561,12 @@ COMMAND and COMINT are like `compile'."
|
||||
(compile-command nil))
|
||||
(compile command comint)
|
||||
(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
|
||||
(use-package nxml-mode
|
||||
|
Loading…
Reference in New Issue
Block a user