• Stars
    star
    108
  • Rank 321,259 (Top 7 %)
  • Language
    Emacs Lisp
  • Created over 11 years ago
  • Updated about 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Provide a interface for auto-complete.el/flymake.el on typescript-mode.

Japanese

Build Status

What's this?

This is a extension of Emacs that provides completion/syntax-check by using typescript-tools in typescrript-mode.

About typescript-tools, see https://github.com/clausreinke/typescript-tools

Feature

Auto completion by auto-complete.el

demo1

Popup help by popup.el

demo2

Echo method signature by eldoc.el

eldoc

Check syntax by flymake.el

flymake

Jump to definition

Implement inherit definition

impl

Requirement

  • typescript-tools

Install

If use package.el

2013/09/10 It's available by using melpa.

If use el-get.el

2013/08/10 Not yet available.
2013/09/08 It's available. But, master branch only.

If use auto-install.el

(auto-install-from-url "https://raw.github.com/aki2o/emacs-tss/master/tss.el")
(auto-install-from-url "https://raw.github.com/aki2o/emacs-tss/master/typescript.el")
  • In this case, you need to install each of the following dependency.

Manually

Download tss.el and put it on your load-path.

  • In this case, you need to install each of the following dependency.

Dependency

  • auto-complete.el
  • json-mode.el
  • log4e.el
  • yaxception.el

About official TypeScript.el

The official site provides TypeScript.el for Emacs.
But the official Typescript.el has some trouble ( wrong syntax, have no hook ).
So, I have bundled typescript.el as modified version of the official TypeScript.el.

Modification from the official version

$ diff TypeScript.el typescript.el
66c66
< (declare-function ido-mode "ido" ())
---
> (declare-function ido-mode "ido")
486a487,491
> (defcustom typescript-mode-hook nil
>   "*Hook called by `typescript-mode'."
>   :type 'hook
>   :group 'typescript)
> 
3351c3356,3358
<     (font-lock-fontify-buffer)))
---
>     (font-lock-fontify-buffer))
> 
>   (run-mode-hooks 'typescript-mode-hook))
  • It maybe happen that update of the official version is not merged into typescript.el
  • The last date of checking merge is 2013/08/10

Configuration

;; If use bundled typescript.el,
(require 'typescript)
(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-mode))

(require 'tss)

;; Key binding
(setq tss-popup-help-key "C-:")
(setq tss-jump-to-definition-key "C->")
(setq tss-implement-definition-key "C-c i")

;; Make config suit for you. About the config item, eval the following sexp.
;; (customize-group "tss")

;; Do setting recommemded configuration
(tss-config-default)

Consideration

Activation

If you meet the following condition, do not need to do anything.

  • use bundled typescript.el
  • use tss-config-default setting

Otherwise, need M-x tss-setup-current-buffer for activation in typescript-mode.

  • Not activate on the buffer of the mode not included in tss-enable-modes

Deactivation by trouble at typescript-tools

The function of this extension depends on typescript-tools.
And, typescript-tools may become impossible depending on the contents of the buffer.
If it happened, For avoiding Emacs performance degradation,
this extention is deactivated automatically and the following popup notification is shown.

alert

The above case is caused by the contents of the buffer.
So, typescript-tools maybe back to normal by activation after editing of the buffer.
If you want to activate this extension again, do M-x tss-restart-current-buffer.

Also, if you want to stop to use typescript-tools, do M-x tss-stop-current-buffer.

Reflection of the update of referenced path

You can get the external definition using /// <reference path ....
But typescript-tools can not find the update of that.
You have to do M-x tss-reload-current-project if you updated the external definition of current buffer.

Tested On

  • Emacs … GNU Emacs 23.3.1 (i386-mingw-nt5.1.2600) of 2011-08-15 on GNUPACK
  • typescript-tools … master branch
  • auto-complete.el … 1.4.0
  • json-mode.el … 1.1.0
  • log4e.el … 0.2.0
  • yaxception.el … 0.2.0

Enjoy!!!

More Repositories

1

log4e

Provide a logging framework for elisp
Emacs Lisp
58
star
2

plsense

Omni completion tool for Perl
Perl
51
star
3

emacs-bts

A unified user Interface for various bug tracking systems in Emacs
Emacs Lisp
32
star
4

org-ac

Provide auto-complete sources for org-mode.
Emacs Lisp
31
star
5

emacs-pophint

Provide navigation like the Vimperator/KeySnail Hint Mode of Firfox
Emacs Lisp
30
star
6

emacs-plsense

Provide omni completion for Perl.
Emacs Lisp
29
star
7

guide-key-tip

Interface of guide-key.el using pos-tip.el in Emacs
Emacs Lisp
29
star
8

auto-complete-nxml

Provide a interface for auto-complete.el on nXML-mode
Emacs Lisp
21
star
9

emacs-vbasense

Provide the environment like Visual Basic Editor on Emacs
Emacs Lisp
20
star
10

yaxception

Provide a framework of exception like Java for elisp
Emacs Lisp
16
star
11

owdriver

Do various action to other windows quickly in Emacs
Emacs Lisp
11
star
12

emacs-docker-robe

A plugin lets robe.el work under docker container.
Emacs Lisp
9
star
13

auto-complete-pcmp

Provide auto-complete sources using pcomplete results
Emacs Lisp
8
star
14

tern-gas

A plugin of tern for Google Apps Script
JavaScript
8
star
15

direx-grep

Provide incremental search in direx.el buffer
Emacs Lisp
8
star
16

bbdb-

More easily search/choice than BBDB
Emacs Lisp
8
star
17

emacs-bts-github

A plugin of bts for GitHub in Emacs
Emacs Lisp
8
star
18

e2wm-term

Perspective of e2wm.el for work in terminal
Emacs Lisp
7
star
19

emacs-genrnc

Generate RELAX NG Compact Schema from RELAX NG Schema, XML Schema and DTD on Emacs
Emacs Lisp
7
star
20

org-linkany

Insert link using anything.el/helm.el on org-mode
Emacs Lisp
6
star
21

vba-porter

Provide the menu which import/export VBA source files on Excel
Visual Basic
6
star
22

caskxy

Control Cask in Emacs.
Emacs Lisp
5
star
23

e2wm-direx

Plugin of e2wm.el for direx.el
Emacs Lisp
5
star
24

emacs-ctxmenu

Provide a context menu like right-click
Emacs Lisp
4
star
25

.emacs.d

my .emacs.d
Emacs Lisp
3
star
26

org-link-travis

Insert/Export the link of Travis CI on org-mode in Emacs.
Emacs Lisp
3
star
27

emacs-date-field

Date widget in Emacs
Emacs Lisp
3
star
28

gnus-x-gm-raw

Search mail of Gmail using X-GM-RAW as web interface
Emacs Lisp
2
star
29

e2wm-sww

Plugin of e2wm.el to switch plugin quickly
Emacs Lisp
2
star
30

esal

Go
2
star
31

activerecord-bixformer

a framework for cross transformer between activerecord and other format data
Ruby
1
star
32

one-key-local

Create One Key Menu for any major-mode/minor-mode
Emacs Lisp
1
star
33

plsense-direx

Perl Package Explorer in Emacs.
Emacs Lisp
1
star
34

e2wm-pkgex4pl

Plugin of e2wm.el for package explorer of Perl
Emacs Lisp
1
star
35

emacs-docker-projectile-rails

Emacs Lisp
1
star