78297be625
* Fix various isolated typos "apppend" -> "append" "availabe" -> "available" "Descripti using ternon" -> "Description" "you have not them" -> "you don't have them" "new on" -> "new one" "plained" -> "curved" "repel" -> "REPL" "vairable" -> "variable" * Fix a few errors in the CoffeeScript layer readme Add a missing "the". Correct a reference to the layer as "javascript" to "coffeescript". Fix the syntax on the link to CoffeeLint. * Fix typos: "dofile" -> "dotfile" * Fix typos: "formated" and "formating" "formated" -> "formatted" "formating" -> "formatting" * hy: Fix docstrings in funcs.el Fix copy-and-pasted docstring text for spacemacs/hy-shell-eval-current-form-and-go and spacemacs/hy-shell-eval-region-and-go. * Fix typos: "indendation" -> "indentation" * Fix typos: "the the", "a a" Fix duplicated (or misplaced) articles. * Fix typos: "wether" -> "whether" * Fix typos: "intialize" -> "initialize"
54 lines
1.7 KiB
Org Mode
54 lines
1.7 KiB
Org Mode
#+TITLE: CoffeeScript layer
|
|
|
|
[[file:img/coffee.png]]
|
|
|
|
* Table of Contents :TOC_4_gh:noexport:
|
|
- [[#description][Description]]
|
|
- [[#features][Features:]]
|
|
- [[#install][Install]]
|
|
- [[#configuration][Configuration]]
|
|
- [[#linting][Linting]]
|
|
- [[#key-bindings][Key Bindings]]
|
|
- [[#repl][REPL]]
|
|
|
|
* Description
|
|
This layer adds support for the CoffeeScript language using [[https://github.com/defunkt/coffee-mode][coffee-mode]].
|
|
|
|
** Features:
|
|
- Syntax highlighting
|
|
- Auto-completion with =auto-completion= layer
|
|
- Syntax checking and linting with =syntax-checking= layer
|
|
- =Org-Babel= integration
|
|
- REPL support
|
|
|
|
* Install
|
|
To use this configuration layer, add it to your =~/.spacemacs=. You will need to
|
|
add =coffeescript= to the existing =dotspacemacs-configuration-layers= list in
|
|
this file.
|
|
|
|
* Configuration
|
|
** Linting
|
|
To enable linting, install [[http://www.coffeelint.org/][CoffeeLint]] with the following command:
|
|
|
|
#+BEGIN_SRC sh
|
|
npm install -g coffeelint
|
|
#+END_SRC
|
|
|
|
* Key Bindings
|
|
|
|
| Key Binding | Description |
|
|
|-------------+------------------------|
|
|
| ~SPC m c c~ | Compile buffer |
|
|
| ~SPC m c r~ | Compile region |
|
|
| ~SPC m T c~ | Toggle compile on save |
|
|
|
|
** REPL
|
|
|
|
| Key Binding | Description |
|
|
|-------------+----------------------------------------------------|
|
|
| ~SPC m '~ | Create or go to REPL |
|
|
| ~SPC m s b~ | Send buffer to REPL |
|
|
| ~SPC m s i~ | Create or go to REPL |
|
|
| ~SPC m s l~ | Send line to REPL |
|
|
| ~SPC m s r~ | send current region to the REPL and stay in buffer |
|