[clangd-dev] Specifying format style using command line option
Dovod Dovodov via clangd-dev
clangd-dev at lists.llvm.org
Fri Mar 22 14:56:07 PDT 2019
Hello guys.
This is my first attempt contributing 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
insert too much new symbols 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!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/clangd-dev/attachments/20190323/e7175ed6/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: FormatStyle.patch
Type: text/x-patch
Size: 1161 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/clangd-dev/attachments/20190323/e7175ed6/attachment-0001.bin>
More information about the clangd-dev
mailing list