[kdevelop] [Bug 352038] Indentation does not work as specified in the source formatter

2022-10-23 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=352038

--- Comment #17 from Igor Kushnir  ---
I confirm the issue. The pasting issue is probably of the same origin, seeing
as it comes from the KTextEditor configuration common to KDevelop, Kate and
KWrite. The *Override Kate Indentation Mode* checkbox should ideally prevent
this issue. But currently this checkbox only affects tabs/spaces and
indentation width:
https://invent.kde.org/kdevelop/kdevelop/-/blob/4ffbedc9e97bb84bb242ad5f7b76b6a7153b5a4d/kdevplatform/shell/sourceformattercontroller.cpp#L654.
The thing is, the underlying KTextEditor framework has its own formatting,
which KDevelop needs to override. The KTextEditor formatting configuration is
not as sophisticated as KDevelop's one.

You can try to improve the situation by changing the default indentation mode
on the Editing->Indentation tab or configuring formatting on the
Open/Save->Modes & Filetypes tab: use the Variables line edit and the
Indentation mode combobox to configure KTextEditor's formatting for each
Filetype you use. See the documentation:
https://kate-editor.org/2006/02/09/kate-modelines/ Unfortunately this
configuration is system-wide, applies to all files and not only in KDevelop,
but in Kate and KWrite too. Consider also
https://kate-editor.org/2006/02/09/kateconfig-files/

If you manage to work around this bug by configuring KTextEditor, consider
contributing improvements to the adaptEditorIndentationMode() function I have
linked. This way KDevelop's per-session or per-project formatting configuration
would automatically override more KTextEditor formatting options. Though I
expect that making your workaround generally useful could prove to be a
challenging and time-consuming task, because the current formatting
configuration has to be extracted from various source formatters before it can
be applied to KTextEditor.

Another potential fix in KDevelop is intercepting KTextEditor's formatting
action (such as unindenting the protected: label) and reformatting the affected
source code range with KDevelop's formatter instead (or reformat after each
KTextEditor's formatting action).

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

[kdevelop] [Bug 352038] Indentation does not work as specified in the source formatter

2022-10-23 Thread Fikret Skrgic
https://bugs.kde.org/show_bug.cgi?id=352038

--- Comment #16 from Fikret Skrgic  ---
Another problem, which is probably related, and I would also be really happy if
it was fixed. If in Settings -> Editor -> Editing -> Indentation, one selects
to "adjust indentation of code pasted from the clipboard", it does not follow
the source formatting style at all. This problem is also decades old. I have
been using KDevelop since not much later than it came into existence and both
these problems have always been there. So, there must be some formatting code,
which supersedes, overrides, or bypasses the selected source formatting.

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

[kdevelop] [Bug 352038] Indentation does not work as specified in the source formatter

2022-10-23 Thread Fikret Skrgic
https://bugs.kde.org/show_bug.cgi?id=352038

