Bug 511718 - Edit. >Format on save (Formatting plugin) turns of after app restart even when it was previously turned off
Summary: Edit. >Format on save (Formatting plugin) turns of after app restart even whe...
Status: RESOLVED INTENTIONAL
Alias: None
Product: kate
Classification: Applications
Component: application (other bugs)
Version First Reported In: 25.08.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-11-06 15:51 UTC by tomashnyk
Modified: 2025-11-06 18:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tomashnyk 2025-11-06 15:51:40 UTC
STEPS TO REPRODUCE
1.  Enable the formatting plugin in the settings.
2.  Un check "Format on save"
3.  Close and open the application

OBSERVED RESULT
Format on save is checked.

EXPECTED RESULT
Format on save is not checked.

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 42
KDE Plasma Version: 6.5.1
KDE Frameworks Version: 6.19.0
Qt Version: 6.9.3
Kernel Version: 6.17.6-200.fc42.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 16 × Intel® Core™ i9-9880H CPU @ 2.30GHz
Memory: 64 GiB of RAM (62.5 GiB usable)
Graphics Processor 1: Intel® UHD Graphics 630
Graphics Processor 2: NVIDIA GeForce GTX 1650 with Max-Q Design
Comment 1 Waqar Ahmed 2025-11-06 16:05:39 UTC
This is intentional. It is meant to temporarily disable formatOnSave. If you want to disable it permanently, do it in the settings.
Comment 2 tomashnyk 2025-11-06 16:26:14 UTC
I see. I think that is very bad UI though.

 (like for example, I am clumsy and sometimes close Kate by mistake. I really appreciate that it remembers what I was doing before. Or I still changed this frequently, but not in sync with me opening Kate (so I work on a project where I do not want to format on save, restart computer or Kate, work on it some more, and then I switch to a project where I want to use it later without saving Kate.)
Comment 3 Waqar Ahmed 2025-11-06 16:48:46 UTC
Then you save "formatOnSave" property for each project inside the project in the .kateproject file.

The checkbox is to temporarily disable formatting because sometimes you don't want to have formatting on save for some file.

Read the documentation for Formatting plugin to understand it. If you are on KDE then just hit F1 and look up "Formatting Plugin"
Comment 4 tomashnyk 2025-11-06 17:16:26 UTC
Hm, it feels like agains KDE HIG, namely against " Users will learn how to use your app quickly, accomplish their goals with ease, and encounter fewer issues requiring support."This is a similar bug that led to UI change: https://bugs.kde.org/show_bug.cgi?id=492717

If this is the indended behaviour, I think a checkbox is misleading. Though I now see that this is the same behaviour as with some other checkboxes in the menus (the ones in the settigns and RTL and fullscreen modes). So it is quite unpredictable what will hapen when I chekc a checkbox. To me, they in general represent settings (I think that is usually the case in KDE)  and something permanent. Though I concede that it is hard to design a good UI and starting Kate in overwrite mode might be slightly confusing too. Anyway this is clearly wider than just this plugin. I guess I would still assume all checkboxes in the menu to be persisten, but maybe it is just me.
Comment 5 Waqar Ahmed 2025-11-06 18:26:01 UTC
> To me, they in general represent settings (I think that is usually the case in KDE)  and something permanent

No. Settings are pretty much always in the settings dialog. Thats the KDE way.

If its something in a menu then its either temporary or tied to your session.

Kate is a bit more complex and has more settings than most (all?) other kde apps. Code editors are like that. So for e.g you can have per project, per lsp server, settings. And per project build or formatting settings. And then there are session settings and global settings in the settings dialog.

Suggestions to improve the UI/UX are welcome.
Comment 6 Waqar Ahmed 2025-11-06 18:28:14 UTC
Thinking a bit more about this, perhaps it makes sense to save/restore FormatOnSave in the session