conform.nvim icon indicating copy to clipboard operation
conform.nvim copied to clipboard

question:

Open rongbozhu opened this issue 1 year ago • 1 comments

Did you check existing requests?

  • [X] I have searched the existing issues

Describe the feature

How use clang-format to set the format style?such as google or microsoft.I have set the args = { "-assume-filename", "$FILENAME", "--style=Microsoft" },but it didn't work.My configration for conform is that : require("conform").setup({ formatters = { clang_format = { command = "clang-format", args = { "-assume-filename", "$FILENAME", "--style=Microsoft" }, }, )}

Provide background

No response

What is the significance of this feature?

nice to have

Additional details

No response

rongbozhu avatar Apr 01 '24 10:04 rongbozhu

your lua config might seem wrong. Maybe it's lilke that

require("conform").setup({
formatters_by_ft = {
  cpp = { "clang-format" },
},
formatters = {
  ["clang-format"]= {
    prepend_args = { "-style", "Microsoft" },
  },
}

nonotran68 avatar Apr 13 '24 21:04 nonotran68