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

html.erb does not associate with html-mode, default is fundamental mode #7330

Closed
ghost opened this issue Oct 9, 2016 · 12 comments
Closed

html.erb does not associate with html-mode, default is fundamental mode #7330

ghost opened this issue Oct 9, 2016 · 12 comments

Comments

@ghost
Copy link

ghost commented Oct 9, 2016

I use rails to program.When I jump to view from a controler using SPC m g v , the view ended with .erb does not associate with html-mode, default is fundamental mode.Help me.

@TheBB
Copy link
Collaborator

TheBB commented Oct 9, 2016

Add the html layer.

@ghost
Copy link
Author

ghost commented Oct 9, 2016

I have added the html layer to dotspacemacs-configuration-layers, but it does not work.

@TheBB
Copy link
Collaborator

TheBB commented Oct 9, 2016

It should. https://github.com/syl20bnr/spacemacs/blob/develop/layers/+lang/html/packages.el#L245 Can you check if this entry is in your auto-mode-alist?

@ghost
Copy link
Author

ghost commented Oct 9, 2016

Yes,it's there.

@TheBB
Copy link
Collaborator

TheBB commented Oct 9, 2016

And if you do SPC SPC normal-mode in an erb-file, do you get web-mode then?

@ghost
Copy link
Author

ghost commented Oct 9, 2016

File mode specification error, can not open load file.

@TheBB
Copy link
Collaborator

TheBB commented Oct 9, 2016

Which file?

@ghost
Copy link
Author

ghost commented Oct 9, 2016

sorry, web-mode

@TheBB
Copy link
Collaborator

TheBB commented Oct 9, 2016

Sounds like the package wasn't installed, this should have produced an error message earlier.

@ghost
Copy link
Author

ghost commented Oct 9, 2016

I found the problem.I added (global-git-commit-mode t) to dotspacemacs/user-init () which should be added to user-config().But I don't know why this line can not be added to user-init fuction.
Thanks a lot.

@TheBB
Copy link
Collaborator

TheBB commented Oct 9, 2016

Because user-init runs before all the packages are set up, you can't call functions there that are defined in packages.

@TheBB TheBB closed this as completed Oct 9, 2016
@ghost
Copy link
Author

ghost commented Oct 9, 2016

Thanks!

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

No branches or pull requests

1 participant