Is this a Bug? Source Formatter=>Formatting Style seems to be session

Matthew Woehlke mw_triad at
Fri Apr 17 17:14:30 BST 2015

On 2015-04-17 11:57, René J.V. Bertin wrote:
> On Friday April 17 2015 11:01:05 Matthew Woehlke wrote:
>> Styles should be *applied* per-*project*. In particular, if I open
>> project A in session B and configure its style, then open the same
>> project A in session C, it should use the style I configured in B.
>> Doing anything else is silly :-). (It's the same code; I'm most
>> likely not going to use a different code style depending on what
>> other projects I have open.)
> True.
> But then you can take it a step further, and make a case to allow
> per-file (or at least per-directory) style settings:

You can already do this to some extent with katepart modelines. Of
course this only gives you some basics like indent width and tab
settings, but it's not inconceivable that we could support kdevelop
modelines at some point.

I'm less worried about that than per-project settings, however. I have
less sympathy for developers that can't stick to a single style within a
project, whereas there are many reasons different projects would have
different styles.

> - a project can include 3rd party software that uses a completely
> different code style

I also have limited sympathy for this use case, since including third
party code in a project is Evil :-). (That said, I also think this is a
non-issue; how often do you edit such code? In my experience, rarely if

> - projects often have source code in other languages that can also
> each have their own coding style (and yet live in the same parent
> directory).

That's a case that needs to be handled regardless, but I don't see the
issue; wherever the style settings are stored, there needs to be
separation by language. (Although considering that the KDevelop style
stuff really only applies to C/C++, I don't see that there is an actual
issue here.)


More information about the KDevelop mailing list