Indentation script for R

Pierre de Villemereuil pierre.de.villemereuil at mailoo.org
Wed Nov 8 23:39:40 UTC 2017


Hi,

> thanks a lot for sharing your work, and sorry for the delayed reply!

No problem.

> Personally I could never get used to automatic indentation at all, and
> just turn it off. So I am not really qualified to test and comment.

No problem either! ;)

> By the same token, I never tried to develop an indentation script, and
> would not be able to spot even obvious omissions. But what I can say is
> that your script looks cleanly written. As a random nitpick, I suggest
> merging the common portion "!lastLine.endsWith('<-')" of the two ifs
> around line 197.

Yes, those were latest commits and not quite cleaned up... I've now changed this whole to basically two lines of code! I don't know much about Javascript but the way, so there might be huge mistakes in there (although any cases I've found where the code doesn't work are understandable corner cases, not syntax error -- for now!).

> All that said, the proper place for your script _is_ the "ktexteditor"
> component, i.e. the component used by Kate _and_ RKWard (and many
> others). While arguably, it will matter to RKWard, most, there are
> also people coding R in kate, for instance. Also, more importantly, this
> is where developers will find it, in case they need to do maintenance /
> improvements on _all_ indentation scripts.

That would require me to test this against Kate5, but I'm yet to find the new place where these scripts are stored by Kate5 (currently, RKWard is looking into /usr/share/kde4/kateparts/, but I guess this is old news for Kate5 and the yet-to-come KF5 port of RKWard).

> If this is not too much to ask, then, I suggest you submit your work as
> a review request on
> https://phabricator.kde.org/differential/diff/create/, against the
> ktexteditor repoistory. This will get the right people to look at it.
> Consider adding "RKWard-Devel-list" in CC of your request. Should this
> be rejected as "too specialized for ktexteditor" (I do _not_ think that
> will happen), we'll include it in RKWard, instead.

I'll work through some remaining issues and test with Kate5 once I figured out how it works now with KF5. Then, I'll consider opening a request on Phabricator (don't you need a KDE dev account for this?).

Cheers,
Pierre.


More information about the rkward-devel mailing list