IntellijAlpine
IntellijAlpine copied to clipboard
x-for with two params doesn't work
Looks like v-for with two params case isn't handled. Plugin version: v0.4.2
Screenshot:
Yeah. This is a known issue. I'm not sure when a fix will be possible—right now I'm essentially using the IntelliJ javascript parser for Alpine directives, but because x-for
implements custom syntax that's not valid javascript. The only solution would be to implement a custom parser, which is a pretty big thing to take on :/
@inxilpro Hi from the WebStorm team. Thank you for the great plugin!
About the issue, I don't think that it requires re-writing a parser from scratch. You can inject a custom JS language extension that can extend the JS syntax a bit. I did something like this for Riot.js (see parser).
So, you need to implement the chain: AlpineJSLanguage -> AplineJSParsingDefinition -> AlpineJSLanguageParser