Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[php] PHP Intellisense support is too poor #3683

Closed
smorhaim opened this issue Mar 3, 2016 · 4 comments
Closed

[php] PHP Intellisense support is too poor #3683

smorhaim opened this issue Mar 3, 2016 · 4 comments
Assignees
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities php PHP support issues
Milestone

Comments

@smorhaim
Copy link

smorhaim commented Mar 3, 2016

The intellisense support for PHP is too poor.

  • There is no namespace auto complete
  • No intellisense for the included namespaces
  • No intellisense for native php classes.. \DateTime for example
  • The autocomplete appears to be super fuzzy.

class Foo(){
public function bar(){
}
}

$x = new Foo()
$y-> // Shows bar()

@isidorn isidorn added the php PHP support issues label Mar 3, 2016
@aeschli aeschli changed the title PHP Intellisense support is too poor [php] PHP Intellisense support is too poor Mar 4, 2016
@aeschli aeschli added this to the Backlog milestone Mar 4, 2016
@aeschli aeschli added help wanted Issues identified as good community contribution opportunities feature-request Request for new features or functionality labels Mar 4, 2016
@felixfbecker
Copy link
Contributor

It is poor indeed, and I think this is well suited for an extension. I actually thought about writing one, but I'm not 100% sure how. Maybe someone who wrote the Intellisense support for other language can get me on the right track?
I think it will probably be needed to create an AST of the code to get the available symbols. There is an AST parser for PHP, written in PHP itself. So either the language server implementation would have to be in PHP (In PHP everything is synchronous, so would this work with some sort of inifinite while loop checking for input? Would it be beneficial to duplicate the current TypeScript classes for extensions in PHP?) or have an intermediate Node application that calls acts as the language server and calls the PHP AST parser to get the AST (which could get JSON-encoded?).

@nevadascout
Copy link

I've been working on a PHP code-completion plugin called Crane. It's still in the early stages, but already it's a huge improvement over the built-in intellisense.

https://github.com/HvyIndustries/crane

@felixfbecker
Copy link
Contributor

Completion for PHP IntelliSense is tracked here

@roblourens
Copy link
Member

Closing as the extension has this covered.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality help wanted Issues identified as good community contribution opportunities php PHP support issues
Projects
None yet
Development

No branches or pull requests

7 participants