(later today/tonight I will merge the branch I'm on with 'dev' to give multiple opened files capabilities to the dev branch. making leoInteg somewhat "
so please wait before I do that before branching off dev... just a suggestion... )
sidenote: I was wondering why you're talking about electron.... I just looked it up, I thought vscode was a fork of atom, ... turns out they're both forks of electron!
About Syntax Coloring Strategy In LeoInteg:
Indeed, syntax coloring is not that trivial as I originally thought so... First thing I will need do to continues improving the syntax-coloring is make sure a selected node not only receives it's body content, but also the language the node 'begins' in. (when @language set in a parent node) That will set the original language of the node, up to some possible @language elsewhere in the node. (applicable syntaxes definitions are then applied from one @language directive up until the next one is encountered)
As you can see in the 'dev' branch, a 'syntaxes' folder is now present to handle syntax coloring.
In it, I have defined the "Leo Body" syntax, for body content not directly affected by an @language directive, given it the 'scopeName' "source.leobody".
(see last line of leobody.tmLanguage.json in /sintaxes)
when a body pane 'Starts' in python by virtue of his parent's body being in python at the point of insertion of the @others, or because it starts with "@language python", it will be given the scope name 'token' "source.leoBodyPython". for which leobodyPython.tmLanguage.json in /sintaxes will have to be written.... and so on for each language suported by Leo.
I dont think we shoud re-use the already defined scope / tokens such as 'source.python' already defined and available in vscode, because we want to give the same highlights as in Leo, not vscode. (Remember the base philosophy of leoInteg: mimic and reproduce Leo, don't jump on what's available just because it is)
Ok i'm not going to spend hours writing details about the syntax coloring I'v setup so far ... I'd better go finish the multi-file support for tonight and let you browse through what i've done so far in /syntaxes and wait for questions and remarks...
So that's it for now I'll write some more details tonight or tomorrow morning :) thanks again and please don't hesitate to ask about anything or suggest better options!
--
Félix