PlantUmlDiagrams
PlantUmlDiagrams copied to clipboard
Is syntax highlighting for DiagramEx fully functional?
Im not getting highlighting for a lot of cases. like for known colors, @startuml, activate, box, loop, etc. also looks like it doesn't support external message arrows for sequence diagrams like ->] or [<-
hope this demonstrates:
As it seems on your screenshot:
- It either does not support the default Monkay color scheme
- Or it is not funcional as you said, i..e, it is incomplete.
To develop it, I used the https://github.com/evandrocoan/NotepadPlusPlusColorScheme, then, you can try using that color scheme. If the problem is fixed, then, it means I just need to fix this syntax to correctly work with other color schemes as Monkay.
Same result. Looks like it might be invalid whitespace expectations for some of them:
I'm not really sure how to go about adding external arrows (instead of an entity name, there is a bracket without whitespace), or fix the control keywords that are not matched if they start in the first column. I suspect another regex is interfering but I'm not sure how to debug that. The control keywords regex matches as expected on its own.
It should be a quite simple solution. I will look into it when I can.
can we steal this one:
https://github.com/qjebbs/vscode-plantuml/blob/master/syntaxes/diagram.yaml-tmLanguage
That can work too. Just need to see if some conversion is required or if it just work out of the box.
In the above file, if i change the "support.variable" to something else eg: "entity.name" things seem to work out:
I used PackageDev to convert the yaml-tmLanguage to .tmLanguage. I have my experiment here: https://github.com/kyleboyle/PlantUmlDiagrams/pull/2
Let me know your thoughts. There might be some work to use categories that better line up with the sublime text syntax categories.
It would be better if we could automatically keep our syntax up to date with the VSCode one.
Could you explain what you mean? The color schemes I've looked at don't have a style defined for support.variable. I suppose it could be left alone and the connection endpoints will have the default style, though that feels wrong to me.
I meant, instead of developing two syntaxes, one for Sublime Text, the other for VSCode, we could develop only one for VSCode and automatically import any changes to the VSCode syntax, into our Sublime Text syntax. Therefore, I would look on how the update process from the VSCode repository could be integrated into the Sublime Text one (this one) automatically.