You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thanks for this great package! I've been using it for quite some time. Very neat and very useful!
Can we switch to depending on the project.el (built-in), instead of the projectile.el?
Currently, functions platformio-conditionally-enable and platformio--exec have been modified, in my local installation, to use project.el and look like this:
(defunplatformio-conditionally-enable ()
"Enable `platformio-mode' only when a `platformio.ini' file is present in project root."
(condition-casenil
(let* ((ini "platformio.ini")
(files (project-files (project-currentt)))
(match (string-match-p ini (format"%s"files))))
(whenmatch
(platformio-mode 1)))
(errornil)))
(defunplatformio--exec (target)
"Call `platformio ... TARGET' in the root of the project."
(let* ((project (project-currentt))
(default-directory (project-root project))
(buffers (project-buffers project))
(cmd (concat"platformio -f -c emacs " target)))
(unless default-directory
(user-error"Not in a project, aborting"))
(save-some-buffers (not compilation-ask-about-save)
(lambda ()
(when (member (current-buffer) buffers)
t)))
(compilation-start cmd 'platformio-compilation-mode)))
There are certainly more elegant ways of doing what I did above, but the functions do their job.
If I can suggest, perhaps the usage of projectile.el could be preserved via some custom variable and some more code, for those who prefer it, but the mandatory dependency could come out with an implementation in the spirit of what I've been using in my settings.
What do you think?
Thanks!
The text was updated successfully, but these errors were encountered:
I would love to have the option to use project.el instead of projectile as I don't use projectile anywhere else. @fernandodemorais-jf if you already have working code I'd be happy to help you work on getting a merge request put together to submit to the project.
Hello!
First of all, thanks for this great package! I've been using it for quite some time. Very neat and very useful!
Can we switch to depending on the
project.el
(built-in), instead of theprojectile.el
?Currently, functions
platformio-conditionally-enable
andplatformio--exec
have been modified, in my local installation, to useproject.el
and look like this:There are certainly more elegant ways of doing what I did above, but the functions do their job.
If I can suggest, perhaps the usage of
projectile.el
could be preserved via some custom variable and some more code, for those who prefer it, but the mandatory dependency could come out with an implementation in the spirit of what I've been using in my settings.What do you think?
Thanks!
The text was updated successfully, but these errors were encountered: