Skip to content

dshin05/tern-coffee

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tern for CoffeeScript plugins

Use a walk around way to let tern.js play with CoffeeScript.

Requirement

Tern.js 0.6 and node environment.

Installation

Use npm to install this plugin in tern's directory.

npm install tern-coffee

For example, vim user:

cd ~/.vim/bundle/tern_for_vim
npm install tern-coffee

Then you must let your editor enable tern for CoffeeScript files. Vim user can install tern_for_vim_coffee. This is very simple plugin. You must install both tern_for_vim and tern_for_vim_coffee

Last part is .tern-project file. It's required to use a plugin. Remember to add coffee to plugin list.

How

Marijn describes how difficult to let tern support a new language. CoffeeScript only have source map support. There is no error tolerance CoffeeScript compiler available. So this is not a perfect solution.

The walk around solution is try to fix the editing CoffeeScript file before compile to JavaScript. Ex:

obj.

Will change to

obj.__fake__

Before compile. There are more fix rules. Not perfect but should ok for normal editing.

The base of source mapping logic is by mntmn.

About

Use a walk around way to let tern.js play with CoffeeScript.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%