qmdiEditor: run clang-format on save (172)#173
Closed
diegoiast wants to merge 4 commits into
Closed
Conversation
Closed
diegoiast
force-pushed
the
172-clang-format
branch
from
February 13, 2026 19:00
5c24160 to
4a0570a
Compare
Closed
diegoiast
force-pushed
the
172-clang-format
branch
2 times, most recently
from
February 13, 2026 22:16
34693de to
5cf80d0
Compare
diegoiast
marked this pull request as ready for review
February 14, 2026 19:17
Previously, this was an implementation detail of `qmdiEditor` that leaked. It was used also in the git plugin. Now, this is migrated to a full widget. With a very minimal implementation. In hope that `GitPlugin.cpp` will remove the dependency (see diegoiast/qmdilib#34)
When a file gets reloaded from disk, the user can undo the loading. Before, when reloaded, all undo history was lost.
1) Separate load/save events. 2) New configuration: clang-format, and when to save 3) When a file gets saved, run run "clang-format" depending on user configuration. This is done based on file extension, doing it only for supported types. A cool improvement might be doing a file extension. We can have a configurtion file with a extension, binary to execute, and which where to download it. For example: bash can be formatted using https://github.com/mvdan/sh which is written in GO, so installation is simple as the ctags plugin. rust,go are baked into the toolchains. cmake has https://github.com/cheshirekow/cmake_format closes #172
diegoiast
force-pushed
the
172-clang-format
branch
from
February 14, 2026 19:17
5cf80d0 to
ad70994
Compare
Collaborator
Author
|
merged in 8646b64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A cool improvement might be doing a file extension. We can have a configuration file
with a extension, binary to execute, and which where to download it.
For example:
closes #172