How do I make conform.nvim use my .clang-format file? #2965
Unanswered
samuel-garmany
asked this question in
Q&A
Replies: 1 comment
-
This may work for you. Create return {
{
"stevearc/conform.nvim",
opts = {
formatters_by_ft = {
cpp = { "clang_format" },
},
formatters = {
clang-format = {
prepend_args = {"--style=file:<your_format_file_path>"},
},
},
},
},
} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm trying to make my c++ format according to the style in my
.clang-format
file that exists in the directory of my project. Unfortunately conform isn't using this file, but is formatting to clangd/llvm standards. How do I make my file take precedent?I've added this to my lazy.lua but made no other changes:
I'd assume I should install clang-format somewhere but the formatting already worked somehow and I'm not sure where to add the clang-format package.
Beta Was this translation helpful? Give feedback.
All reactions