Questions tagged [tern]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
8
votes
1answer
3k views

How to navigate a JavaScript project?

I'm currently working on a JavaScript project using Backbone.js and I wonder how can I navigate between files, based on method and object definitions. For example, I keep references to some of my ...
3
votes
1answer
3k views

Cannot jump to definition in js2-mode or Tern

I am performing Nodejs development in emacs, but my environment seems incorrect. For example, when I run ac-js2-jump-to-definition, I get "no jump location found" in the minibuffer. Also when I run '...
3
votes
2answers
267 views

Refactoring javascript

How can I rename functions project wide? I am using spacemacs and also with tern, and it look like tern can only rename variables.
3
votes
1answer
1k views

Receive error when trying to use tern mode

I have installed tern use npm and install tern.el from melpa. I put the path of tern.el in my init file as per instructions on the emacs section of the tern homepage. However when I enable tern mode ...
2
votes
1answer
594 views

M-. and M-, in evil-mode

In normal mode I can't jump to definition with ternjs or cider modes. I have to go to insert then hit M-. Is that the evil way? Should I have M-. bound to another function that checks what mode you ...
1
vote
1answer
237 views

How to set project-specific javscript indentation using js2-mode

I have several Javascript projects, where some projects use 2 spaces for indentation and other projects use 4 spaces for indentation. Is there a project-specific way to set the indentation? I am able ...
1
vote
1answer
120 views

how to hook tern and web mode on certain files

I would like for tern to work only on React related files and Tern to only activate when working on React files with Web Mode turned on. Currently, I have tern generally set up with Web Mode, but the ...
1
vote
1answer
187 views

ELDoc and company-tern are not working properly in JS2-mode (.js buffer in node) and Javascript, in Emacs

In my Emacs configuration for JavaScript/ JS2-mode, specifically .js buffer in node: (1) company-tern and ELDoc are NOT working properly. For eg. when I type 'console.l', 'log' does not pop up, ...
1
vote
1answer
174 views

Tern stopped working! Request failed: ((wrong-type-argument url nil))

I just upgraded yesterday emacs from version 25.2 to 27.0.5. Now I am encountering this problem, any idea of how to fix it? This happens in some tern functions I try to use: tern-get-docs, tern-ac-...
0
votes
1answer
194 views

How do I enable a mode, when another mode runs?

All I want to do is enable tern-mode, when I enter js-mode. I know that a hook called js-mode is run when I open a javascript file but for some reason tern-mode is not enabled. In my init.el file I ...
0
votes
1answer
1k views

Angular and Tern.js - ReferenceError in angular.js

I'm trying to configure Emacs with Tern.js to use AngularJS in it. When add angular to .tern-project like: { "plugins": { "node": { }, "angular": { } } } and type app.| I get ...
0
votes
0answers
64 views

What is a good setup for programming with Vue.js?

I'm trying to set up a good and powerful Emacs for Vue.js, but no setup worked well for me. I tried: vue-mode with lsp-mode and lsp-vue web-mode with indirect-buffer and js2-mode and tern in the ...