Closed gares closed 3 years ago
This is a screenshot of how it looks like with this patch plus a bunch of CSS rules. The think is very very close to how it looks in vscode, which was my objective.
This looks very nice, thanks for sharing!
Given the entry point is really small, I wonder if "monkey patching" could be an option. I mean, the _quotation and antiquotation non terminals could be there and empty, and one could inject all the rest (and keep it out of alectryon, which is probably a good thing, unless you like elpi so much).
But if that works, then wouldn't it work to also inject the nonterminals?
I did not try but yes. I was suggesting to keep a quotation and antiquotation nonterminals because they could/should be used by ltac1 and ltac2 as well. I mean ltac:(...)
is really like lp:{{ ... }}
.
they could/should be used by ltac1 and ltac2 as well. I mean ltac:(...) is really like lp:{{ ... }}.
Fair, although ltac1 can contain Gallina in a bunch of places, so it's tricky to know when you exit the quotation (that's why I handle both together at the moment).
I managed to separate the elpi lexer in this way (I pushed it ontop of the other PR because I wanted to test it on the actual doc).
https://github.com/cpitclaudel/alectryon/pull/56/commits/7c226b6f5944834579eb1a1a33ff5a2270e2dff3
I could not monkey patch all the way trough, so I'd like the --plugin option (or another one) to let me override the coq lexer as I do here.
I close this one, since what I really need now is an "plugin mechanism" hence the other PR is more appropriate to discuss it.
This works for me, but it is the ugliest option we discussed by mail. I tried the other options, but I could not get it working :-/
Given the entry point is really small, I wonder if "monkey patching" could be an option. I mean, the
_quotation
andantiquotation
non terminals could be there and empty, and one could inject all the rest (and keep it out of alectryon, which is probably a good thing, unless you like elpi so much).