bmewburn / vscode-intelephense

PHP intellisense for Visual Studio Code
https://intelephense.com
Other
1.63k stars 94 forks source link

Can't auto indexing when downloaded composer package #2213

Closed sarukomine closed 1 year ago

sarukomine commented 2 years ago

Visual Studio Code can't auto indexing files when downloaded composer package.

Before I downloading Laravel package, the intelephense said Undefined type 'XXX\XXX\XXX', it is normal. But I downloaded the package, and the intelephense still said same message, seems it won't indexing files in vendor folder. I have to re-open Visual Studio Code to indexing again, and that message is gone.

I want to know how to make it auto indexing? Because I have to re-open Visual Studio Code after I downloaded new package, it is too trouble and inconvenient...

yaegassy commented 2 years ago

Try run "Intelephense: Index workspace".

sarukomine commented 2 years ago

Try run "Intelephense: Index workspace".

  • Command panel > Intelephense: Index workspace

Thanks @yaegassy, it is working, but still need to manually run it after installed package~ Any way to make it auto index?

tianyiw2013 commented 2 years ago

1898 Maybe we need to add an index button to the status bar.

sarukomine commented 2 years ago

1898 Maybe we need to add an index button to the status bar.

@tianyiw2013 this is great, when will be an index button released?

negentropicdev commented 1 year ago

Just ran into this, indexing workspace fixed it. Is there a way to have a watcher on the composer file and automatically index when that file changes?

kimhaak commented 1 year ago

Same problem but indexing does not fix it - Both remote ssh and locally.

I require the autoload.php from the vendor folder and i get red lines that my classes are undefined.

Trying to use Twig - and i installed composer package before opening folder with project in VSCODE.

Same problem across computers when testing.

pasqual-artif commented 1 year ago

I just ran into the same problem.

not working locally, nor with an samba share. but connecting it with ssh (Connect to host) and installing Intelephense afterwards "install on remote host" immediately resolved the issue.

but thats more like a workaround, since it shouldn't be edited over ssh because git doesn't like it (dubious ownership since smb =/= ssh)