• Stars
    star
    283
  • Rank 146,066 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 11 years ago
  • Updated almost 9 years ago

Reviews

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

Repository Details

Autocompletion plugin for Meteor 1.0 (extending TernJS)

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 bringing support for Meteor JavaScript Framework. Tested on Vim and Sublime Text 2/3, reported to work on Emacs, potentially should work on Brackets, LightTable, Eclipse and any other CodeMirror-based editors.

Checkout my presentation on Meteor Devshop 11: Videos and Slides. The mailing thread for this project is here on meteor-talk.

Gif Demos

Types based auto-completion:

tern-vim-completion.gif

Look up documentation:

tern-vim-doc.gif

Jump to definition:

tern-vim-jump-to-def.gif

Jump to references:

tern-vim-refs.gif

Get types information (on the bottom):

tern-vim-types.gif

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.

Installation for Vim

Demo Video of Vim

You check out my Vim setup which is already optimized for Meteor development: GitHub repo. Or you can get it to your setup:

  • Install tern-vim plugin 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.

More Repositories

1

label-tool

Web application for image labeling and segmentation
JavaScript
350
star
2

meteor-rethinkdb

RethinkDB integration for Meteor
JavaScript
302
star
3

tern-meteor-sublime

Meteor Framework autocompletion for Sublime
Python
244
star
4

vimrc

Meteor/Web development centric vim config
Vim Script
83
star
5

meteor-gmail

Real-time driver for GMail.
JavaScript
55
star
6

6.033-systems-engineering

notes from 6.033: watching lectures on OCW, doing assignments, reading papers, etc
44
star
7

diff.js

diff algorithm implemented in JavaScript
JavaScript
39
star
8

meteor-rethinkdb-demo

an example app
JavaScript
16
star
9

blaze-tools

lol wut
JavaScript
15
star
10

talk-player

JavaScript
13
star
11

typescript-types-script

for the lolz compiler to perform arbitrary computation in TS type system
Haskell
11
star
12

d3-meteor-basic

an example
JavaScript
11
star
13

meteor-gmail-query-parser

GMail query syntax parser
JavaScript
11
star
14

zbt-website

The new website for MIT ZBT
JavaScript
9
star
15

competitiveProgramming

Sources I generated over 4 years of competitive programming 2008-2012
C++
8
star
16

.spacemacs

My spacemacs file
Emacs Lisp
7
star
17

meteor-tracker-profiler

JavaScript
6
star
18

zbt-genealogy

JavaScript
6
star
19

meteor-mobile-icons-example

This example shows how to use icons and images with the new Meteor Mobile support
JavaScript
6
star
20

VKImage

Custom drawings for NSImage
Objective-C
4
star
21

emacs.d

Outdated, please refer to my spacemacs config
Emacs Lisp
4
star
22

reactive-array

Tracker-aware array implementation (WIP)
JavaScript
4
star
23

sqrt-skip-list-js

Doubly-linked list with insert/remove/random access/search optimization. NOT Skip List.
JavaScript
3
star
24

url-shortener

Url shortener for private use in small groups (teaching a class, etc).
JavaScript
3
star
25

meteor-ddp-analyzer

JavaScript
3
star
26

netflix-ko-vocab

A Chrome Extension that extends Netflix For Language Learners, showing better translations (and roots) for Korean subs
JavaScript
3
star
27

terminal-blog

Experimental meteor app
CSS
2
star
28

klyrics

Klyrics - KPop music player with lyrics
JavaScript
2
star
29

peliblog

Blog with Pelican
HTML
2
star
30

meteor-mongo-append-only

JavaScript
1
star
31

meteor-dashed-template-bug-repruduction

1
star
32

meteor-svg-barchart-example

JavaScript
1
star
33

topcoder

All my topcoder accepted solutions.
C++
1
star
34

malloc

One of the projects for the performance eng class, custom malloc with predictive bucket sizing, includes a visualizer in HTML/JS. We got an A for the class.
Python
1
star
35

pennapps-demo

Little application live-coded in 30 mins talk with introduction to Meteor.
CSS
1
star
36

slava.github.io

Future landing page
HTML
1
star
37

minilisp

For learning purposes. Don't laugh at me, I am learning!
C
1
star
38

org-asana

meh
JavaScript
1
star
39

desktop-email-server

JavaScript
1
star