atom.io Laravel 自动预测问题

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/30572719/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 11:40:55  来源:igfitidea点击:

atom.io Laravel autoprediction woes

phplaravellaravel-5atom-editor

提问by Eamorr

I'm trying to get PHP to autocomplete for my Laravel project - I've been trying lots of different packages, but none seem to work...

我正在尝试让 PHP 为我的 Laravel 项目自动完成 - 我一直在尝试很多不同的包,但似乎没有一个工作......

Here's a screenshot from a PHP class:

这是 PHP 类的屏幕截图:

enter image description here

在此处输入图片说明

I need $table->to autocomplete and suggest all the functions available to it! (functions such as ->string(...), ->text(...), ->timestamps(), etc.)

我需要$table->自动完成并建议所有可用的功能!(功能,例如->string(...)->text(...)->timestamps()等)

Can anyone suggest anything?

任何人都可以提出任何建议吗?

I have the following php-relatedpackages installed:

我安装了以下与 php 相关的软件包:

  • autocomplete-php(this seems to only work for standard PHP functions?)
  • php-twig(TWIG related only...)
  • language-php(basic PHP syntax...)
  • autocomplete-php(这似乎只适用于标准 PHP 函数?)
  • php-twig(仅与 TWIG 相关...)
  • 语言-php(基本的PHP语法...)

But I need something more. I need to be able to identify all the classes in my Laravel project and auto-suggest their functions!

但我需要更多的东西。我需要能够识别我的 Laravel 项目中的所有类并自动建议它们的功能!

采纳答案by Bogdan

You can use CTagsto index the definitions. Have a look at this Atom package:

您可以使用CTag来索引定义。看看这个 Atom 包:

Atom Ctags

原子标签

Don't worry that the animated demo there is presented for C, it should work with PHP just as well.

不要担心那里的动画演示是为 C 提供的,它应该也适用于 PHP。