https://bugs.kde.org/show_bug.cgi?id=358798

Igor Kushnir <igor...@meta.ua> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |igor...@meta.ua

--- Comment #4 from Igor Kushnir <igor...@meta.ua> ---
Piotr, I think you are misunderstanding the configuration page. By picking a
formatter for each language in the Language combobox you can use different
formatters for different languages. The Language combobox does not show the
currently configured language, but lets you pick the language you want to
select a formatter for.

Here is what I have in my
~/.local/share/kdevelop/sessions/{session-id}/sessionrc:

[SourceFormatter]
ModelinesEnabled=false
OverrideKateIndentation=false
text/x-c++hdr=kdevastyle||Qt
text/x-c++src=kdevastyle||Qt
text/x-chdr=kdevastyle||KDELibs
text/x-csharp=kdevastyle||1TBS
text/x-csrc=kdevastyle||KDELibs
text/x-java=kdevastyle||1TBS
text/x-objcsrc=kdevastyle||1TBS

This is after I picked Qt as the style for the C++ Language and KDELibs as the
style for the C Language, while leaving the default 1TBS style for other
languages that I don't use.

So if you only use C++, configure the source formatter for this language in
KDevelop settings. However note Bug 335549: if your headers have the *.h
extension, configure the formatter for the C language as well. You could even
use different formatters for headers and source files in this case.

As for your project configuration idea, it's already implemented. There is a
Source Formatter section on the Configure Project page.

To summarize:
  - custom formatting styles that a user creates are stored in
~/.config/kdeveloprc. So a user can create a custom style "My style" once, then
select it for any other session or project.
  - Source formatters ("Artistic Style" or "Custom Script Formatter") and
styles (1TBS, ANSI, ... or "Gnu Indent : GNU", "Clang Format", ...) selections
for each language on the Source Formatter page of the Configure KDevelop window
are stored separately for each session (as I showed above).
  - Source formatters can also be configured on a per-project basis.

In conclusion, I think there is no bug here, so this issue can be closed as not
a bug.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to