Skip to content

Commit

Permalink
Add ebuild-mode
Browse files Browse the repository at this point in the history
Adds ebuild-mode layer for development of Gentoo ebuilds, as requested
in Github bug syl20bnr#6606
  • Loading branch information
Kai Wohlfahrt committed May 8, 2017
1 parent a213729 commit 2d8ded8
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
25 changes: 25 additions & 0 deletions layers/+lang/ebuild/README.org
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#+TITLE: Ebuild contribution layer for Spacemacs

[[file:img/gentoo.png]]

* Table of Contents :TOC_4_gh:noexport:
- [[#description][Description]]
- [[#install][Install]]
- [[#key-bindings][Key bindings]]

* Description
This layer supports [[https://gentoo.org][Gentoo]] [[https://devmanual.gentoo.org/ebuild-writing/index.html][ebuild]] and [[https://devmanual.gentoo.org/eclass-writing/index.html][eclass]] development in Spacemacs.

* Install
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
add =ebuild= to the existing =dotspacemacs-configuration-layers= list in this
file.

* Key bindings

| Key Binding | Description |
|-------------+------------------------|
| ~SPC m n~ | Insert skeleton ebuild |
| ~SPC m k~ | Edit keywords |
| ~SPC m e~ | Run ebuild command |
| ~SPC m a~ | Add ChangeLog entry |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions layers/+lang/ebuild/packages.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
;;; packages.el --- ebuild layer packages file for Spacemacs.
;;
;; Copyright (c) 2012-2017 Kai Wohlfahrt & Contributors
;;
;; Author: <https://github.com/kwohlfahrt>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3

(defun ebuild/init-ebuild-mode ()
(use-package ebuild-mode
:defer t
:mode ("\\.\\(ebuild\\|eclass\\)" . ebuild-mode)
:init
(progn
(spacemacs/set-leader-keys-for-major-mode 'ebuild-mode
"n" 'ebuild-mode-insert-skeleton
"k" 'ebuild-mode-keyword
"e" 'ebuild-run-command
"a" 'ebuild-run-echangelog))))

(defconst ebuild-packages
'((ebuild-mode :location (recipe :fetcher github
:repo "emacsmirror/ebuild-mode"))))

0 comments on commit 2d8ded8

Please sign in to comment.