tomblachut / svelte-intellij

Svelte components in WebStorm and friends
MIT License
482 stars 38 forks source link

Does not recognize .svelte.erb #113

Closed sedubois closed 4 years ago

sedubois commented 4 years ago

Thanks for this very helpful IntelliJ IDEA plugin! It's been a pleasure to learn using Svelte using the IDEA thanks to this.

It handles *.svelte files very well, however it does not recognize .svelte.erb files as Svelte files (although this is supported by Webpacker). Could this somehow be supported?

tomblachut commented 4 years ago

Hi, thanks for the kind words.

Can you give me an example of .svelte.erb file?

sedubois commented 4 years ago

@tomblachut the code below renders "hello from http://localhost:3000/" when run locally:

// Hello.svelte.erb
<script>
  let host = "<%= ENV['HOST'] %>"
</script>

<p>hello from {host}</p>
tomblachut commented 4 years ago

I've opened this snipped in next version (#100) and it looks like this:

image

I guess this is good enough, right?

sedubois commented 4 years ago

Yes the ERB syntax only seems partly recognized but at least the Svelte syntax seems good 👍

So I'll be watching for the next release including this change 👀