Questions tagged [tern]

Tern is a JavaScript code analyzer that is intended to improve the support a text editor has for JavaScript coding. Use this tag for questions about its function or how to add tern to the editor of your choice.

Tern is a JavaScript code analyzer which may be installed as a plugin to various text editors such as and and . It is designed to allow for added functions such as code completion and automatic refactoring when editing JavaScript.

More information is available at http://ternjs.net, and its source is available from https://github.com/marijnh/tern.

56 questions
1
vote
0 answers

how to use tern in codemirror to add my special text for every word in my editor?

I want to use tern (to add type for every word in my own language ) so I add to my html page this :
code
  • 177
  • 1
  • 15
1
vote
1 answer

How to enable TernJS in sublime text with ES6 modules (Import Statements) on macOS

It is really unclear how to setup tern to work with Sublime Text and ES6 Modules. What steps should I need to take to enable it?
Asaf Katz
  • 4,608
  • 4
  • 37
  • 42
1
vote
0 answers

How to make Tern autocomplete CreateJS

I'm trying to make Tern to work with CreateJS library. The library is huge so Tern runs out of time if I try to read it. Tern supports JSON type definitions for this, but if I compile it with condense utility it throws error on trying to read…
Rigwarl
  • 11
  • 3
1
vote
0 answers

Tern Eclipse IDE and JSP

I have: Eclipse Mars.2 Tern Eclipse IDE 1.2.0 dynamic web project with one test JSP file: <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
Tom HANAX
  • 11
  • 4
1
vote
0 answers

Improve docs from ternjs to emacs

I have just got ternjs up and running with js2-mode & company-mode in emacs and getting quite excited. The C-c C-d function to get the docs for a function from tern brings back quite a limited subset of information. I would love to learn lisp but…
user2237076
  • 331
  • 3
  • 13
1
vote
0 answers

can tern eclipse validate javascript in html files?

I am trying to use Tern Eclipse IDE in a static web project. Alas, I'm not able to configure it to validate javascript in script tags in .html files. Is this even supported? Is there any doc how to do it?
Markus
  • 668
  • 7
  • 27
1
vote
1 answer

Eclipse IDE Tern ES6 Validation & Auto-Complete

I'm having issues setting up validation via Tern with ESLint. I disabled the internal parsing as shown, http://tools.jboss.org/documentation/whatsnew/jbosstools/4.3.0.Final.html#javascript-development-tools-improvements, and I enabled ESLint. In the…
Knight Yoshi
  • 924
  • 3
  • 11
  • 32
1
vote
0 answers

How to install Ternjs for vim on Mac OSX?

I am trying to install ternjs on vim. I am on OS X Yosemite 10.10.5. What did I do : 1.Install YouCompleteMe. 2.Install Nodejs v4.2.3 via the pkg. 3.Run npm install in the tern_for_vim directory (nothing seems to…
GermainGum
  • 1,349
  • 3
  • 15
  • 40
1
vote
3 answers

How can I turn off javascript validation (including tern / lint / jshint) for certain folders (such as node_modules) in eclipse?

I already went into project properties > JavaScript > Include Path > Source and excluded my node_modules directory. But, when I run validation on the project it still tries to validate all of the javascript files in that folder.
vt97john
  • 579
  • 3
  • 10
  • 25
1
vote
3 answers

Adobe-Brackets Angularjs Code Completion

I am using adobe-brackets sprint39 to build the front end of websites. I am a heavy user of Angularjs. https://angularjs.org/ Is it possible to activate angularjs code completion on the adobe-brackets ide? Tern has been integrated with…
Adwin
  • 195
  • 2
  • 6
  • 21
1
vote
1 answer

how to set jump to method definition key binding in sublime 3 for tern-js

i've installed the tern-js plugin for sublime 3, however for some reason I cannot make its command work with sublime's key bindings (I'm a sublime nube btw) according to the documentation.. ternjs_jump_to_definition is supposed to be a valid…
abbood
  • 23,101
  • 16
  • 132
  • 246
0
votes
0 answers

Can tern complete for methods in React extended classes

If I'm extending a React.Component eg. class MyClass extends React.Component { constr// with point here, can this complete "constructor" } is it possible to get completions for the React.Component methods eg. constructor? My current…
Rorschach
  • 31,301
  • 5
  • 78
  • 129
0
votes
0 answers

How to execute tern for vim commands?

I am new to Vim and installed tern for vim: https://github.com/ternjs/tern_for_vim I would like to use the command TernDef to jump to the definition of a function. I tried to put the cursor on a function name and enter :TernDef but that does not…
Stefan
  • 10,010
  • 7
  • 61
  • 117
0
votes
1 answer

TernRename creates a new split in vim

I'm using tern_for_vim and trying to rename a variable. When I run :TernRename I get asked for the new name of the variable. After I provide that and press Enter, the variable gets renamed and then I get a new split with all the references where the…
Foryah
  • 193
  • 2
  • 11
0
votes
1 answer

Eclipse Mars JavaScript Editor not recognizing errors

Somehow i can enter anything i want in a .js file but there are no errors nor warnings (syntax highlighting works tough) recognized. I have no exludes or something. Also i remember having the option to convert a project into a javascript project but…
Gobliins
  • 3,848
  • 16
  • 67
  • 122