Adding edit-server layer.
This commit is contained in:
parent
2389fea56c
commit
3abb869f73
43
contrib/tools/edit-server/README.md
Normal file
43
contrib/tools/edit-server/README.md
Normal file
|
@ -0,0 +1,43 @@
|
|||
# edit-server contribution layer for Spacemacs
|
||||
|
||||
![logo](img/chrome.png)
|
||||
|
||||
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc/generate-toc again -->
|
||||
**Table of Contents**
|
||||
|
||||
- [edit-server contribution layer for Spacemacs](#edit-server-contribution-layer-for-spacemacs)
|
||||
- [Description](#description)
|
||||
- [Install](#install)
|
||||
- [Configuration](#configuration)
|
||||
|
||||
<!-- markdown-toc end -->
|
||||
|
||||
## Description
|
||||
|
||||
This layer provides [edit-server](http://melpa.org/#/edit-server) - a server that responds to edit requests from Chrome. The package is required by the [Edit with Emacs](https://chrome.google.com/webstore/detail/edit-with-emacs/ljobjlafonikaiipfkggjbhkghgicgoh) Google Chrome extension.
|
||||
|
||||
More information can be found on [Emacs Wiki](http://www.emacswiki.org/emacs/Edit_with_Emacs).
|
||||
|
||||
## Install
|
||||
|
||||
To use this contribution add it to your `~/.spacemacs`
|
||||
|
||||
```elisp
|
||||
(setq-default dotspacemacs-configuration-layers '(edit-server))
|
||||
```
|
||||
|
||||
The server is configured to start when the editor is opened.
|
||||
|
||||
## Configuration
|
||||
|
||||
You can hook into `edit-server`'s provided hooks in `dotspacemacs/config` in your `.spacemacs` file.
|
||||
|
||||
```elisp
|
||||
(defun dotspacemacs/config ()
|
||||
;; Open github text areas as markdown
|
||||
(add-hook 'edit-server-start-hook
|
||||
(lambda ()
|
||||
(when (string-match "github.com" (buffer-name))
|
||||
(markdown-mode))))
|
||||
)
|
||||
```
|
BIN
contrib/tools/edit-server/img/chrome.png
Normal file
BIN
contrib/tools/edit-server/img/chrome.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 28 KiB |
18
contrib/tools/edit-server/packages.el
Normal file
18
contrib/tools/edit-server/packages.el
Normal file
|
@ -0,0 +1,18 @@
|
|||
;;; packages.el --- edit-server Layer packages File for Spacemacs
|
||||
;;
|
||||
;; Copyright (c) 2012-2014 Sylvain Benner
|
||||
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
|
||||
;;
|
||||
;; Author: Ben Hayden <hayden767@gmail.com>
|
||||
;; URL: https://github.com/syl20bnr/spacemacs
|
||||
;;
|
||||
;; This file is not part of GNU Emacs.
|
||||
;;
|
||||
;;; License: GPLv3
|
||||
|
||||
(setq edit-server-packages '(edit-server))
|
||||
|
||||
(defun edit-server/init-edit-server ()
|
||||
(use-package edit-server
|
||||
:init (eval-after-load 'edit-server
|
||||
'(edit-server-start))))
|
Loading…
Reference in a new issue