All Projects → SJrX → systemdUnitFilePlugin

SJrX / systemdUnitFilePlugin

Licence: GPL-2.0 license
No description, website, or topics provided.

Programming Languages

java
68154 projects - #9 most used programming language
groovy
2714 projects
Lex
420 projects
XSLT
1337 projects
HTML
75241 projects
Dockerfile
14818 projects
shell
77523 projects

Unit File Support for systemd

Introduction

This plugin adds support for systemd unit files to IntelliJ.

Features

  • Syntax highlighting for unit files.
  • Auto-completion for:
    • Option names in a section
    • Boolean options
    • Octal options
    • Some other common options (e.g., KillMode=, Type=, Restart=)
    • Unit names in dependencies (e.g., WantedBy=, Requires)
  • Inspections
    • Invalid value for argument.
    • Shell syntax detected in Exec___= call.
    • Unknown option in section (ignoring those starting with X-)
  • Annotations
    • When the section name is invalid.
    • Whitespace after a line continuation \ character.
    • When a key has been deprecated.
  • Built-in documentation for options or section name (available when hitting CTRL+Q or F1 on Mac)

Usage

To create a file simply right click on a folder and New > File, and enter a file name ending any of:

  • .automount
  • .device
  • .mount
  • .path
  • .service
  • .slice
  • .socket
  • .swap
  • .target
  • .timer

The file should then be associated with this plugin and the above features should work.

NOTE: .scope units are not configured via unit configuration files and so we don't support them.

Installation

This plugin is avaliable to install at the JetBrains Plugin Repository.

Contributors

Acknowledgements

License

  • Everything but the logo is GPLv2.
  • Logo is CC-BY-SA, as it is a derivative work from the brand repository.

Development Notes

System Requirements

On top of Java 11, you will need the m4 macro processor installed on your system and available on the path.

Manual Installation

Simply clone the repository, and run

./gradlew buildPlugin 

Then in IntelliJ navigate to

Plugins > Install Plugins From Disk > build/distributions/systemdUnitFilePlugin-X.X-SNAPSHOT.zip

Problems

Weird Fonts In Linux

When starting the development IDE if the fonts are poor add the following ENVIRONMENT VARIABLE to the run configuration

_JAVA_OPTIONS=-Dawt.useSystemAAFontSettings\=lcd -Dsun.java2d.renderer\=sun.java2d.marlin.MarlinRenderingEngine

Note: If you are using the Gradle runIde task it must be passed as an environment variable and not a VM option, because it gets executed in a different VM.

SLF4J Errors when running tests

If you see errors related to duplicate SLF4J class bindings available switch the JRE in use from the Default which references IntelliJ, to a native one.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].