I'm trying to get familiar with GitHub's Atom and working with JavaScript on a large-scale project. I've been working with tutorials, and the biggest plaint I'm having with Atom is that I can't find a way to get the out of the box autoplete to work consistently.
For example, I'm following a relatively simple Node.js tutorial, using ES6 syntax, and I have the following code in a core.js
file:
export function logMe(message) {
console.log('message: ' + message);
}
In main.js
file, I have the following:
import {logMe} from '../src/core'
logMe('Hello, world!');
However, when typing in main.js
, I get no autoplete suggestions for logMe
or anything in my core.js
file. I feel like there should be either some existing functionality in autoplete-plus
, or another plugin, that allows autoplete to work across import
statements.
I'm trying to get familiar with GitHub's Atom and working with JavaScript on a large-scale project. I've been working with tutorials, and the biggest plaint I'm having with Atom is that I can't find a way to get the out of the box autoplete to work consistently.
For example, I'm following a relatively simple Node.js tutorial, using ES6 syntax, and I have the following code in a core.js
file:
export function logMe(message) {
console.log('message: ' + message);
}
In main.js
file, I have the following:
import {logMe} from '../src/core'
logMe('Hello, world!');
However, when typing in main.js
, I get no autoplete suggestions for logMe
or anything in my core.js
file. I feel like there should be either some existing functionality in autoplete-plus
, or another plugin, that allows autoplete to work across import
statements.
1 Answer
Reset to default 5Have you tried using atom-ternjs it is Atom integration with the excellent TernJS. You will need to spend a bit of time generating your .tern-project
file by going to the Packages
menu → Atom Ternjs
→ Configure Project
, but once you have it setup it works very well.
If you don't want to go down the TernJS route, then there is a setting for the autoplete-plus
package called Include Completions from All Buffers
:
In my experience it can create a lot of noise and is dependent upon a the other files being open which doesn't scale well.
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744924701a4601359.html
评论列表(0条)