I'm not mantaining this extension anymore, please feel free to fork if you think it's still useful.
An Atom Formatter provider built for Artistic Style (astyle).
by default will look for a .astylerc configuration file in the project root folder.
If any configuration is set the default load of the file is disabled and a file can be loaded in the 'options file' section.
Before installing anything for Atom, install Artistic Style.
In Windows, you should make sure that astyle.exe
is visible to formatter-astyle
, so that formatter-astyle
can execute astyle.exe
to actually format the code.
You have two ways to do that.
-
The first way: Set the path of
astyle
you downloaded in the Settings page offormatter-astyle
in Atom.For example:
-
The second way: Copy
astyle.exe
into a folder that is included in thePath
environment variable.You may want to create a new folder and add it to the
Path
environment variable, then copyastyle.exe
into it. Click here for more infomation about how to add a folder to thePath
enviroment variable.
In your terminal:
apm install formatter
apm install formatter-astyle
In Atom, install formatter
and formatter-astyle
from your settings view.
Depends on astyle 2.04, there is a bug in text pipe in earlier versions
This package is a fork of formatter-clang-format, all credits to him, I just wanted to run astyle. ;-)