Another possibility on the vscode side would be to create a syntax file 
that is the union of the leosyntax and the language in effect for the node.

On Sunday, June 28, 2020 at 12:23:27 PM UTC-4, Edward K. Ream wrote:
>
> On Sun, Jun 28, 2020 at 8:11 AM Edward K. Ream wrote:
>
> >  leoInteg's colorizing code will likely use an LSP. The LSP can be 
> written in python, which means a repackaging of Leo's existing colorizing 
> code may be possible.
>
> Yes, Leo's LSP *could* be written in python, but that may not be the 
> easiest way. Leo's LSP will likely delegate most coloring to vs-code's 
> default colorizers for the @language in effect. This would likely be 
> easiest to do in ts. 
>
> Leo's LSP would (sometimes!) break body text into chunks consisting of a 
> range of lines to be colored by the same language, with only *Leonine 
> lines* (lines containing Leo directives and section references) being 
> colored using syntaxes/leoBody.tmLanguage.json.
>
> *It should be possible to avoid re-calculating chunks on every keystroke*. 
> After all, existing vs-code colorizers almost certainly do not re-tokenize 
> the entire file on every keystroke. Figuring how to avoid this 
> recalculation is next on my study list.
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/leo-editor/e9e0db33-333c-4d38-91fb-d2188d06e6b0o%40googlegroups.com.

Reply via email to