Khan / Khan/live-editor

better autocomplete using tern.js

Open
#320 8 comments 0 reactions 0 assignees View on GitHub
editor idea pjs
Dominant language
JavaScript
Stars
776
Forks
180
PR merge metrics
No merged PRs in 30d

Description

I had started implementing better autocomplete in https://github.com/Khan/live-editor/pull/178, but I didn't get very far with it. This morning I ran across a library called tern.js.

> Tern is a stand-alone, editor-independent JavaScript analyzer that can be used to improve the JavaScript integration of existing editors.

It supports the following things:

> - Autocompletion on variables and properties
> - Function argument hints
> - Querying the type of an expression
> - Finding the definition of something
> - Automatic refactoring

We probably don't care about automatic refactoring, but the others would be quite helpful. Although we do provide some argument hints, these are only for "built-in" functions. For more information see: http://ternjs.net/

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing pull request #178 and the tern.js documentation linked in the issue. Compare the proposed approach with the requested autocomplete, argument hints, type queries, and definition lookup; the issue does not identify files, tests, or a narrower completion criterion.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.