Closed willdavidow closed 4 years ago
I'm not 100% sure how definitions and sources are gathered by LSP's but this appears to be working just fine now without any configuration change on my end.
Closing this for now since my question appears to have resolved itself.
FWIW: I stumbled across the same issue. One solution is to get the raw wordpress-stubs.php
-file from https://github.com/GiacoCorsiglia/wordpress-stubs, and put it anywhere in the project directory. Intelliphense will pick it up when indexing, and this will stub the methods. When doing so, one may want to include it in your (global) gitignore as well.
I'm having a little difficulty figuring out whether or not there's a way to add stubs for Wordpress development?
I noticed this repository mentioned in an issue in the intelephense repo: https://github.com/php-stubs/wordpress-stubs but I'm having trouble figuring out whether or not it's possible to somehow include this in my COC configuration to prevent/stop intelephense errors on Wordpress built-in functions.