Add systemd layer
This commit is contained in:
parent
6f21ccbc64
commit
23006ed21d
2 changed files with 52 additions and 0 deletions
25
layers/+config-files/systemd/README.org
Normal file
25
layers/+config-files/systemd/README.org
Normal file
|
@ -0,0 +1,25 @@
|
|||
#+TITLE: systemd layer
|
||||
#+HTML_HEAD_EXTRA: <link rel="stylesheet" type="text/css" href="../css/readtheorg.css" />
|
||||
|
||||
* Table of Contents :TOC_4_org:noexport:
|
||||
- [[Description][Description]]
|
||||
- [[Install][Install]]
|
||||
- [[Key bindings][Key bindings]]
|
||||
|
||||
* Description
|
||||
This layer provides syntax highlighting for systemd files and completion through
|
||||
=company= if the =auto-completion= layer is used.
|
||||
|
||||
* Install
|
||||
To use this contribution add it to your =~/.spacemacs=
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(setq-default dotspacemacs-configuration-layers '(systemd))
|
||||
#+end_src
|
||||
|
||||
* Key bindings
|
||||
|
||||
| Key Binding | Description |
|
||||
|---------------+--------------------------------------------------------------------------|
|
||||
| ~<SPC> m h d~ | Systemd open the directives documentation |
|
||||
| ~<SPC> m h o~ | Systemd open documentation (if a =\=Documentation= directive is provided |
|
27
layers/+config-files/systemd/packages.el
Normal file
27
layers/+config-files/systemd/packages.el
Normal file
|
@ -0,0 +1,27 @@
|
|||
;;; packages.el --- systemd layer packages file for Spacemacs.
|
||||
;;
|
||||
;; Copyright (c) 2012-2016 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Fabien Dubosson <fabien.dubosson@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(defconst systemd-packages
|
||||
'(systemd)
|
||||
"The list of Lisp packages required by the systemd layer.")
|
||||
|
||||
(defun systemd/init-systemd ()
|
||||
(use-package systemd
|
||||
:defer t
|
||||
:init
|
||||
(when (configuration-layer/package-usedp 'company)
|
||||
(setq systemd-use-company-p t))
|
||||
:config
|
||||
(spacemacs/set-leader-keys-for-major-mode 'systemd-mode
|
||||
"hd" 'systemd-doc-directives
|
||||
"ho" 'systemd-doc-open)))
|
||||
|
||||
;;; packages.el ends here
|
Reference in a new issue