function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Daniel Vu 6Daniel Vu 6 

Code completion for Consumption of Managed Package in VS Code

I have a managed package (say for example the namespace is ABC123) that has some global Apex (for example, the class could be called UtilityClass) that I developed using SFDX. I then installed this managed package into my org. When I go to consume this global Apex in my org (by using ABC123.UtilityClass.doSomething()) VS Code doesn't really give me any code completion and says that I have invalid types, even though I'm able to deploy and nothing goes wrong.

I was wondering if there was a way to configure the sfdx-project.json to pick up the metadata of my managed package so that VS Code could stop giving me incorrect analysis when using my managed package classes? Right now, my sfdx-project.json is just the default but I haven't really seen much documentation around how to configure something like this.
 
{
  "packageDirectories": [
    {
      "path": "force-app",
      "default": true
    }
  ],
  "namespace": "",
  "sfdcLoginUrl": "https://login.salesforce.com",
  "sourceApiVersion": "47.0"
}