Skip to content

Commit

Permalink
Disable clang-format
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
kolyshkin committed Feb 2, 2023
1 parent 32d7413 commit 81ca678
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -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
...

0 comments on commit 81ca678

Please sign in to comment.