简体   繁体   English

Atom自动完成ternjs无法正常工作

[英]Atom autocomplete ternjs not working

I have the folowing project structure. 我有以下项目结构。

项目结构

.tern-project content .tern项目内容

{
  "ecmaVersion": 6,
  "libs": [
    "browser",
    "jquery"
  ],
  "loadEagerly": [
    "/bower-components/d3/d3.js"
  ]
}

I was tried to change d3.js to d3.min.js, completely remove the loadEagerly point from ternjs config. 我试图将d3.js更改为d3.min.js,从ternjs配置中完全删除loadEagerly点。 But nothing was helped. 但是没有任何帮助。

.gitignore content .gitignore内容

/bower_components
.tern-project

So. 所以。 In logic.js I'm trying to write d3 but there is no such line in suggestions list. 在logic.js中,我尝试编写d3,但建议列表中没有这样的行。 What am I doing wrong? 我究竟做错了什么? Can't figure out why. 不知道为什么。 No d3 and no d3's methods are in suggestions. 建议中没有d3,也没有d3的方法。 No errors comes. 没有错误来。 Autocomplete works only for in project files, but nor for this bower_components. 自动完成功能仅适用于项目文件,不适用于该bower_components。 All needed Atom packages were installed (autocomplete-plus, ternjs) 所有必需的Atom软件包均已安装(autocomplete-plus,ternjs)

在此处输入图片说明

Here I'm trying to write d3. 在这里,我试图写d3。 (no suggestions), and then call enter method (no suggestions). (无建议),然后调用enter方法(无建议)。

Okay. 好的。 I found the reason. 我找到了原因。 All beacuase off this checkbox. 全部关闭此复选框。

在此处输入图片说明

But there is another question then. 但是,还有另一个问题。 How to use this checkbox (this is too convenient for me to refuse this option) and allow packages, like ternjs work correctly? 如何使用此复选框(这对于我拒绝此选项太方便了)并允许像ternjs这样的程序包正常工作?

Update 更新

Okay. 好的。 Found different options for this. 为此找到了不同的选择。 I can hide VCS ignored files from tree view and not exclude them from project. 我可以从树形视图中隐藏VCS忽略的文件,而不能从项目中排除它们。 I think that all I need for now. 我想我现在所需要的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM