uncrustify / uncrustify

Code beautifier
http://uncrustify.sourceforge.net/
GNU General Public License v2.0
2.85k stars 566 forks source link

Kate Syntax Highlihter #2862

Open drizt opened 4 years ago

drizt commented 4 years ago

Currently Kate has no uncrustify syntax highlither .xml file. And can be edited as plain text in Kate or Qt Creator, or need to use some conf-mode for coloring. It's not good. I wrote some basic such .xml file witch can be placed to $HOME/.local/share/org.kde.syntax-highlighting/syntax/uncrustify.xml or any other (KSyntaxHighlighting)[https://api.kde.org/frameworks/syntax-highlighting/html/index.html] dir.

image

Rename to uncrustify.xml uncrustify.txt

drizt commented 4 years ago

In 33 line incorrect value folse.

guy-maurel commented 4 years ago

fine

CDanU commented 4 years ago

I was fairly certain that @mwoehlke-kitware did something similar, see: https://github.com/uncrustify/uncrustify/blob/master/CMakeLists.txt#L223

drizt commented 4 years ago

It's great. But no info in README. Also Fedora package hasn't uncrustify.xml

drizt commented 4 years ago

Also I wander how to build uncrustify.xml with CMake? Seems it won't build by default.

CDanU commented 4 years ago

Yes, as it has its own build target named: katehl OTTOMH I don't remember how you have to call cmake, you'll have to look it up. Most likely cmake isn't even involved here, you have to provide the target to make.

drizt commented 4 years ago

There are any reasons to not build katehl in all target? Also I think need to add INSTALL for uncrustify.xml to standard folder /usr/share/org.kde.syntax-highlighting/syntax/. I opened bugreport in Fedora to include uncrustify.xml in package.

CDanU commented 4 years ago

Is there any reason to include it? Generating this byproduct doesn't really cause increased build times or more dependencies, however keeping complexity as small as possible seems to me to be more valuable.

I am not having too much knowledge about distro packaging, adding files to a directory that belongs to another package (kate) kinda feels messy. Does this regularly happen? What happens when stuff like SELinux/AppArmor is in place? We generally haven't considered stuff like this as, in my opinion this should be the responsibility of the distro.

Seeing that how easily you handled this in your linked patch seems to indicate to me that there isn't really any problem - except our documentation, we should add info about that file to the main description.

drizt commented 4 years ago

Is there any reason to include it?

Make life easier for packagers.

drizt commented 4 years ago

In fedora /usr/share/org.kde.syntax-highlighting/ used by two packages kf5-messagelib and rkward. The first is an owner of this folder. The second just place own .xml file to this folder without extra actions.

guy-maurel commented 5 months ago

what is the status?