-
Notifications
You must be signed in to change notification settings - Fork 5.9k
PHP Intelephense extension not working #200
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
Comments
Maybe related: I'm also having the same issue with vetur: https://github.com/vuejs/vetur The extension colors the code but intellisense and auto formatting isn't working. |
@HeavyHorst When did you first install the extension? |
@foresthoffman |
@HeavyHorst Please try uninstalling again, but this time also manually remove the |
I deleted the complete .code-server folder and restarted the server.
|
I get the same problem with intelephense. For me though felixfbecker.php-intellisense is working perfectly, so I'm taking a stab that it probably has something to do with where their language server packages are required from. Intelephense is trying to get them from the node_modules folder where as intellisense is getting them successfully from the composer vendor folder. |
Ok now I'm pretty much 95% positive it is the paths that is the issue here. If you go in to the file requiring whatever, for example I was using shinn.stylelint to debug because the code isn't minified. Originally the error comes from
Then if you change that to an absolute path from your filesystem root, it will find that module and error our on the next relative path require it hits, I went on fixing 4 or 5 levels up of this til I was convinced this is the issue. Hope it help, great project btw! |
Hmm, that's very weird. I appreciate the feedback! intelephense should be working, as it's requiring @HeavyHorst does felixfbecker.php-intellisense work for you? |
You can see if you look at the extension output inside vscode from any extension trying to require the language server packages from node_modules they all 100% come back as invalid module not found with the relative path. I have 3 extensions all failing because of the same relative path issue, and the only one not using them from inside node_modules is working fine. Is it possible you have some webpack resolve setting somewhere which is setting the resolvable paths to vscode-languageserver packages to somewhere specific not including where extensions would be loading from? |
Getting super close on this now, if I had to wager I would say this is the problem, likely with alot of stuff.
Looks like when extensions (probably the built in terminal as well), try and resolve modules from node_modules folder webpack wants to resolve their path as an absolute path always. Maybe I'm mistaken but is this a string replace loader on the filepath with a regex on as .js and .ts files?
Something of interest possibly right in here I know you all will be happy to track this down and close it because no joke the same root issue here probably accounts for ~half your open issues in one way or another. |
I was about to make an issue regarding Bracket Pair Colorizer 2 not working as well but after reading the thread and your last post it makes sense that the problem is bigger than just that, and finding the root cause is the way to go. As far as I know, a lot of extensions are being affected by this including Eslint, Bracket Pair, Intelephense and a few others. |
It appears that the version of Currently looking into the issue with |
I actually used the current version from my regular VSCodium install. Copied to the code-server install. |
@HeavyHorst @RiFi2k |
@foresthoffman My man, nicely done |
Works like a charm. Thanks! |
@sebastianmacias did you ever get your issue with vetur figured out? |
@NickBolles if you're still having an issue with Vetur, you're better off opening a new issue with the "broken extension" template. |
code-server
version: 1.31.1-100Description
Steps to Reproduce
Install the extension and open a php file.
The text was updated successfully, but these errors were encountered: