I use Geany to develop our Puppet source. * However, Geany doesn’t support Puppet manifests natively, and I couldn’t find a working example of someone who has done it. So here it is. Come and index, search engines!
* Yes, I’m aware that there are better and more feature-rich IDEs out there. But I’m happy enough with Geany for now.
Geany has a basic guide on custom filetypes. To add support for Puppet manifests, normally ending in .pp, we have to first define a “Puppet manifest” file type. Then we have to associate *.pp files with Puppet, and not Pascal. Here’s the easy way: unpack my Puppet manifest configuration for Geany in ~/.config/geany/.
Or, do it the manual way. These customisations override the files in /usr/share/geany/, which is a handy template for your changes.
First create ~/.config/geany/filedefs/filetypes.Puppet manifest.conf
. If you don’t like spaces in filenames, call it something else. But take note, as you’ll use it later.
# 2013-07-09 - Puppet manifest definition for Geany [styling=Ruby] [keywords=Ruby] [settings] lexer_filetype=Ruby tag_parser=Ruby extension=pp [indentation] width=2 type=1 [build_settings] compiler=puppet parser validate "%f" run_cmd=puppet apply --noop "%f"
Then create or edit ~/.config/geany/filetype_extensions.conf
.
# 2013-07-09 - overrides for custom filetypes [Extensions] Pascal=*.pas;*.inc;*.dpr;*.dpk; Puppet manifest=*.pp; [Groups] Script=Puppet manifest
Suggestions welcome.
No comments
Comments feed for this article
Trackback link: https://www.tolaris.com/2013/07/10/recognising-puppet-manifests-in-geany/trackback/