Posted: 2016-08-28 13:51:25 by Alasdair Keyes
Over the past week, I've been trying to move towards using an IDE for my personal projects. I use PHPStorm at work, however I would like to use Open Source at home. I like the power of VIM, but sometimes I feel like I'm being held back by not utilising the full functionality available on a dedicated IDE. I've been doing a bit of testing and I quite like Github's Atom IDE.
There's more than enough posts about what's good and bad with it, I won't rehash it. However I do like the extensibility of it, having installed a number of packages to provide extra functionality. In keeping with being able to set up my machines from a fresh install with Puppet.. The following puppet snippet will install atom and the required packages from the $apm_packages
array.
Due to the use of the puppet "each" function you will need to run this with the future parser option puppet apply --parser=future puppet_file.pp
$apm_packages = [
"file-watcher",
"perltidy",
"perldoc",
"linter-perl",
"linter-puppet",
"language-puppet",
]
$my_system_user = "bill";
file { "personal_atom_package_folder":
path => "/home/$my_system_user/.atom/packages/",
ensure => "directory",
require => Package["atom"],
}
each($apm_packages) |$package_name| {
exec { "apm_$package_name":
path => [ "/usr/bin", "/bin" ],
command => "apm install $package_name",
creates => "/home/$my_system_user/.atom/packages/$package_name",
user => $my_system_user,
environment => ["HOME=/home/$my_system_user"],
require => Package["atom"],
}
}
If you found this useful, please feel free to donate via bitcoin to 1NT2ErDzLDBPB8CDLk6j1qUdT6FmxkMmNz
© Alasdair Keyes
I'm now available for IT consultancy and software development services - Cloudee LTD.
Happy user of Digital Ocean (Affiliate link)