crane
crane copied to clipboard
Sugestions/Autocomplete improvements/feature on class declarations.
We could improve suggestions when declaring a new function into a class.
When starting to type into a class body :
We should have :
- public
- protected
- private
- abstract (if the class is abstract)
- final
- static
- const
If prefixed by const, after space do not autocomple :
But if already prefixed by final, static, abstract, final should not be suggested again after.
If prefixed by public / protected / private, suggest after just function.
After a function, the name suggestion should contain :
- __construct
- __get
- __set
- __call
- __unset
- ... http://php.net/manual/en/language.oop5.magic.php
- the parent(s) classes not final, not private methods (that are not already defined)
- the interface unimplemented methods
It is a pain in the ass to crane as it is now. Whenever I type, the autocomplete popup. It should not popup when typing a new method name
Until this issue is closed, I'll the other PHP Intellisense, slow indexation but it is usable.
Hi @vtalbot,
Propositions are not yet optimized but anyway the real problem is that autocomplete is too optimistic and triggers results after each whitespace.
I've tried another extension and disabled ours, in order to see how it reacts. On declaring a method, without forcing autocomplete :
If I start to type into a method $this is not recognized, and if I force the autocomplete with shortcut, seems to work with properties but insert them as variable property $this->$record
:
The typescript autocomplete in vscode, triggers immediately when it can :
Eclipse never shows autocomplete (in my configuration), but you can ask for it with the CTRL+space shortcut.
@nevadascout Maybe we could add an option to make intellisense less optimistic (like avoid proposal unless it's asked by the shortcut)