Indentation script for R

Pierre de Villemereuil pierre.de.villemereuil at mailoo.org
Mon Dec 11 08:46:00 UTC 2017


> The file is packaged with RKWard, but also with KatePart. Or, more
> precisely, the syntax highlighting has been split out into a separate
> module, around a year(?) ago. You can find the r.xml-file, here:
> https://cgit.kde.org/syntax-highlighting.git/tree/data/syntax . It also
> does not get installed _as that file_ any more, but rather what gets
> installed is a pre-compiled collection of all the syntax highlighting
> definitions in that directory.
> 
> So that should not be a problem. Or did you actually test and find "R
> Script" missing in kate?

Interesting... Maybe I was mislead in my conclusion then. I'll tell you what happened, you let me know if it makes sense to you then.

I've been struggling for a while to make the script work with Kate5. I prepared a new indenting script with the new header according to the KF5 guidelines here:
https://docs.kde.org/trunk5/en/applications/katepart/dev-scripting.html

I placed the script in the correct folder for it to be loaded by Kate5, which is:
/usr/share/katepart5/script/indentation
but I never managed to get it working (as is, it never appeared in Kate among the "indentation" options).

A few days ago, the R project in openSUSE's OBS switched to the KF5-based (development) version of RKWard because the kdelibs4 were ditched out of Tumbleweed. I thus made the update and realised that now, I was able to see "R" as an option in Kate (and in RKWard as well).

I thus looked into the RKWard package and realised it was installing the r.xml file and thus concluded this was missing in my install for Kate to load the indent script.

So, indeed, the "R script" mode is available without RKWard (as part of the pre-compiled collection you're mentioning), so what do you expect could have made the script suddenly working with the RKWard update?

> I continue to be open for including this in RKWard, but submitting to
> ktexteditor is still the best option, IMO. (This is the place where it
> would go to:
> https://cgit.kde.org/ktexteditor.git/tree/src/script/data/indentation)

I am also open to including this in ktexteditor, I just want to make sure I understand what is going on, or at least that "it works". Maybe this is just a bug due to pre-compiled/script file versions of the same thing and including the indentation script directly in the source will be OK anyway. I don't know.

Cheers,
Pierre.


More information about the rkward-devel mailing list