Specifying format style using command line option

Hello guys.
This is my first attempt to contribute to clangd, so I hope for your understanding.

Clangd by default tries to use .clang-format file to format code. Since “Format as you type” is experimental feature, it may be unusual for people like me who are used to format code before commit or using some keybindings. And personally I have some discomfort when my editor tries to do too much things when I’m typing.
So here’s a patch which adds a new command line option to control formatting style. Using it I can pass “-clang-format-style={DisableFormat: true, SortIncludes: false}” and clangd will not apply any formatting to my code. Since there’s “-clang-tidy-checks” for clang-tidy, it looks reasonable to have the same option for clang-format.
Will be grateful for any feedback, thank you very much!

FormatStyle.patch (1.14 KB)

Hi Dovod,
Sorry for the late reply!
I replied in more detail in https://github.com/clangd/clangd/issues/26, but the short version: