Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question: #358

Open
1 task done
rongbozhu opened this issue Apr 1, 2024 · 1 comment
Open
1 task done

question: #358

rongbozhu opened this issue Apr 1, 2024 · 1 comment
Labels
enhancement New feature or request question Further information is requested

Comments

@rongbozhu
Copy link

Did you check existing requests?

  • 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 rongbozhu added the enhancement New feature or request label Apr 1, 2024
@nonotran68
Copy link

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" },
},

@stevearc stevearc added the question Further information is requested label Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants