-
Notifications
You must be signed in to change notification settings - Fork 17
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
[DOC]: Better way to get WordPress intellisense #2
Comments
set maxSize to 3200000 if giacocorsiglia/wordpress-stubs version is ^5.1 |
Up-to-date WP stubs are available here: https://github.com/php-stubs/wordpress-stubs |
Is there a global way I can install this? I jump from WordPress project to project all day and installing this per project just doesn't seem feasible for me. Open to suggestions, otherwise I'll likely disable Intelephense entirely. |
I would also like to know if there is a global way to do this. Adding this to each project seems unnecessary. I don't like to have files that I don't need in my project directories. Is there any extension that can be installed to accomplish this? |
This was added in 1.3.3 |
I'd like to add my 2 cents here. I wanted to set up vscode for WordPress development, and one of the first extensions I installed was PHP Intelephense. It proved to be ridiculously difficult to find Intelephense already ships with WordPress support and it has to explicitly be enabled. Only learned about this when digging through multiple GitHub issues. A great first step would be to link to bmewburn/intelephense-docs in the main repo of the vscode extension. I looked everywhere for a link to the documentation. Second, the documentation should include all optional features, with full descriptions. At least the premium features should be documented properly, there's no point in paying for features if you don't know how to use or enable them. |
possible to integrate acf (advanced custom fields) too? |
Yes, ACF stubs seem available here, so install those with Composer and add it to the stubs list |
@ntwb I use this approach as well, and it works great! Wish there was a way to tell intelephense to search for globally installed stubs, so they don't have to be included in every project separately. |
I make many errors in my code (which I write ~once a month).
I run my code after these do pass. (not before!) |
Hi,
First of all thank you very much for this awesome package. Your package is one of many reasons why I moved from Sublimetext to VSCode (don't mean to start a war here though).
I have been fiddling around a bit, and have been trying various methods to add WordPress intellisense. My preference has always been to just add the plugin/theme directory to vscode workspace. But in order to get intellisense of WordPress core functions, I had to add WordPress source in the workspace too. Not a great fan of this.
Then I came across this and since I use composer anyway, getting intellisense was a breeze.
I would've wanted to contribute to some doc, but since I didn't find any, I am opening an issue explaining the method and I leave it upto you to do what-so-ever you wish.
These are just the steps one need to follow to get WP intellisense.
"intelephense.file.maxSize": 3000000
.composer require --dev giacocorsiglia/wordpress-stubs
.Intelephense: Clear Cache and Reload
.And from then on, it just works. Here's a video.
The text was updated successfully, but these errors were encountered: