Overview of how code completion and highlighting works
andrzejolszak opened this issue · 1 comments
Is there a description somewhere about how the Ctrl+Space code completion, code hovering and code highlighting are implemented in SWISH?
I can see that there is the CodeMirror JS libarary on one side and Pengines on the other, but what happens in-between is not immediately clear.
It would be great to have a short developer documentation for this - it doesn't have to be very detailed, just highlighting the key files/methods/predicates would be enough to get started.
If you run a local server, do ?- debug(http(request)).
to see all requests (or you the browser network debugger). After locating the right request, do this to find where it is defined.
?- edit(<http path>).
The highlighting server side is in lib/highlight.pl
of the SWISH package. Pengines only does running the queries. All the IDE stuff is in the SWISH package.
I don't really plan to write a design document, but I'm happy to answer questions. The SWI-Prolog forum is a more suitable place for this, so I'll close this here.