简体   繁体   English

如何使Sublime识别JavaScript库

[英]how do I make sublime recognize a javascript library

I have Javascript libraries downloaded in different folders, how do I set the path for them to be picked up by sublime. 我在不同的文件夹中下载了Javascript库,如何设置它们的路径以使其升华。 (and hopefully also show autocomplete for them) (并希望它们也显示自动完成功能)

I believe the right way to get the library into a js file is this: 我相信将库导入js文件的正确方法是:

var highcharts = require('highcharts');

Neither does it pick up the library nor does it do any autocomplete. 它既不提取库,也不执行任何自动完成。

I've had problems with Emmet (same as the one mentioned here https://github.com/sergeche/emmet-sublime/issues/129 ) so I have the following plugins installed: 我遇到了Emmet问题(与此处提到的问题相同https://github.com/sergeche/emmet-sublime/issues/129 ),所以我安装了以下插件:

  • Javascript Next Javascript下一步
  • Javascript Completions JavaScript完成
  • SublimeCodeintel SublimeCodeintel
  • SublimeLinter-jshint SublimeLinter-jshint

For the autocompletions I've already asked a question ( https://stackoverflow.com/questions/29079474/get-autocomplete-for-new-javascript-libraties-in-sublime ) but the problem I want to get solved here is getting the library recognized and thereby suggest autocomplete. 对于自动填充,我已经问了一个问题( https://stackoverflow.com/questions/29079474/get-autocomplete-for-new-javascript-libraties-in-sublime ),但我想在这里解决的问题越来越库已识别,因此建议自动完成。

Thanks. 谢谢。

试试看All Autocomplete插件,它会在当前窗口的所有打开文件中找到匹配项。

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

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