AW: Best way to create and develop a kate syntax highlighting file

Christoph Cullmann christoph at cullmann.io
Tue Sep 29 12:25:59 BST 2020


On 2020-09-29 13:12, rhkramer at gmail.com wrote:
> On Tuesday, September 29, 2020 03:45:23 AM Andreas Plank wrote:
>> > rhkramer at gmail.com
>> > I would look for another language that is similar to SPARQL which has a(n
>> > XML)
>> > syntax highlighter for kate and modify it.
> 
>> sure, I did this ;-) but regarding the extensive KSyntaxHighlighting
>> attributes and elements is there a smart way to edit with? I mean an 
>> editor
>> tool or text snippet tools or even a list of definitions? I saw and 
>> read
>> the api of KSyntaxHighlighting and I guess I have to extract
>> KSyntaxHighlighting elements or attributes on my own.
>> 
>> It would be nice to have a tool to start with like Notepad++ has for
>> creating syntax highlighting files ;-)
> 
> Sorry, I don't know.
> 
> It was quite a few years ago (10+, maybe even 15) when I made the 
> syntax
> highlighting XML file that I needed.  At the time, I didn't find
> anything better
> than just using an editor and learning the rules required.
> 
> I don't keep up with all the latest things in kate (or even the latest
> version) -- I primarily use version 3.8.4 (on KDE 4.8.4 on Debian 
> Wheezy).
> 
> I hope somebody more familiar with things will be aware of a better 
> tool.
> 
> I will say that (for me) doing it the way I did was not terribly 
> difficult,
> especially compared to one of the ways that it could be done for 
> Scintilla,
> that is, writing it in C++ code (an alternative is to write it in Lua 
> code
> (for Scintilla).

Hi,

I think at the moment there is no better way than either just an plain 
text editor,
or, if you have some of that, some XML editors might provide better 
handling if
you pass them our language.xsd that defines the grammar of the XML files 
we user.

But that will not provide a lot more than "you can open now this tag 
here + autocomplete
for the attributes".

Greetings
Christoph

-- 
Ignorance is bliss...
https://cullmann.io | https://kate-editor.org


More information about the KWrite-Devel mailing list