Kate supports parsing .editorconfig files to apply its formatting rules. However, this happens always there is an .editorconfig file present, and it is not possible to avoid it. Although using the rules from .editorconfig is almost always the desired behaviour, there are some cases where this is not desired and deleting the file would be uncomfortable because it's part of the repository. To name a few: - There are contributors of the project that don't like automatic formatting and want to do the formatting manually, or with different tools - The file is added late, when the project already has lot of developed code, but the team doesn't want it to cause massive reformatting in old files that are not touched frequently I think it should be possible to disable using editorconfig (and maybe also kateconfig) from settings.
While this is trivially doable and has been asked before, I don't think we will do it. The file is put in a project so that its rules are followed by the code in project.
Maybe this is not the best reason to convince you, but anyway is an additional reason: all other editors I know with editorconfig support (or any other formatting tool) allow not to use it, either it is opt-in or opt-out, either via plugins or builtin. I'm totally favourable to the opt-out approach: editorconfig enabled by default, but user can disable it. It's true that the file is in the project, but maybe it's not by user choice, but because it's a repo used by many people and the file is added for convenience of the developers, but not enforcing its use. User freedom should prevail, and in any case it's the project owners' responsibility to enforce the formatting rules, not the editor chosen by each developer's responsibility.
Ok, patches are welcome. This is easy to do so if you want to try, I can help.
If nobody else is willing to do it, I can try, but then it can take lot of time. I have almost no free time lately, and I don't know KDE framework nor I am familiar at all wit the code base nor with the process to contribute. With your help I will try, but it will be very slow.
We have infinite time and no deadlines ;)
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/ktexteditor/-/merge_requests/738
Git commit 7e97a15452714d6de96e4e95c5bd5356955aa281 by Christoph Cullmann, on behalf of Waqar Ahmed. Committed on 04/10/2024 at 16:10. Pushed by cullmann into branch 'master'. Allow disabling editorconfig M +3 -0 src/dialogs/katedialogs.cpp M +7 -0 src/dialogs/opensaveconfigadvwidget.ui M +1 -1 src/document/katedocument.cpp M +2 -0 src/utils/kateconfig.cpp M +6 -1 src/utils/kateconfig.h https://invent.kde.org/frameworks/ktexteditor/-/commit/7e97a15452714d6de96e4e95c5bd5356955aa281