Skip to content
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

Expanding API #33

Closed
neomantic-zz opened this issue Jul 20, 2014 · 3 comments
Closed

Expanding API #33

neomantic-zz opened this issue Jul 20, 2014 · 3 comments

Comments

@neomantic-zz
Copy link

Projectile-rails is fantastic! Bug free, in my experience, and with solid tests.

I would like to build off it, but many of its procedure require (interative). For instance, I would love a non-interactive version of this procedure: https://github.com/asok/projectile-rails/blob/master/projectile-rails.el#L288, to simply get a list of rails "resources"

The only way I can do it now is something like this

(projectile-rails-choices '(("app/controllers/" "/controllers/\\(.+\\)_controller\\.rb$")))))

Basically, I just cut-and-paste from you code. It would be cool, if I didn't have to duplicate such expressions.

Thoughts?

@asok
Copy link
Owner

asok commented Jul 20, 2014

Thanks for kind words. The project is build on top of projectile. So its robustness is partly because of it.

About your question. Would call-interactively work in your case?

@neomantic-zz
Copy link
Author

Ah...just learning the Emacs Lisp APIs. That could work. But I might not need it. I wanted to write something that you already wrote: https://github.com/asok/helm-rails. I was looking for a helm package that would do just that, and no longer need to write my own. Thanks! Keep up the good work!

@asok
Copy link
Owner

asok commented Jul 23, 2014

Keep in mind that helm-rails is quite old and not updated since a long time.

But if you want to incorporate helm as a completion system to projectile-rails or projectile itself you can do this:

(setq projectile-completion-system 'helm-comp-read)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants