Skip to content

Commit

Permalink
Merge branch 'develop' (v0.48.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
syl20bnr committed Jan 18, 2015
2 parents c298673 + d7273a5 commit 6ec3ec8
Show file tree
Hide file tree
Showing 28 changed files with 593 additions and 513 deletions.
40 changes: 38 additions & 2 deletions contrib/auctex/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,45 @@
# Auctex Layer
# Auctex Layer for Spacemacs

![logo](img/latex.png)

<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc/generate-toc again -->
**Table of Contents**

- [Auctex Layer for Spacemacs](#auctex-layer-for-spacemacs)
- [Description](#description)
- [Install](#install)
- [Features](#features)
- [Company Auctex](#company-auctex)
- [Tags navigation](#tags-navigation)
- [Keybindings](#keybindings)
- [Maintainer](#maintainer)

<!-- markdown-toc end -->

## Description

Includes support for Auctex including some bindings, sane defaults, and manual loading for better startup times.

## Company Auctex
## Install

To use this contribution add it to your `~/.spacemacs`

```elisp
(setq-default dotspacemacs-configuration-layers '(auctex)
"List of contribution to load."
)
```

## Features

### Company Auctex

Along with other things this layer includes company-auctex, it's only enabled if you also enable my other contrib layer `company-mode`.

### Tags navigation

Tags navigation can be performed with key `%` thanks to [evil-matchit][].

## Keybindings

Key Binding | Description
Expand All @@ -30,3 +64,5 @@ Key Binding | Description

This layer was created by and is maintained by @trishume, ping me in the Gitter chat if you have questions. Feel free to submit
PRs for this layer though if you have improvements.

[evil-matchit]: https://github.com/redguardtoo/evil-matchit
Binary file added contrib/auctex/img/latex.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions contrib/auctex/packages.el
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(defvar auctex-packages
'(
auctex
evil-matchit
))

(when (member 'company-mode dotspacemacs-configuration-layers)
Expand Down Expand Up @@ -61,3 +62,6 @@
(setq-default TeX-parse-self t)
(setq-default TeX-master nil)
(setq-default TeX-PDF-mode t))))

(defun auctex/init-evil-matchit ()
(add-hook 'web-mode-hook 'evil-matchit-mode))
12 changes: 10 additions & 2 deletions contrib/git/config.el
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,20 @@
;;
;;; License: GPLv3

;; Variables

(defvar git-enable-github-support nil
"If non nil the Github packages and extensions are enabled.")

(setq git/key-binding-prefixes '(("gh" . "gutter-hunks/highlight")))
(setq magit-completing-read-function 'magit-ido-completing-read)
(defvar git-magit-status-fullscreen nil
"If non nil magit-status buffer is displayed in fullscreen.")

(defvar git-gutter-use-fringe t
"If non nil the fringe is used to display git-gutter icons.")

;; Command prefixes

(setq git/key-binding-prefixes '(("gh" . "gutter-hunks/highlight")))
(when git-enable-github-support
(push (cons "gf" "file") git/key-binding-prefixes)
(push (cons "gg" "gist") git/key-binding-prefixes))
Expand Down
10 changes: 1 addition & 9 deletions contrib/git/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,6 @@
"List of all packages to install and/or initialize. Built-in packages
which require an initialization must be listed explicitly in the list.")

(defvar git-enable-github-support nil
"If non nil enable Github packages.")

(defvar git-magit-status-fullscreen nil
"If non nil magit-status buffer is displayed in fullscreen.")

(defvar git-gutter-use-fringe t
"If non nil the fringe is used to display git-gutter icons.")

(when git-enable-github-support
(mapc (lambda (x) (push x git-packages))
'(
Expand Down Expand Up @@ -170,6 +161,7 @@ which require an initialization must be listed explicitly in the list.")
(use-package magit
:defer t
:init
(setq magit-completing-read-function 'magit-ido-completing-read)
(evil-leader/set-key
"gb" 'magit-blame-mode
"gl" 'magit-log
Expand Down
18 changes: 18 additions & 0 deletions contrib/lang/erlang-elixir/config.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
;;; config.el --- Erlang, Elixir Layer configuration File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3

;; Variables

(defvar spacemacs-erlang-elixir-use-edts nil
"If non-nil then `EDTS' is loaded with `erlang-mode'. This variable
must be defined in `dotspacemacs/init' function to take effect.")

41 changes: 2 additions & 39 deletions contrib/lang/erlang-elixir/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,15 @@

(defvar erlang-elixir-packages
'(
auto-complete
auto-highlight-symbol
edts
elixir-mode
erlang
flycheck
git-gutter-fringe
evil-iedit-state
rainbow-delimiters
ruby-end
smartparens
yasnippet
)
"List of all packages to install and/or initialize. Built-in packages
which require an initialization must be listed explicitly in the list.")

(defvar erlang-elixir-excluded-packages '()
"List of packages to exclude.")

(defvar spacemacs-erlang-elixir-use-edts nil
"If non-nil then `EDTS' is loaded with `erlang-mode'. This variable
must be defined in `dotspacemacs/init' function to take effect.")

(defun erlang-elixir/init-auto-complete ()
(add-hook 'erlang-mode-hook 'auto-complete-mode))

(defun erlang-elixir/init-auto-highlight-symbol ()
(add-hook 'erlang-mode-hook 'auto-highlight-symbol-mode))

(defun erlang-elixir/init-edts ()

(defun erlang-elixir//load-edts ()
Expand Down Expand Up @@ -72,6 +52,8 @@ must be defined in `dotspacemacs/init' function to take effect.")
("\\.hrl?$" . erlang-mode)
("\\.spec?$" . erlang-mode))
:defer t
:init
(add-hook 'erlang-mode-hook (lambda () (run-hooks 'prog-mode-hook)))
:config
(progn
(setq erlang-root-dir "/usr/lib/erlang/erts-5.10.3")
Expand Down Expand Up @@ -105,26 +87,7 @@ must be defined in `dotspacemacs/init' function to take effect.")
(unless spacemacs-erlang-elixir-use-edts
(add-hook 'erlang-mode-hook 'flycheck-mode)))

(defun erlang-elixir/init-git-gutter-fringe ()
(add-hook 'erlang-mode-hook 'git-gutter-mode))

(defun erlang-elixir/init-evil-iedit-state ()
(add-hook 'erlang-mode-hook 'spacemacs/evil-state-lazy-loading))


(defun erlang-elixir/init-rainbow-delimiters ()
(add-hook 'erlang-mode-hook 'turn-on-rainbow-delimiters-mode))

(defun erlang-elixir/init-ruby-end ()
(use-package ruby-end
:defer t
:config (spacemacs|hide-lighter ruby-end-mode)))

(defun erlang-elixir/init-smartparens ()
(add-hook 'erlang-mode-hook
(if dotspacemacs-smartparens-strict-mode
'smartparens-strict-mode
'smartparens-mode)))

(defun erlang-elixir/init-yasnippet ()
(add-hook 'erlang-mode-hook 'spacemacs/load-yasnippet))
7 changes: 0 additions & 7 deletions contrib/lang/haskell/funcs.el

This file was deleted.

9 changes: 9 additions & 0 deletions contrib/lang/haskell/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,15 @@
(add-hook 'haskell-mode-hook 'turn-on-hi2)
:config
(progn

(defun spacemacs/haskell-show-hi2-guides ()
(when (and (boundp 'hi2-mode) hi2-mode)
(hi2-enable-show-indentations)))

(defun spacemacs/haskell-hide-hi2-guides ()
(when (and (boundp 'hi2-mode) hi2-mode)
(hi2-disable-show-indentations)))

;; Show indentation guides for hi2 only in insert state.
(add-hook 'evil-normal-state-entry-hook 'spacemacs/haskell-hide-hi2-guides)
(add-hook 'evil-insert-state-entry-hook 'spacemacs/haskell-show-hi2-guides)
Expand Down
3 changes: 3 additions & 0 deletions contrib/lang/html/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Features:
- Editing HTML and CSS file using [web-mode][]
- Support for Scss and Less files
- Generate HTML and CSS coding using [emmet-mode][]
- Tags navigation on key `%` using [evil-matchit][]

## Install

Expand All @@ -41,3 +42,5 @@ To use this contribution add it to your `~/.spacemacs`

[web-mode]: http://web-mode.org/
[emmet-mode]: https://github.com/smihica/emmet-mode
[evil-matchit]: https://github.com/redguardtoo/evil-matchit

4 changes: 4 additions & 0 deletions contrib/lang/html/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
(defvar html-packages
'(
emmet-mode
evil-matchit
flycheck
helm-css-scss
less-css-mode
Expand Down Expand Up @@ -58,6 +59,9 @@ which require an initialization must be listed explicitly in the list.")
(local-set-key (kbd "<tab>") 'emmet-expand-yas)
(spacemacs|hide-lighter emmet-mode))))

(defun html/init-evil-matchit ()
(add-hook 'web-mode-hook 'evil-matchit-mode))

(defun html/init-scss-mode ()
(use-package scss-mode
:defer t
Expand Down
17 changes: 17 additions & 0 deletions contrib/lang/ruby/config.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
;;; config.el --- Ruby Layer configuration File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3

;; Variables

(defvar ruby-version-manager nil
"If non nil defines the Ruby version manager (i.e. rbenv, rvm)")

3 changes: 0 additions & 3 deletions contrib/lang/ruby/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
"List of all packages to install and/or initialize. Built-in packages
which require an initialization must be listed explicitly in the list.")

(defvar ruby-version-manager nil
"If non nil defines the Ruby version manager (i.e. rbenv, rvm)")

(when ruby-version-manager
(add-to-list 'ruby-packages ruby-version-manager))

Expand Down
15 changes: 15 additions & 0 deletions contrib/perforce/config.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
;;; config.el --- Perforce Layer configuration File for Spacemacs
;;
;; Copyright (c) 2012-2014 Sylvain Benner
;; Copyright (c) 2014-2015 Sylvain Benner & Contributors
;;
;; Author: Sylvain Benner <sylvain.benner@gmail.com>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3

(setq perforce/key-binding-prefixes '(("p4" . "perforce")))
(mapc (lambda (x) (spacemacs/declare-prefix (car x) (cdr x)))
perforce/key-binding-prefixes)
5 changes: 3 additions & 2 deletions contrib/smex/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@ which require an initialization must be listed explicitly in the list.")
"g" 'smex-find-function
"hdf" 'smex-describe-function
"hw" 'smex-where-is))
(key-chord-define ido-completion-map (kbd "jk")
(cdr (assoc 'ido-mode evil-leader--mode-maps))))
;; (key-chord-define ido-completion-map (kbd "jk")
;; (cdr (assoc 'ido-mode evil-leader--mode-maps)))
)

(evil-leader/set-key dotspacemacs-command-key 'spacemacs/smex)
(evil-leader/set-key "m:" 'spacemacs/smex-major-mode-commands)
Expand Down
14 changes: 4 additions & 10 deletions contrib/usr/trishume/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
julia-mode
helm-ag
lua-mode
nix-mode
racket-mode
yaml-mode
ag
aggressive-indent
hungry-delete
))

Expand All @@ -23,6 +23,9 @@
(defun trishume/init-scad-mode ()
(use-package scad-mode :defer t))

(defun trishume/init-nix-mode ()
(use-package nix-mode :defer t))

(defun trishume/init-qml-mode ()
(use-package qml-mode :defer t))

Expand Down Expand Up @@ -63,15 +66,6 @@
'(lambda ()
(define-key racket-mode-map (kbd "H-r") 'racket-run))))))

(defun trishume/init-aggressive-indent ()
(use-package aggressive-indent
:defer t
:init
(evil-leader/set-key
"tA" 'aggressive-indent-mode)
:config
(spacemacs|hide-lighter aggressive-indent-mode)))

(defun trishume/init-hungry-delete ()
(use-package hungry-delete
:init (global-hungry-delete-mode)
Expand Down
3 changes: 1 addition & 2 deletions core/configuration-layer.el
Original file line number Diff line number Diff line change
Expand Up @@ -237,8 +237,7 @@ the following keys:
(dir (plist-get (cdr layer) :dir)))
(dolist (file files)
(let ((file (concat dir file)))
(if (file-exists-p file)
(load file)))))))
(if (file-exists-p file) (configuration-layer/load-file file)))))))

(defsubst configuration-layer//add-layer-to-hash (pkg layer hash)
"Add LAYER to the list value stored in HASH with key PKG."
Expand Down
Loading

0 comments on commit 6ec3ec8

Please sign in to comment.