Page 1 of 1

ZScript Syntax Highlighter for Kate Editor v2

PostPosted: Wed Oct 21, 2020 8:48 am
by KaptainMicila
This is a syntax highlighter for the ZScript language for the Kate text editor.

If the that isn't clear enough, a syntax highlighter is the component of a text editor that makes the keywords and elements of the code more readable by giving them different colours and/or fonts.

Why a Syntax Highlighter?
After looking at Nash's Standalone Game Template, I asked GZDoom's discord what were the tools they were using, to receive a "little push" to start.
As I am using KDE Neon, the users, of course, told me that there weren't many tools for Linux, but that at least SLADE was supported.
It worked yes, but there were issues, as SLADE using GNOME, and GNOME apps not working really that well on KDE.
(I don't expect, nor want sirjuddington to waste his time to fix such a niche problem)
For that reason alone, I decided that I had to help the comunity, somehow, to have more tools for their work.

Why Kate Editor?
Well, I decided that because of my personal needs, as that's the editor I use. But my real plan is to use this one as a base for the more complex highlighting system for VSCode, as that's an editor people actually use.
And as Kate supports LSP, the final stage of my plan is to make a ZScript language server. But that's gonna be something for later.

GITHUB (for the code and usage information): https://github.com/KaptainMicila/Kate-ZScript-Highlighting

VERSION 0.9 UPDATE
Version 0.9 adds Default and States block support. It works, but has some issues.

VERSION 1.0 UPDATE
Version 1.0 resolves the problems found within the Default and States blocks, and marks this project as complete.

VERSION 2 UPDATE
Version 2 fixes problems related to the identification of "Default" and "States" blocks. Thanks for The Impure (from discord) for the fix suggestion.
This version also adds a .xsd to the source files so contribuiting is easier.
And this version also changes versioning methods. It won't be decimal anymore, as KDE does not like decimals for versions.

Sample: archvile.zs

Re: ZScript Syntax Highlighter for Kate Editor

PostPosted: Mon Oct 26, 2020 1:08 pm
by KaptainMicila
I just added Default and States block support. Sadly it's still incomplete and broken (for some reason the code won't recognize whitespaces), but it's working.
Of course, I would love some feedback.

Re: ZScript Syntax Highlighter for Kate Editor - Version 1.0

PostPosted: Tue Oct 27, 2020 5:32 am
by KaptainMicila
I can finally say that the project is now usable. As I am not a zscript programmer I don't know if there's other hidden stuff that I missed.
Of course, some feedback could be useful for that.

Re: ZScript Syntax Highlighter for Kate Editor 2.0

PostPosted: Tue Oct 27, 2020 10:14 am
by KaptainMicila
This new version fixes a problem with "Default" and "States" blocks.
This should be the last fix.
Thanks for The Impure (from discord) for the fix suggestion.