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

*.turbo_stream.erb file support #601

Open
thewatts opened this issue Dec 9, 2023 · 2 comments
Open

*.turbo_stream.erb file support #601

thewatts opened this issue Dec 9, 2023 · 2 comments

Comments

@thewatts
Copy link

thewatts commented Dec 9, 2023

Hi There!

Just started leveraging this plugin, and it's amazing (👏). Thank you for all your hard work on this!

Something I noticed, is that with the new Rails view format for turbostreams, ex: new.turbo_stream.erb, vim is setting the filetype to eruby.html, instead of eruby.

As such - my linter is throwing errors.

Here's an example below - top with vim-rails enabled, bottom with it disabled:

CleanShot 2023-12-09 at 12 58 09@2x

Note: This doesn't happen with the typical new.html.erb type files - it is only happening with turbo_stream files.

Any help here would be greatly appreciated.

Thank you!

@thewatts
Copy link
Author

thewatts commented Dec 9, 2023

It looks like something was added already here: 855ff28

However, I don't know the difference between eruby and eruby.html filetypes.

@kulbirsaini - I see that you added the initial issue, here: #587 -

Is eruby.html some sort of filetype that you have configured through a plugin that isn't the typical eruby?

@kulbirsaini
Copy link

kulbirsaini commented Dec 29, 2023

@thewatts sorry, just seeing this. eruby.html is added by this plugin itself at https://github.com/tpope/vim-rails/blob/master/plugin/rails.vim#L117-L118 . I have not added any custom filetype to my .vimrc.

Edit:
Just realized that line comes from my suggestion. Only other ruby/rails plugin I use is https://github.com/vim-ruby/vim-ruby. So, I guess it has something to do with that plugin.

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