https://github.com/Slava/tern-meteor
Autocompletion plugin for Meteor 1.0 (extending TernJS)
https://github.com/Slava/tern-meteor
Last synced: 2 days ago
JSON representation
Autocompletion plugin for Meteor 1.0 (extending TernJS)
- Host: GitHub
- URL: https://github.com/Slava/tern-meteor
- Owner: Slava
- License: mit
- Created: 2013-12-28T07:34:51.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2015-12-11T16:43:16.000Z (over 10 years ago)
- Last Synced: 2026-03-12T23:14:37.560Z (3 months ago)
- Language: JavaScript
- Homepage: https://www.youtube.com/watch?v=5cAHxpNEHTc
- Size: 866 KB
- Stars: 281
- Watchers: 18
- Forks: 21
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-github-projects - tern-meteor - Autocompletion plugin for Meteor 1.0 (extending TernJS) ⭐280 `JavaScript` (📦 Legacy & Inactive Projects)
README
TernJS plugin: Meteor
===
*UPDATE*: All definitions were update to Meteor 1.0.4. There are probably some
bugs since this project moved to definitions autogeneration, if you notice any
API mismatch, report in the issues.
This is a plugin for [TernJS](http://ternjs.net) bringing support for
[Meteor](https://www.meteor.com) JavaScript Framework. Tested on Vim and Sublime
Text 2/3, reported to work on Emacs, potentially should work on Brackets,
LightTable, [Eclipse](https://github.com/angelozerr/tern.java/wiki/Tern-&-Meteor-support) and any other CodeMirror-based editors.
Checkout my presentation on Meteor Devshop 11: [Videos](https://www.youtube.com/watch?v=Lqcs6hPOcFw#t=6227) and [Slides](https://slid.es/slavakim/meteor).
The mailing thread for this project is [here on meteor-talk](https://groups.google.com/forum/#!searchin/meteor-talk/tern/meteor-talk/b_yGWIqXl7Y/UYsGCGLWu7sJ).
Gif Demos
---
Types based auto-completion:

Look up documentation:

Jump to definition:

Jump to references:

Get types information (on the bottom):

Supported features specific to Meteor
---
- each file is wrapped in a scope
- global variable are global project-wise
- interface definitions converted from meteor.ts.d
Todo features
---
- correctly calculate package scope and their exports
- some auto-completion based on Templates names would be nice
- generate docs from docs.meteor.com
- load all Meteor related JS files on the load of any file
- parsing of handlebars template?
Installation for Sublime Text 3
---
[Go and install the separate package for ST3.](https://github.com/Slava/tern-meteor-sublime)
Installation for Vim
---
**[Demo Video of Vim](https://www.youtube.com/watch?v=TIE9ZOqlvFo)**
You check out my Vim setup which is already optimized for Meteor development:
[GitHub repo](https://github.com/Slava/vimrc). Or you can get it to your setup:
- Install [tern-vim plugin](https://github.com/marijnh/tern_for_vim) with your
favorite package manager for Vim.
- `cd` to `.vim` folder, `tern_for_vim` plugin folder and run `npm install` to
fetch `tern` npm module.
- Download `meteor.js` file (from this repo) to tern's folder
`tern_for_vim/node_modules/tern/plugins`.
- In your Meteor project create a file `.tern-project` with the contents similar
to:
```
{
"libs": [
"browser",
"jquery",
"underscore"
],
"loadEagerly": [ "*.js", "*/*.js", "*/*/*.js", "*/*/*/*.js" ],
"dontLoad": [ ".meteor" ],
"plugins": {
"meteor": {}
}
}
```
Note: ignore files in `.meteor` folder. Load all JS if possible.