From 81ca678f81048379896a16a9c1d7031b7702ad1d Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 2 Feb 2023 10:42:30 -0800 Subject: [PATCH] Disable clang-format For the sake of developers who have LSP configured to auto-format the code upon save (that would me with my new nvim setup), let's not autoformat the C code when using clangd. Initially I tried to write a set of rules for clang-format which is identical to what we use (indent with a handful of options invoked from cfmt target in Makefile), but it appears to be impossible. Signed-off-by: Kir Kolyshkin --- .clang-format | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .clang-format diff --git a/.clang-format b/.clang-format new file mode 100644 index 000000000..fc64cb573 --- /dev/null +++ b/.clang-format @@ -0,0 +1,8 @@ +--- +# We use GNU indent from the Makefile to format C code in this project. Alas, +# there is no way to map indent options to clang-format style options in a way +# to achieve identical results for both formatters. +# +# Therefore, let's disable clang-format entirely. +DisableFormat: true +...