[Atom] Edit the uncrustify path of atom-beautify

The problem happened when I use atom as programming editor, I installed the atom-beautify which is a very popular plugin can reformat the code.

Some coding languages like clang need to use uncrustify. After installing uncrustify on your mac, you will find that you need to put uncrustify.cfg in your every project folder. It’s very annoying when you have a lot of project to look. So I decided to solve the problem I met.


First, view the source code of atom-beautify:

Then open the folder and file like this:


The path is


edit the source code at line 40:

# configPath = path.resolve(basePath, configPath)
configPath = "~/Documents/uncrustify.cfg"

comment the original code as backup and rewrite one.

In this case I made the configPath as the uncrustify.cfg file in my Documents folder.


After editing, save the file and reopen the atom. You can use atom-beautify with one uncrustify.cfg file.


PS: If you edit the code like me, use the default setting of the plugin which means you don’t need to set any uncrustify.cfg but copy and paste the very .cfg file in the  Documents folder.

One Comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.