Add new projects types, binding for project-root-find-file.
This commit is contained in:
parent
28d5418644
commit
c46c2aa8f5
25
init.el
25
init.el
@ -155,14 +155,26 @@ Return a list of installed packages or nil for every package not installed."
|
|||||||
|
|
||||||
(require 'project-root)
|
(require 'project-root)
|
||||||
(setq project-roots
|
(setq project-roots
|
||||||
`(("Tox Project"
|
`(("ensisme project"
|
||||||
|
:root-contains-files (".ensime")
|
||||||
|
:filename-regex ,(regexify-ext-list '(scala sbt))
|
||||||
|
:exclude-paths ("build" "target" ".ensime_cache" ".git"))
|
||||||
|
("tox project"
|
||||||
:root-contains-files ("tox.ini")
|
:root-contains-files ("tox.ini")
|
||||||
:filename-regex (regexify-ext-list '(py)))
|
:filename-regex ,(regexify-ext-list '(py)))
|
||||||
("Python Project"
|
(".emacs.d project"
|
||||||
|
:root-contains-files ("init.el")
|
||||||
|
:filename-regex ,(regexify-ext-list '(el))
|
||||||
|
:exclude-paths (".git"))
|
||||||
|
("python project"
|
||||||
:root-contains-files (".git" "setup.py")
|
:root-contains-files (".git" "setup.py")
|
||||||
:filename-regex (regexify-ext-list '(py)))
|
:filename-regex ,(regexify-ext-list '(py)))
|
||||||
("Git project"
|
("git project"
|
||||||
:root-contains-files (".git"))))
|
:root-contains-files (".git"))
|
||||||
|
("sbt project"
|
||||||
|
:root-contains-files ("build.sbt")
|
||||||
|
:filename-regex ,(regexify-ext-list '(scala sbt))
|
||||||
|
:exclude-paths ("build" "target"))))
|
||||||
|
|
||||||
(setq custom-file "~/.emacs.d/custom.el")
|
(setq custom-file "~/.emacs.d/custom.el")
|
||||||
(when (file-exists-p custom-file) (load custom-file))
|
(when (file-exists-p custom-file) (load custom-file))
|
||||||
@ -298,6 +310,7 @@ Return a list of installed packages or nil for every package not installed."
|
|||||||
(global-unset-key (kbd "C-o"))
|
(global-unset-key (kbd "C-o"))
|
||||||
(global-set-key (kbd "C-x w") 'whitespace-mode)
|
(global-set-key (kbd "C-x w") 'whitespace-mode)
|
||||||
(global-set-key (kbd "C-x C-r") (lambda () (interactive) (revert-buffer t t)))
|
(global-set-key (kbd "C-x C-r") (lambda () (interactive) (revert-buffer t t)))
|
||||||
|
(global-set-key (kbd "C-x f") 'project-root-find-file)
|
||||||
(global-set-key (kbd "M-g") 'goto-line)
|
(global-set-key (kbd "M-g") 'goto-line)
|
||||||
(global-set-key (kbd "C-M-;") 'comment-dwim)
|
(global-set-key (kbd "C-M-;") 'comment-dwim)
|
||||||
(global-set-key (kbd "C-c t") 'pytest-one)
|
(global-set-key (kbd "C-c t") 'pytest-one)
|
||||||
|
Loading…
Reference in New Issue
Block a user