Ask Your Question
4

What are the steps to set up Uncrustify in VS Code to format code automatically upon saving?

asked 2023-05-28 15:03:14 +0000

scrum gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-05-28 15:24:01 +0000

lalupa gravatar image
  1. Install the Uncrustify extension in VS Code.
  2. Install the Uncrustify binary on your machine.
  3. Open VS Code settings (Code -> Preferences -> Settings).
  4. Search for "uncrustify.path" and set the path to the uncrustify binary.
  5. Search for "editor.formatOnSave" and enable it.
  6. Search for "editor.defaultFormatter" and set it to "uncrustify".
  7. Save the settings file.

After completing these steps, your code will be automatically formatted with Uncrustify when you save the file.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-05-28 15:03:14 +0000

Seen: 7 times

Last updated: May 28 '23