【发布时间】:2018-09-13 21:56:12
【问题描述】:
我正在尝试从我的 Atom 代码编辑器中获取 自动完成 建议。当我尝试doc 时,我期待document,而当我输入document.que 时,我期待Atom 会告诉我.querySelector()。它没有发生。我已经安装了这些软件包来解决这个问题:
- 原子-ternjs
在那之后,我仍然没有得到 doc 或 document. 的自动完成功能 我的 -tern.project 文件如下所示:
{
"ecmaVersion": 6,
"libs": [],
"loadEagerly": [],
"dontLoad": [
"node_modules/**"
],
"plugins": {
"doc_comment": true,
"complete_strings": {
"maxLength": 15
},
"node": {
"dontLoad": "",
"load": "",
"modules": ""
},
"modules": {
"dontLoad": "",
"load": "",
"modules": ""
},
"es_modules": {}
}
}
那么,你如何在 Atom 中自动完成 JS?有趣的事情 - 注意如果我创建数组并尝试 array. 然后 Atom 给了我类似 .pop .push 和其他的建议,但为什么它没有给我一个 document. => .querySelector() 和其他用于 DOM 操作。
我的 Atom config.cson:
"*":
core:
telemetryConsent: "no"
editor:
fontSize: 13
"exception-reporting":
userId: "bla-bla-bla"
"linter-ui-default":
showPanel: true
【问题讨论】:
标签: javascript autocomplete atom-editor