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

Projectile-rails keybindings need to work for haml and slim as well. #2448

Closed
robbyoconnor opened this issue Jul 28, 2015 · 19 comments
Closed

Comments

@robbyoconnor
Copy link
Contributor

Currently projectile-rails keybindings do not work for slim and haml files.

@dreoliv
Copy link

dreoliv commented Jul 29, 2015

I'm seeing this issue too. I see projectile-rails is loading since the traditional bindings like C-c r m work fine, but spacemacs ones don't 😕.

@ashervb
Copy link
Contributor

ashervb commented Dec 7, 2015

The mode is also lost in javascript, css and sass files

@pacuna
Copy link

pacuna commented Mar 29, 2016

+1

1 similar comment
@smarquezs
Copy link

👍

@robbyoconnor
Copy link
Contributor Author

Pull requests Welcome -- Also use the github reactions -- don't add +1 to every post.
On 03/29/2016 03:18 PM, Sergio Márquez wrote:

👍


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#2448 (comment)

@minusoneman
Copy link

I'm a vim user trying out spacemacs (interesting stuff), so I can't really say if it's a viable solution or not, but I managed to get the projectile-rails bindings to work with slim and coffee files by adding the modes to the layers/+frameworks/ruby-on-rails/packages.el:30

(dolist (mode '(ruby-mode enh-ruby-mode slim-mode coffee-mode web-mode))

Maybe that will help someone getting to the bottom of this.

@robbyoconnor
Copy link
Contributor Author

Perhaps do a PR upstream?
On 11/14/2016 09:22 AM, Nicholai Hsu wrote:

I'm a vim user trying out spacemacs (interesting stuff), so I can't
really say if it's a viable solution or not, but I managed to get the
projectile-rails bindings to work with slim and coffee files by adding
the modes to the layers/+frameworks/ruby-on-rails/packages.el:30

|(dolist (mode '(ruby-mode enh-ruby-mode slim-mode coffee-mode web-mode))|

Maybe that will help someone getting to the bottom of this.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#2448 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABaMB6InjINekrbPQI7B9YZEab_e8Euks5q-G6MgaJpZM4Fhmd_.

@asok
Copy link
Contributor

asok commented Nov 17, 2016

Hi guys,
that's happening because projectile-rails since version 0.12.0 is a global mode. It had to be changed since projectile is a global mode also (at least on master).

This should fix this issue: #7541

@jamieorc
Copy link

jamieorc commented Jan 20, 2017

How do I enable this in a custom fashion until this makes it into the main distribution? I need it for haml and erb files.

@jamieorc
Copy link

jamieorc commented Jan 20, 2017

Thanks @asok, it looks like what I'm missing is how to add erb and haml files into this, per 7cb462d on pull #7735

@asok
Copy link
Contributor

asok commented Jan 20, 2017

@jamieorc you should have the mode enabled in erb and haml files once you enable the global mode. If the mode is not enabled for you, can you provide the repo so I can download it and debug?

@asok
Copy link
Contributor

asok commented Jan 20, 2017

@jamieorc actually you should not run the mode inside with-eval-after-load. That was my bad. Instead you should simply do:
(projectile-rails-global-mode)

@jamieorc
Copy link

I'm clearly missing something. Haml files still do not register as part of the rails project, even if I call (projectile-rails-global-mode) manually in the mini buffer. When I look in the projectile-rails layer, it's missing haml and the other file types listed in pull #7735. From a ruby file in the project, I'm able to access projectile-rails context (Spc - m).

@robbyoconnor
Copy link
Contributor Author

Just pull in #7735 and work :) It may be a while until it's merged.

@jamieorc
Copy link

@robbyoconnor Thanks, I just modified the local file in the layer. If there's a better way, I'm all ears.

@robbyoconnor
Copy link
Contributor Author

@jamieorc the better way would be to cherry-pick the PR i mentioned above ;)

@juanibiapina
Copy link

How about from .gitignore, .rspec-local, Makefile or any other file you can possible have in your rails directory?

@asok
Copy link
Contributor

asok commented Dec 13, 2017

This is covered by #7541

@asok
Copy link
Contributor

asok commented Feb 13, 2019

@sdwolfz I think it can be closed.

@sdwolfz sdwolfz closed this as completed Feb 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.