admin管理员组文章数量:1410730
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.
本文标签: nodejsJavaScript autocomplete on imported modules in GitHub39s AtomStack Overflow
版权声明:本文标题:node.js - JavaScript autocomplete on imported modules in GitHub's Atom - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744924701a2632520.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论