--- Comment #15 from Fikret Skrgic  ---
(In reply to Igor Kushnir from comment #13)
> Is there a Kate Modeline
> (https://kate-editor.org/2006/02/09/kate-modelines/) in the file you are
> editing?

No, there are no modelines.

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

[kdevelop] [Bug 352038] Indentation does not work as specified in the source formatter

2022-10-23 Thread Fikret Skrgic
https://bugs.kde.org/show_bug.cgi?id=352038

--- Comment #14 from Fikret Skrgic  ---
(In reply to Igor Kushnir from comment #12)
> Select the class's code, right click on the selection, trigger the Reformat
> Source action. Does the result agree with your formatting configuration?

Yes, if I do that, the code gets fixed.

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

[kdevelop] [Bug 352038] Indentation does not work as specified in the source formatter

2022-10-23 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=352038

--- Comment #13 from Igor Kushnir  ---
Is there a Kate Modeline (https://kate-editor.org/2006/02/09/kate-modelines/)
in the file you are editing?

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

[kdevelop] [Bug 352038] Indentation does not work as specified in the source formatter

2022-10-23 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=352038

--- Comment #12 from Igor Kushnir  ---
Select the class's code, right click on the selection, trigger the Reformat
Source action. Does the result agree with your formatting configuration?

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

[kdevelop] [Bug 352038] Indentation does not work as specified in the source formatter

2022-10-23 Thread Fikret Skrgic
https://bugs.kde.org/show_bug.cgi?id=352038

--- Comment #11 from Fikret Skrgic  ---
Screenshots 1 and 2 show the difference between selecting and not selecting
class in the indentation. When class is selected, access modifiers should be
indented. In the third you can see my style. In the fourth there is some code I
will try to modify. In the fifth I type "protected" (no colon yet). In the
sixth I add a colon and the text immediately gets shifted to the left.

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

[kdevelop] [Bug 352038] Indentation does not work as specified in the source formatter

2022-10-23 Thread Fikret Skrgic
https://bugs.kde.org/show_bug.cgi?id=352038

--- Comment #10 from Fikret Skrgic  ---
Created attachment 153146
  --> https://bugs.kde.org/attachment.cgi?id=153146=edit
Screenshot

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

[kdevelop] [Bug 352038] Indentation does not work as specified in the source formatter

2022-10-23 Thread Fikret Skrgic
https://bugs.kde.org/show_bug.cgi?id=352038

--- Comment #9 from Fikret Skrgic  ---
Created attachment 153145
  --> https://bugs.kde.org/attachment.cgi?id=153145=edit
Screenshot

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

[kdevelop] [Bug 352038] Indentation does not work as specified in the source formatter

2022-10-23 Thread Fikret Skrgic
https://bugs.kde.org/show_bug.cgi?id=352038

--- Comment #8 from Fikret Skrgic  ---
Created attachment 153144
  --> https://bugs.kde.org/attachment.cgi?id=153144=edit
Screenshot

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

[kdevelop] [Bug 352038] Indentation does not work as specified in the source formatter

2022-10-23 Thread Fikret Skrgic
https://bugs.kde.org/show_bug.cgi?id=352038

--- Comment #7 from Fikret Skrgic  ---
Created attachment 153143
  --> https://bugs.kde.org/attachment.cgi?id=153143=edit
Screenshot

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

[kdevelop] [Bug 352038] Indentation does not work as specified in the source formatter

2022-10-23 Thread Fikret Skrgic
https://bugs.kde.org/show_bug.cgi?id=352038

--- Comment #6 from Fikret Skrgic  ---
Created attachment 153142
  --> https://bugs.kde.org/attachment.cgi?id=153142=edit
Screenshot

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

[kdevelop] [Bug 352038] Indentation does not work as specified in the source formatter

2022-10-23 Thread Fikret Skrgic
https://bugs.kde.org/show_bug.cgi?id=352038

--- Comment #5 from Fikret Skrgic  ---
Created attachment 153141
  --> https://bugs.kde.org/attachment.cgi?id=153141=edit
Screenshot

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

[kdevelop] [Bug 352038] Indentation does not work as specified in the source formatter

2022-10-23 Thread Fikret Skrgic
https://bugs.kde.org/show_bug.cgi?id=352038

--- Comment #4 from Fikret Skrgic  ---
(In reply to Igor Kushnir from comment #3)
> Have you tried checking the *Override Kate Indentation Mode* checkbox on the
> Source Formatter tab of KDevelop settings?

It makes no difference.

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

[kdevelop] [Bug 352038] Indentation does not work as specified in the source formatter

2022-10-23 Thread Igor Kushnir
https://bugs.kde.org/show_bug.cgi?id=352038

Igor Kushnir  changed:

   What|Removed |Added

 CC||igor...@gmail.com

--- Comment #3 from Igor Kushnir  ---
Have you tried checking the *Override Kate Indentation Mode* checkbox on the
Source Formatter tab of KDevelop settings?

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

[kdevelop] [Bug 352038] Indentation does not work as specified in the source formatter

2022-10-23 Thread Fikret Skrgic
https://bugs.kde.org/show_bug.cgi?id=352038

Fikret Skrgic  changed:

   What|Removed |Added

 Resolution|WAITINGFORINFO  |---
 Ever confirmed|0   |1
 Status|NEEDSINFO   |CONFIRMED

--- Comment #2 from Fikret Skrgic  ---
(In reply to Justin Zobel from comment #1)
> Thank you for reporting this bug in KDE software. As it has been a while
> since this issue was reported, can we please ask you to see if you can
> reproduce the issue with a recent software version?
> 
> If you can reproduce the issue, please change the status to "CONFIRMED" when
> replying. Thank you!

It is still there and has been there for decades now.

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

[kdevelop] [Bug 352038] Indentation does not work as specified in the source formatter

2022-10-21 Thread Justin Zobel
https://bugs.kde.org/show_bug.cgi?id=352038

Justin Zobel  changed:

   What|Removed |Added

 Status|REPORTED|NEEDSINFO
 Resolution|--- |WAITINGFORINFO

--- Comment #1 from Justin Zobel  ---
Thank you for reporting this bug in KDE software. As it has been a while since
this issue was reported, can we please ask you to see if you can reproduce the
issue with a recent software version?

If you can reproduce the issue, please change the status to "CONFIRMED" when
replying. Thank you!

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

[kdevelop] [Bug 352038] Indentation does not work as specified in the source formatter

2016-06-24 Thread Alexander Potashev via KDE Bugzilla
https://bugs.kde.org/show_bug.cgi?id=352038

Alexander Potashev  changed:

   What|Removed |Added

 CC||aspotas...@gmail.com

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