-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Now has hard dependency on projectile #12
Comments
Thank @articuluxe, I'll think about it and try to remove projectile when I have time. |
Hey, |
Hey,
Here is a simple one:
;; Bridge projectile and project together so packages that depend on project
;; like eglot work
(defun my-projectile-project-find-function (dir)
(let ((root (projectile-project-root dir)))
(and root (cons 'transient root))))
(projectile-mode t)
(with-eval-after-load 'project
(add-to-list 'project-find-functions 'my-projectile-project-find-function))
And here is a more complex one, that seems better, but I have not personally used it:
(defun m/projectile-project-find-function (dir)
(let ((root (projectile-project-root dir)))
(and root (cons 'my/projectile root))))
(cl-defmethod project-root ((pr (head my/projectile)))
(cdr pr))
(cl-defmethod project-files ((pr (head my/projectile)) &optional _dirs)
(let ((root (cdr pr)))
(mapcar
(lambda (file)
(concat root file))
(projectile-project-files root))))
(cl-defmethod project-ignores ((pr (head my/projectile)) _dir)
(let ((default-directory (cdr pr)))
(projectile-patterns-to-ignore)))
(with-eval-after-load 'project
(add-to-list 'project-find-functions 'm/projectile-project-find-function)
cf. joaotavora/eglot#697 <joaotavora/eglot#697>
… On Jul 4, 2021, at 9:07 AM, titibandit ***@***.***> wrote:
Hey,
@articuluxe <https://github.com/articuluxe>, you said that one can have projectile support in project.el by adding a few line. I'm not sure how I could go about that?
I'm using projectile, and I can't use the function multi-vterm-project anymore, since it complains about the project-root variable being empty.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#12 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAYO2SJ445Q4NBBN57IFD73TWBTJTANCNFSM4OE4U3BA>.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How about using project.el instead? Built in to emacs, can have projectile support added easily with a few lines.
The text was updated successfully, but these errors were encountered: