AzureMarker / intellij-lalrpop

Jetbrains plugin for the LALRPOP parser-generator
MIT License
16 stars 2 forks source link

Better highlighter #15

Closed dnbln closed 4 years ago

dnbln commented 4 years ago

Everything has colors now.

AzureMarker commented 4 years ago

Thanks for working this, though I don't think this is the right approach... This supports primitive types like integers and str, but does not support non-primitive types like Vec or user-defined types. I wrote down some thoughts in #12 for solving the general case of this problem, basically injecting Rust whenever we reference a Rust type. Adding that support would implicitly add the highlighting of primitives like this PR does, but it would also provide reference resolution, autocomplete, and everything else that the Rust plugin provides for types.

dnbln commented 4 years ago

Adding that support would implicitly add the highlighting of primitives like this PR does, but it would also provide reference resolution, autocomplete, and everything else that the Rust plugin provides for types.

Yes, you're right, but aside those what do you think about the highlighting of everything else?

Note: Highlighting itself works off of a single file: https://github.com/Mcat12/intellij-lalrpop/pull/15/files#diff-f304df81cbcdd23216c0004039e5c723375062ffe09c8218a4687828067695e1, you might have missed it.

AzureMarker commented 4 years ago

I didn't run the code until now so I did miss that, but I do like the highlighting done on the rest of the grammar. So how about remove the Rust type highlighting and keep the rest (nonterminals, etc).