-
Notifications
You must be signed in to change notification settings - Fork 15k
Open
Labels
Description
This is a split off from clangd/clangd#2476 (comment)
Users of clangd want to indicate that new files are formatted and old files are left alone.
Clang-format 18 added support for .clang-format-ignore and clang 20 fixed issues and added blob support regarding it. Unfortunately, most/all of the code of this feature is directly called from the main function instead of being part of the format library. As such, this feature is only available when using the clang-format executable and not when doing formatting any other way, like clangd does.
Given that it is called directly before clang::format::format(FileName, FailOnIncompleteFormat);, this should easily be moved inside that function.
A concern:
- can we apply this to every format or should it be optional to ignore this file?
HighCommander4