2015-04-14 21:43:50 +00:00
|
|
|
# TypeScript contribution layer for Spacemacs
|
|
|
|
|
|
|
|
![logo](img/TypeScript.png)
|
|
|
|
|
|
|
|
<!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc/generate-toc again -->
|
|
|
|
**Table of Contents**
|
|
|
|
|
|
|
|
- [TypeScript contribution layer for Spacemacs](#typescript-contribution-layer-for-spacemacs)
|
|
|
|
- [Description](#description)
|
|
|
|
- [Install](#install)
|
|
|
|
- [Prerequisites](#prerequisites)
|
|
|
|
- [Key bindings](#key-bindings)
|
|
|
|
|
|
|
|
<!-- markdown-toc end -->
|
|
|
|
|
|
|
|
## Description
|
|
|
|
|
2015-05-08 04:16:26 +00:00
|
|
|
This layer adds support for TypeScript editing via [typescript-tools][] and
|
|
|
|
[emacs-tss][].
|
2015-04-14 21:43:50 +00:00
|
|
|
|
2015-05-08 04:16:26 +00:00
|
|
|
This layer provides:
|
2015-04-14 21:43:50 +00:00
|
|
|
- syntax coloring
|
|
|
|
- error highlighting
|
2015-05-08 04:16:26 +00:00
|
|
|
- auto-completion via Flymake
|
2015-04-14 21:43:50 +00:00
|
|
|
- jump-to-definition
|
|
|
|
|
|
|
|
## Install
|
|
|
|
|
2015-05-08 04:16:26 +00:00
|
|
|
### Layer
|
|
|
|
|
2015-04-14 21:43:50 +00:00
|
|
|
To use this contribution add it to your `~/.spacemacs`
|
|
|
|
|
|
|
|
```elisp
|
|
|
|
(setq-default dotspacemacs-configuration-layers '(typescript))
|
|
|
|
```
|
|
|
|
|
|
|
|
### Prerequisites
|
|
|
|
|
2015-05-08 04:16:26 +00:00
|
|
|
You'll need [typescript-tools][] and fairly obviously also the TypeScript
|
|
|
|
compiler:
|
2015-04-14 21:43:50 +00:00
|
|
|
|
2015-05-08 04:16:26 +00:00
|
|
|
```sh
|
2015-04-14 21:43:50 +00:00
|
|
|
$ npm install typescript
|
|
|
|
$ git clone git://github.com/clausreinke/typescript-tools.git
|
|
|
|
$ cd typescript-tools/
|
|
|
|
$ npm install -g
|
|
|
|
```
|
|
|
|
|
|
|
|
## Key bindings
|
|
|
|
|
|
|
|
Key Binding | Description
|
|
|
|
--------------|------------------------------------------------------------
|
2015-05-08 04:16:26 +00:00
|
|
|
`<SPC> m g g` | Jump to definition
|
|
|
|
`<SPC> m h h` | Show popup help (with type info)
|
|
|
|
|
|
|
|
[emacs-tss]: https://github.com/aki2o/emacs-tss
|
|
|
|
[typescript-tools]: https://github.com/clausreinke/typescript-tools
|