• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Valloric / ycmd / 977
94%

Build:
DEFAULT BRANCH: master
Ran 14 Dec 2015 02:43AM UTC
Jobs 1
Files 39
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
977

push

travis-ci

homu
Auto merge of #272 - puremourning:tern-completer-locking, r=Valloric

[READY] JavaScript completer using Tern.js

# Overview

Adds support for a JavaScript completer using [Tern.js](http://ternjs.net).

The completer supports:

* Intelligent auto-completion
* Go to definition, references (`GoTo`, etc.)
* Semantic type information for identifiers (`GetType`)
* View documentation comments for identifiers (`GetDoc`)
* Management of `tern` server instance

This provides (for Vim at least) a replacement, for [tern_for_vim](https://github.com/ternjs/tern_for_vim) automagically in ycmd.

## Demo

Completions:

![ycm-tern-demo](https://cloud.githubusercontent.com/assets/10584846/11763113/035f748c-a0f6-11e5-8961-77139d4e6f45.gif)

Subcommands:

![ycm-tern-demo-subcommands](https://cloud.githubusercontent.com/assets/10584846/11763115/0523467c-a0f6-11e5-8552-357bcdda2e6a.gif)

## Installation

Run `install.py --tern-completer`

## Caveats and differences vs. tern_for_vim

* Currently, to use it there must be a `.tern-project` configuration file somewhere in the directory tree above Vim's working directory when the first JavaScript file is opened (i.e. when the server starts). I believe this is also true for `tern_for_vim`.
* Does not support refactoring (rename) which `tern_for_vim` does
* Methods from `Object.prototype` are always included. Tern has the ability to only include them when they match some number of typed characters, as they are otherwise "noise". This is incompatible with ycmd's cache and LCS matching.

## Status

I believe this to be fully working with the above caveats. I think the first one is the most frustrating, but it isn't obvious how to avoid it.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/valloric/ycmd/272)
<!-- Reviewable:end -->

177 of 177 new or added lines in 4 files covered. (100.0%)

2282 of 2807 relevant lines covered (81.3%)

0.81 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
100.0
ycmd/completers/completer.py
1
100.0
ycmd/completers/javascript/hook.py
2
100.0
ycmd/handlers.py
22
100.0
ycmd/completers/javascript/tern_completer.py
Jobs
ID Job ID Ran Files Coverage
5 977.5 (USE_CLANG_COMPLETER=true YCMD_PYTHON_VERSION=2.7 COVERAGE=true) 14 Dec 2015 02:43AM UTC 0
81.3
Travis Job 977.5
Source Files on build 977
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #977
  • 1caabf52 on github
  • Prev Build on master (#974)
  • Next Build on master (#982)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc