Peekmo / atom-autocomplete-php

Autocomplete for PHP in atom editor
MIT License
136 stars 34 forks source link

Can you rollback to the plugin before you added indexing? #363

Open n-for-all opened 6 years ago

n-for-all commented 6 years ago

Can you rollback to the plugin before you added indexing?, or disable indexing and only enable indexing of opened files?

After the latest updates atom became really slow - infact atom is unusable when working with magento2 and this package enabled.

I have noticed the following:

1- i get suggestion from other projects. 2- it is indexing randomly and the whole project, currently it is very slow to type if you are developing a simple extension for magento2, infact you can't type a variable name. 3- there is no importance and the plugin is not smart, when you start with $ it should suggest variables with importance from the current file and not functions, same for namespace, once i start with "use" it should suggest the namespaces, also if i am using the same scope "$this" or "self::", it should only suggest the variables, functions from the current class and suggest the same from external class, if not possible it is better not to suggest anything, same for protected, public, private etc .....

How can i - 1- clear the index. 2- select what to index or not, manual indexing, i select the directories to index or ignore directories. 3- set time before suggestions starts searching, or characters count. 4- disable drupal suggestions. 5- disable symfony suggestions.

if you look closely for phpstorm suggestions:

one you type it gets you the closest suggestion, i.e from the current file, then last opened files, then if you delay a little more you will get suggestions from php, then from the whole project.

this is how this plugin should work, suggesting randomly is less than helpful, it becomes more like an autocorrect.

Thanks

lmj0011 commented 6 years ago

None of these atom php plugins seem to be reliable in a large project

I installed atom-autocomplete-php, and have the same problem you described

I also took the time to install this one, which is a collection different plugins, which looked promising but failed to perform. ie. continuous indexing and never auto-completing anything

https://php-integrator.github.io/

https://medium.com/@munza/php-code-completion-in-atom-editor-36e545b80477

I guess the phpStorm IDE may be the only reliable editor out there for php devs who want type hinting, autocomplete, etc.

n-for-all commented 6 years ago

The approach is wrong, currently it indexes everything and queries everything without any user control over the indexing, if you split and prioritize the indexing it will work, it used to work better before the indexing, it will be better if they give us full control over the index via a config file where we can choose what to exclude or include and prioritize the indexing based on the current working directory.

enkay commented 6 years ago

Indexing takes a very long time and overheats the CPU every time I open a project. Any fix?

cloudop commented 6 years ago

I choose to disable index. I rather use kinda functions in other IDE not Atom. Edit the "Autoloader file";"Classmap files" to "noindex.php" in package config.