Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

raph-amiard/sublime-typescript

Repository files navigation

WARNING

UPDATE : A new project, T3S, has risen, and does all this project does apparently, and more, so give it a try !

THIS PLUGIN IS NOT MAINTAINED ANYMORE, AND WILL NOT BE. IF YOU NEED IMPROVEMENTS/BUG FIXES YOU WILL HAVE TO DO THEM YOURSELF. IF YOU WANT TO TAKE OWNERSHIP OF THE PROJECT, JUST TELL ME AND I WILL BE HAPPY TO GIVE IT TO YOU.

Sublime-Typescript

A Sublime Text plugin for the Typescript language

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