Skip to content

bgmort/sublime-typescript

 
 

Repository files navigation

Sublime-Typescript

A Sublime Text plugin for the Typescript language. Versions for both Sublime Text 2 and Sublime Text 3 are available through the st2 and master branches.

Installation

You need to have node.js installed before anything.

Clone the repository in your sublime "Packages" directory. You also need to ensure that the node executable is on your path, or that the "node_path" key is set somewhere in a typescript.sublime-settings settings file that sublime text can reach.

git clone https://github.com/raph-amiard/sublime-typescript

After that you're set and you can use the plugin ! First run might take long to set up, and it will need an internet connection, because the plugin is actually :

  • Getting the typescript sources online.
  • Compiling it's JS part the first time you will use it.

After that you can use the plugin offline. If you don't have an internet connection, getting typescript sources and putting them in the lib/typescript directory will work too.

Usage

For the moment the functionnality is very basic :

  • Errors get highlighted and the errors messages shows in the status bar
  • Autocompletion works (quite well thanks to the TypeScript language service)

Autocompletion feature screenshot

### Settings

All the settings discussed here can be set either in the typescript.sublime-settings file of the plugin folder, or in your own typescript.sublime-settings, as is usual with sublime text configuration

Node path

If node isn't on your path, or you want to set the node executable path manually, you can set the "node_path" key to refer to the node executable path, including the executable name.

{
    "node_path":"/my/path/to/node/node"
}

Projects

By default, a new instance of the plugin server is created for every file. The TypeScript language service has an odd behaviour, as in, every file you add to the service will be considered to be in the same compilation unit as the others. If you want to specify to the plugin that some files are part of the same project, put a .sublimets file in the folder. If you don't do that, every file will be opened in a separate plugin instance

About

A sublime plugin for the typescript language - WIP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 93.7%
  • TypeScript 5.9%
  • Python 0.4%