Valloric/YouCompleteMe — pull request #724 by JazzCore (2013-12-13 20:37:39+00:00)
Title: Add JS Tern completer

Lets get discussion going :)

Firstly, current version only capable of starting (and maybe stopping :) ) server and serving completions. All other things are currently WIP.

I've a bunch of questions and concerns about design and implementation:

1. Since Tern is using Node.JS a user must have a Node installed and must run ``npm install`` in completer folder (``package.json`` is needed for this). I've done some research and I guess it's not possible to init Tern and its dependencies via ``git submodule``. As a solution, it can be added to ``install.sh``
2. I've used ``requests`` instead of ``urllib2`` since you're using it in server. Do I need to update ``sys.path`` by hand to properly import it from ``third_party``?
3. Another concern is Tern project conf file. On server startup Tern looks for ``.tern-project`` file in current working directory and loads it. It looks like there's no other way to load it :( Looking at official Tern [Vim plugin](https://github.com/marijnh/tern_for_vim) it creates a separate server for each file. Need to decide how to handle with this...
4. To get completions we must send to server contents of the current opened file. It can be done in 2 ways: by sending whole file or by sending chunks. My thought was to send a full file on ``FileReadyToParse`` and send chunk with function on actual completion request. Any ideas?