Difference between revisions of "TypeScript"

From WikEmacs
Jump to navigation Jump to search
(error checker, formatter, spacemacs)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
How can we program in TypeScript in Emacs ? Let's dive in.
 
How can we program in TypeScript in Emacs ? Let's dive in.
 +
 +
= Typescript.el - syntax highlighting and indentation =
 +
 +
[https://github.com/ananthakumaran/typescript.el typescript.el] (in MELPA) offers simple syntax highlighting and indentation support. For advanced features, see Tide below.
  
 
= Tide - Typescript Interactive Development for Emacs =
 
= Tide - Typescript Interactive Development for Emacs =
Line 21: Line 25:
 
It uses [https://github.com/Microsoft/TypeScript/pull/2041 tsserver] as the backend for most of the features. It writes out a comprehensive log file.
 
It uses [https://github.com/Microsoft/TypeScript/pull/2041 tsserver] as the backend for most of the features. It writes out a comprehensive log file.
  
 +
= Emacs-tss =
 +
 +
see [https://github.com/aki2o/emacs-tss emacs-tss]. It provides completion, syntax-check (flymake) and jump to definitions by using [https://github.com/clausreinke/typescript-tools typescript-tools].
 +
 +
= Error checker =
 +
 +
For an error checker, see [https://github.com/Simplify/flycheck-typescript-tslint flycheck-typescript-tslint].
 +
 +
= Formatter =
 +
 +
See [https://github.com/vvakame/typescript-formatter typescript-formatter].
 +
 +
= See also =
 +
 +
== Spacemacs layer ==
 +
 +
Spacemacs, a popular Emacs distribution, has a prebuilt [https://spacemacs.org/layers/+lang/typescript/README.html Typescript layer]. It uses the aforementioned Tide, error checker and the optional formatter.
  
[[File:Typescript.gif|300px]]
 
  
 
[[Category:Programming languages]]
 
[[Category:Programming languages]]
 
[[Category:Programming]]
 
[[Category:Programming]]

Latest revision as of 13:07, 10 May 2017

How can we program in TypeScript in Emacs ? Let's dive in.

Typescript.el - syntax highlighting and indentation

typescript.el (in MELPA) offers simple syntax highlighting and indentation support. For advanced features, see Tide below.

Tide - Typescript Interactive Development for Emacs

Tide features:

  • ElDoc
  • Auto complete
  • Flycheck
  • Jump to definition, Jump to type definition
  • Find occurrences
  • Rename symbol
  • Imenu
  • Compile On Save
  • Highlight Identifiers
  • Code Fixes
  • supports jsx files
  • format options via elisp or tsfmt.json
  • works well with js2-mode

It uses tsserver as the backend for most of the features. It writes out a comprehensive log file.

Emacs-tss

see emacs-tss. It provides completion, syntax-check (flymake) and jump to definitions by using typescript-tools.

Error checker

For an error checker, see flycheck-typescript-tslint.

Formatter

See typescript-formatter.

See also

Spacemacs layer

Spacemacs, a popular Emacs distribution, has a prebuilt Typescript layer. It uses the aforementioned Tide, error checker and the optional formatter.