Commit c298673b authored by syl20bnr's avatar syl20bnr
Browse files

Merge branch 'develop' (v0.47.0)

parents af8394ea ccb1a092
branches:
only:
- master
- develop
before_install:
sudo add-apt-repository -y ppa:ubuntu-elisp/ppa &&
sudo apt-get -qq update &&
sudo apt-get -qq -f install &&
sudo apt-get -qqy install emacs-snapshot;
script:
emacs -batch -l ert -l core/test/* -f ert-run-tests-batch-and-exit
\ No newline at end of file
***
![title](https://raw.githubusercontent.com/syl20bnr/spacemacs/master/doc/img/title.png)
[![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/syl20bnr/spacemacs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)[![Twitter][]](http://www.twitter.com/spacemacs)
[philosophy][] | [goals][] | [for who?][] | [screenshots][] | [documentation][DOCUMENTATION.md] | [contribute][CONTRIBUTE.md] | [achievements][] | [FAQ][]
***
[![Build Status](https://travis-ci.org/syl20bnr/spacemacs.svg)](https://travis-ci.org/syl20bnr/spacemacs) [![Gitter](https://badges.gitter.im/Join Chat.svg)](https://gitter.im/syl20bnr/spacemacs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)[![Twitter][]](http://www.twitter.com/spacemacs)
***
**Quick Install:**
......@@ -358,7 +360,7 @@ on buffer empty lines have the same limitations).
## Windows
1. **Why the fonts on Windows looks so crappy ?**
You can installed [MacType][] on Windows to get very nice looking fonts. It is
You can install [MacType][] on Windows to get very nice looking fonts. It is
also recommended to disable the smooth scrolling on Windows.
2. **How to fix the error: The directory ~/.emacs.d/server is unsafe ?**
......
......@@ -2,10 +2,6 @@
Includes support for Auctex including some bindings, sane defaults, and manual loading for better startup times.
## Manual Loading
In order to load AucTex properly you must use `SPC e l` before opening any TeX files.
## 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`.
......@@ -14,7 +10,7 @@ Along with other things this layer includes company-auctex, it's only enabled if
Key Binding | Description
--------------------|------------------------------------------------------------------
<kbd>SPC m b </kbd>| build and view
<kbd>SPC m b </kbd>| build and view
<kbd>SPC m e </kbd>| insert LaTeX environment
<kbd>SPC m c </kbd>| close LaTeX environment
<kbd>SPC m i </kbd>| insert `\item`
......@@ -27,7 +23,7 @@ Key Binding | Description
<kbd>SPC m p s</kbd>| preview section
<kbd>SPC m p p</kbd>| preview at point
<kbd>SPC m p f</kbd>| cache preamble for preview
<kbd>SPC m p c</kbd>| clear previews
<kbd>SPC m p c</kbd>| clear previews
<kbd>SPC m *</kbd> | TeX documentation, can be very slow
## Maintainer
......
......@@ -7,60 +7,57 @@
(add-to-list 'auctex-packages 'company-auctex))
(defun auctex/init-auctex ()
(defun load-auctex-on-demand ()
(interactive)
(use-package tex
:config
(progn
(when (member 'company-mode dotspacemacs-configuration-layers)
(use-package company-auctex
:init (company-auctex-init)))
(defun auctex/build-view ()
(interactive)
(if (buffer-modified-p)
(progn
(let ((TeX-save-query nil))
(TeX-save-document (TeX-master-file)))
(setq build-proc (TeX-command "LaTeX" 'TeX-master-file -1))
(set-process-sentinel build-proc 'auctex/build-sentinel))
(TeX-view)))
(defun auctex/build-sentinel (process event)
(if (string= event "finished\n")
(TeX-view)
(message "Errors! Check with C-`")))
(add-hook 'LaTeX-mode-hook '(lambda () (local-set-key (kbd "H-r") 'auctex/build-view)))
(add-hook 'LaTeX-mode-hook 'flyspell-mode)
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
(add-hook 'LaTeX-mode-hook 'spacemacs/load-yasnippet)
(setq spacemacs/key-binding-prefixes '(("mp" . "LaTeX Preview")))
(evil-leader/set-key-for-mode 'latex-mode
"mb" 'auctex/build-view
"me" 'LaTeX-environment
"mc" 'LaTeX-close-environment
"mi" 'LaTeX-insert-item
"mf" 'TeX-font ;; Find a way to rebind tex-fonts
"mC" 'TeX-command-master
"mpr" 'preview-region
"mpb" 'preview-buffer
"mpd" 'preview-document
"mpe" 'preview-environment
"mps" 'preview-section
"mpp" 'preview-at-point
"mpf" 'preview-cache-preamble
"mpc" 'preview-clearout
"mhd" 'TeX-doc ;; TeX-doc is a very slow function
)
(setq-default TeX-auto-save t)
(setq-default TeX-parse-self t)
(setq-default TeX-master nil)
(setq-default TeX-PDF-mode t))))
(evil-leader/set-key
"el" 'load-auctex-on-demand))
(use-package tex
:defer t
:config
(progn
(when (member 'company-mode dotspacemacs-configuration-layers)
(use-package company-auctex
:init (company-auctex-init)))
(defun auctex/build-view ()
(interactive)
(if (buffer-modified-p)
(progn
(let ((TeX-save-query nil))
(TeX-save-document (TeX-master-file)))
(setq build-proc (TeX-command "LaTeX" 'TeX-master-file -1))
(set-process-sentinel build-proc 'auctex/build-sentinel))
(TeX-view)))
(defun auctex/build-sentinel (process event)
(if (string= event "finished\n")
(TeX-view)
(message "Errors! Check with C-`")))
(add-hook 'LaTeX-mode-hook '(lambda () (local-set-key (kbd "H-r") 'auctex/build-view)))
(add-hook 'LaTeX-mode-hook 'flyspell-mode)
(add-hook 'LaTeX-mode-hook 'LaTeX-math-mode)
(add-hook 'LaTeX-mode-hook 'spacemacs/load-yasnippet)
(setq spacemacs/key-binding-prefixes '(("mp" . "LaTeX Preview")))
(evil-leader/set-key-for-mode 'latex-mode
"mb" 'auctex/build-view
"me" 'LaTeX-environment
"mc" 'LaTeX-close-environment
"mi" 'LaTeX-insert-item
"mf" 'TeX-font ;; Find a way to rebind tex-fonts
"mC" 'TeX-command-master
"mpr" 'preview-region
"mpb" 'preview-buffer
"mpd" 'preview-document
"mpe" 'preview-environment
"mps" 'preview-section
"mpp" 'preview-at-point
"mpf" 'preview-cache-preamble
"mpc" 'preview-clearout
"mhd" 'TeX-doc ;; TeX-doc is a very slow function
)
(setq-default TeX-auto-save t)
(setq-default TeX-parse-self t)
(setq-default TeX-master nil)
(setq-default TeX-PDF-mode t))))
;;; config.el --- Colors 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
;; ---------------------------------------------------------------------------
;; Prefixes
;; ---------------------------------------------------------------------------
......
;;; packages.el --- Colors Layer packages 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
(defvar colors-packages
'(
rainbow-identifiers
......
......@@ -35,49 +35,7 @@
(defun company-mode/more-than-prefix-guesser ()
(unless company-clang-arguments
(let* ((cc-file (company-mode/find-clang-complete-file))
(flags (when cc-file (company-mode/load-clang-complete-file cc-file))))
(when flags (setq-local company-clang-arguments flags))))
(flags (if cc-file (company-mode/load-clang-complete-file cc-file) '())))
(setq-local company-clang-arguments flags)
(setq flycheck-clang-args flags)))
(company-clang-guess-prefix))
; START Based on the built in flycheck-clang c++ checker
(eval-after-load 'flycheck
'(progn
(flycheck-define-checker c/c++-company
"A C/C++ syntax checker using parameters from clang-complete"
:command ("clang"
"-fsyntax-only"
"-fno-color-diagnostics" ; Do not include color codes in output
"-fno-caret-diagnostics" ; Do not visually indicate the source
; location
"-fno-diagnostics-show-option" ; Do not show the corresponding
; warning group
"-x" (eval
(pcase major-mode
(`c++-mode "c++")
(`c-mode "c")))
(option-list "" company-clang-arguments concat)
source)
:error-patterns
((error line-start
(message "In file included from") " " (file-name) ":" line ":"
line-end)
(info line-start (file-name) ":" line ":" column
": note: " (optional (message)) line-end)
(warning line-start (file-name) ":" line ":" column
": warning: " (optional (message)) line-end)
(error line-start (file-name) ":" line ":" column
": " (or "fatal error" "error") ": " (optional (message)) line-end))
:error-filter
(lambda (errors)
(let ((errors (flycheck-sanitize-errors errors)))
(dolist (err errors)
;; Clang will output empty messages for #error/#warning pragmas without
;; messages. We fill these empty errors with a dummy message to get
;; them past our error filtering
(setf (flycheck-error-message err)
(or (flycheck-error-message err) "no message")))
(flycheck-fold-include-levels errors "In file included from")))
:modes (c-mode c++-mode)
:next-checkers ((warning . c/c++-cppcheck)))
(add-to-list 'flycheck-checkers 'c/c++-company)))
; END
# dash contribution layer for Spacemacs
![logo](img/dash.png)
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc/generate-toc again -->
**Table of Contents**
- [dash contribution layer for Spacemacs](#dash-contribution-layer-for-spacemacs)
- [Description](#description)
- [Install](#install)
- [Dash](#dash)
- [Key bindings](#key-bindings)
- [TODO](#todo)
- [Check zeal](#check-zeal)
- [Check helm-dash](#check-helm-dash)
<!-- markdown-toc end -->
**This layer works only on OS X for the moment**
## Description
[dash][] is a great tool for quick access to various sets of documentation.
[dash-at-point][] is the package used to integrate `dash` in Emacs. It will try
to intelligently guess specific docsets to use based off of your current mode.
## Install
To use this contribution add it to your `~/.spacemacs`
```elisp
(setq-default dotspacemacs-configuration-layers '(dash)
"List of contribution to load."
)
```
### Dash
You have to install [dash][] on your machine.
It is recommended to set the `HUD mode` in your Dash application preferences
when using this layer.
See the documentation [dash-at-point][dash-at-point-usage] for more information
on customizing specific docsets for modes.
## Key bindings
Key Binding | Description
--------------------|---------------------------------------------------------
<kbd>SPC d d</kbd> | Lookup thing at point in Dash
<kbd>SPC d D</kbd> | Lookup thing at point in Dash within a specified Docset
## TODO
### Check zeal
[zeal][] is an open source alternative to dash with Emacs integration available.
### Check helm-dash
dash-at-point is linked to the GUI app and is only available for OSX. Another
project, [helm-dash](https://github.com/areina/helm-dash) is in the works.
It appears to currently only be available for linux though, but working towards
mac and windows support. It would be great to supplement or even replace
dash-at-point considering that it doesn't require paying for the app, and
integrates with helm.
[dash]: http://kapeli.com/dash
[dash-at-point]: https://github.com/stanaka/dash-at-point
[dash-at-point-usage]: https://github.com/stanaka/dash-at-point#Usage
[helm-dash]: https://github.com/areina/helm-dash
[zeal]: http://zealdocs.org/
contrib/dash/img/dash.png

37.7 KB

(defvar dash-packages
'()
"List of all packages to install and/or initialize. Built-in packages
which require an initialization must be listed explicitly in the list.")
(if (system-is-mac)
(push 'dash-at-point dash-packages))
(defun dash/init-dash-at-point ()
(use-package dash-at-point
:commands dash-at-point
:init
(evil-leader/set-key "dd" 'dash-at-point)
(evil-leader/set-key "dD" 'dash-at-point-with-docset)))
;;; config.el --- Git 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
(defvar git-enable-github-support nil
"If non nil the Github packages and extensions are enabled.")
......
;;; packages.el --- Git Layer packages 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
(defvar git-packages
'(
fringe-helper
......
;;; packages.el --- C/C++ Layer packages 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
(defvar c-c++-packages
'(
cc-mode
......
;;; packages.el --- Erlang and Elixir Layer packages 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
(defvar erlang-elixir-packages
'(
auto-complete
......
;;; packages.el --- ESS (R) Layer packages 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
(defvar ess-packages
'(
ess
......
;;; packages.el --- Haskell Layer packages 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
(defvar haskell-packages
'(
flycheck
......
;;; packages.el --- HTTP Layer packages 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
(defvar html-packages
'(
emmet-mode
......
;;; packages.el --- Javascript Layer packages 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
(defvar javascript-packages
'(
coffee-mode
......
# Lua contribution layer for Spacemacs
![logo](img/lua.gif)
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc/generate-toc again -->
**Table of Contents**
- [Lua contribution layer for Spacemacs](#lua-contribution-layer-for-spacemacs)
- [Description](#description)
- [Install](#install)
- [Key Bindings](#key-bindings)
<!-- markdown-toc end -->
## Description
This layer adds support for editing Lua.
Features:
- Editing lua files using [lua-mode][]
- Sending code to a lua REPL
## Install
To use this contribution add it to your `~/.spacemacs`
```elisp
(setq-default dotspacemacs-configuration-layers '(lua)
"List of contribution to load."
)
```
## Key Bindings
### commands
Key Binding | Description
---------------------|------------------------------------------------------------
<kbd>SPC m d</kbd> | lookup thing at point in lua documentation
<kbd>SPC m s b</kbd> | send buffer contents to REPL
<kbd>SPC m s f</kbd> | send current function to REPL
<kbd>SPC m s l</kbd> | send current line to REPL
<kbd>SPC m s r</kbd> | send current region to REPL
[lua-mode]: https://github.com/immerrr/lua-mode
contrib/lang/lua/img/lua.gif

9.58 KB

Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment