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

Use FileViewProvider to handle eex #186

Closed
KronicDeth opened this issue Aug 12, 2015 · 25 comments
Closed

Use FileViewProvider to handle eex #186

KronicDeth opened this issue Aug 12, 2015 · 25 comments

Comments

@KronicDeth
Copy link
Owner

FileViewProviders are documented as being used to support languages embedded in each other and html.eex is Elixir embedded in HTML, so a FileViewProvider might be a way to support eex templates for Phoenix

@KronicDeth KronicDeth added this to the v1.2.0 milestone Aug 12, 2015
@KronicDeth KronicDeth modified the milestone: v1.2.0 Nov 5, 2015
@hipertracker
Copy link

Will it be added to intellij-elixir? *.eex is the default template extension for Phoenix

@KronicDeth
Copy link
Owner Author

If an issue is open, the feature will be implemented eventually. I keep the issues very well groomed. If I wasn't going to implement something the issue would be closed with an explanation.

@nenros
Copy link

nenros commented Jan 28, 2016

Maybe we could make support for that task using gratipay or smth like that? It is most missing function for me!

@KronicDeth
Copy link
Owner Author

I opened a team application on Gratipay: https://gratipay.com/intellij-elixir/. It says it make take up-to a week to be approved (gratipay/project-review#155).

I also already had Paypal Donate setup. It's linked at the bottom of the README.

@chadwhitacre
Copy link

@nenros @KronicDeth Gratipay team approved! Welcome aboard! :-)

https://gratipay.com/intellij-elixir/

@BenBals
Copy link

BenBals commented Jul 18, 2016

is this issue still relevant?

@douglascorrea
Copy link

I think it is relevant yet, I use this plugin and I missing eex file syntax highlight

@joshuataylor
Copy link
Collaborator

I just use HTML formatting for *.html.eex files. Allows highlighting + indenting.

@KronicDeth
Copy link
Owner Author

RIght now this is blocked by JetBrains not documenting at all how this is pulled off and the one implementation that would be super relevant, Rubymine, being closed-source. I've opened at question on the OpenAPI forum to see if anyone from JetBrains can point in the right direction.

From the community, if you know of any open-source language plugins that support an ERB/EEX-like template language: I can look at their implementation to figure out which parts of OpenAPI is supposed to handle this.

@KronicDeth
Copy link
Owner Author

This post seems like a good lead, but doesn't cover how to reuse Elixir.bnf once I'm inside the <%= %> tags.

@KronicDeth
Copy link
Owner Author

Peter Gromov's reply in this post explains mixing the other direction

@natecox
Copy link

natecox commented Nov 23, 2016

@KronicDeth Any updates here? Loving this plugin so far, but it would be great to see .eex support.

Sidenote/derail: I wish I could nominate this to get a standalone IDE. JetBrains elChemist or some such thing.

@DFilipeS
Copy link

@KronicDeth Any updates on this issue? I think this is one of the final big pieces missing from this plugin.

@KronicDeth
Copy link
Owner Author

KronicDeth commented Feb 15, 2017

@natecox, @DFilipeS I'm concentrating on decompilation, completion, and Go To Declaration for .beam-only modules, such as those in the Elixir standard library (when installed as a binary release, such as with homebrew) and Erlang standard library because that will lead to universal-completion and I can start marking unresolved functions and modules in future releases. All next-release planned work is in the v5.0.0 milestone.

This issue will remain low-priority for me because it's both (1) hard (I still am not confident in how to implement it precisely) and (2) I don't use .eex in any of my work or personal projects, so it would only get regular testing by the user-base.

There has been a request by @darkbushido for me to add generators to https://github.com/C-S-D/calcinator, so that would would use .eex for the template files, which would fulfill (2) and only leave the tough part of (1) actually figuring out how to do it.

@OvermindDL1
Copy link

Do note, there is not just *.html.eex, there is *.blah.eex for anything of blah. I personally have *.ic.html.eex, *.un.html.eex, *.json.eex, *.css.eex, among others.

@KronicDeth
Copy link
Owner Author

@OvermindDL1 I'm aware the eex isn't just for html.eex. The injected/chameleon language system for OpenAPI doesn't care about the mixed in language.

One has to mark the triggering nodes (so the <%, <%=, and %> and then give a what they've referred to as a "chameleon" node for the injected language to occupy that part of OpenAPI). My understanding of how JetBrains has explained the Ruby grammar for Rubymine is that the "Ruby" grammar is really an .erb grammar with some mechanism to turn off the triggering nodes and the chameleon nodes when it's a normal .rb file, so something similar has to be done for the plugin.

It's also an open question how I inform OpenAPI the injected language types based on the file extension since Rubymine appears to have some special handling for things like .rhtml, but that could be just a side effect that's it's .rhtml and not html.erb.

@jsrosen3
Copy link

Hey @KronicDeth , just wondering if there was any update on this. Absolutely love your plugin and this would make it even better! Many thanks.

@KronicDeth
Copy link
Owner Author

@jsrosen3 no, no updates. Getting OTP 20 chunk support and updating the lexer to support unicode is the priority now.

@stefanjarina
Copy link

Just wondering if this might help - Vue.js plugin have syntax and intellisense for '.vue' files which have mixed html, js, css in one file, which seems to be similar to what eex does? Maybe worth to look how they are doing it:
https://github.com/JetBrains/intellij-plugins/tree/master/vuejs
I do lot of phoenix work and because of missing eex support can't really use this plugin and need to use atom or vscode. All my other work, like javascript is in Webstorm, golang is in Gogland, so really miss this ;-)
Anyway, thank you for your effort.

@KronicDeth KronicDeth added this to the v6.6.0 milestone Nov 13, 2017
@KronicDeth KronicDeth self-assigned this Nov 13, 2017
@KronicDeth
Copy link
Owner Author

screen shot 2017-11-12 at 6 39 44 pm
screen shot 2017-11-12 at 6 40 52 pm
screen shot 2017-11-12 at 6 45 58 pm

@stefanjarina
Copy link

This is just awesome. Thank you a lot for your hard work :-)

@joshuataylor
Copy link
Collaborator

This is awesome, well done! Such hard work!

@kandeshvari
Copy link
Contributor

Thanks! When 6.6.0 will be released?

@KronicDeth
Copy link
Owner Author

@kandeshvari now? now! https://twitter.com/KronicDeth/status/937060629566885888

@kandeshvari
Copy link
Contributor

Awesome! Thanks a lot!

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