-
Notifications
You must be signed in to change notification settings - Fork 88
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
Code completion #321
Comments
I have the same issue, this is due the lack of multiroot workspace implementation. I'm not aware of any other php-intellisense in vscode that supports it. This is the issue: @felixfbecker I'm trying to sort out how to help you with this one, any suggestions on what should I study on VSCode side to jump on this? I'm quite skilled on php and I've to say you are a damn good developer. |
@nadar the language server will look at all subfolders in the workspace, but does not support multiple workspace folders. Are you using multiple workspace folders? Can you give an example where exactly your cursor was when typing @valerio-brew I actually started a WIP PR that I never had the time to finish: felixfbecker/php-language-server#509 |
@felixfbecker I made a quick gif for you => http://www.giphy.com/gifs/1dOKUo82Sfjihom8hg
If file is located in another namespace or directory (in vendor like in the gif the Curl class which is located in vendor as you can see) it does not work. Does that help? Maybe i can provide some more informations? |
That is as designed. Auto completion suggests you things that are in scope |
Hmm okay, sad. But since composer and vendor folder is so important it would maybe be a good to provide full auto completion so it can compete with PHPStorm, Eclipse PDT and others. So i am going to close this issue 😢 |
Hi Felix,
I've been trying to workaround the limitations, for mac and linux you can
create different workspace dummy folders, than symlink all projects folders
into the dummy folder, does work unfortunately has weird effects on
gitlens, but I more than happy to gove away git automation.
works fairly well, except that indexing takes a bit more time.
I've seen your patch, but to be of any help I need to understand how
interaction between vscode and language server works, not much spare time
to develop while I am managing my team :/
I'll try to fix this as I would like to have my whole team to work on
vscode, as I said your php code is so elegant that I almost fell in love
worh you xD
…On Tue., 5 Jun. 2018, 06:23 Felix Becker, ***@***.***> wrote:
That is as designed. Auto completion suggests you things that are in scope
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#321 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AXZ6iFJQ0UtXoo7BsX8xZlKLVbrkipVKks5t5ZdHgaJpZM4UXn5T>
.
|
@nadar I think you are looking for felixfbecker/php-language-server#234 @valerio-brew thanks, I am happy to help give an overview of how this works, feel free to contact me on Gitter (https://gitter.im/felixfbecker/php-language-server or DM me) |
Hi, maybe i am in the wrong repo but i was not able to find out if its a "missing" feature by design, a wrong configuration or just related to vscode.
I was trying out vscode several times but code completion does not work as expected or as i already mentioned it was never be intended to work like this:
Assuming i have 2 files not in the same directory, but in the same namespace:
foo/Foo1.php:
foo/bar/Bar1.php:
the code completion is not able to detected the
Bar1
class when typing inFoo1
. For my understanding of code completion it should be possible to find all classes inside the current work directory while typing. After selecting the class it will be written to use statement section. This is what Eclipse PDT, PHPStorm or others does.If i have two files in the same directory, the suggestion works but only for files in the same directory.
So i am just wondering if this feature not implemented, does not work on my machine or any other reason? I tested on OSX and Ubuntu 18.10 with latest VSCODE and intellisense extension, also trying to configure the path to the php bin file and disable default completion. For example Eclipse PDT does have an indexing process, afterwards all classes are available (also from vendor folder).
The text was updated successfully, but these errors were encountered: