When Autocomplete is run on an SObject, it returns Global objects (EG System, ApexPages), which are not valid given the current instance context. It also only returns a very limited set of fields.
public class Testing {
public Testing() {
Account acc = new Account();
acc.
}
}
acc.I would see the SObject Instance methods and all of it's fields (including custom fields)
I see the SObject instance methods, the global System namespaces & and very limited set of fields.

VS Code Version:
1.26.0
SFDX CLI Version:
salesforcedx@pre-release
OS and version:
osx 10.12.6
Also, you get similar behavoir if completions are requested @ new Account(. I would expect this to only give Account fields.
@ChuckJonas -
[Context] " it returns Global objects (EG System, ApexPages)" – yes this is a known issue right now. We show a lot of the global namespaces as a fallback. We should probably disable this.
[SObjects] Did you do a "SFDX: Refresh SObject Defintions" after you have connected to an org? See https://github.com/forcedotcom/salesforcedx-vscode/tree/develop/packages/salesforcedx-vscode-apex#enable-code-smartness-for-sobjects for more information.
We need to do an sobjectdescribe on the org to get the information – yes, this deviates a bit from our SFDX model but the org currently still has the most information about the standard objects, custom fields, and custom objects.
@vazexqi
[Context] " it returns Global objects (EG System, ApexPages)" – yes this is a known issue right now. We show a lot of the global namespaces as a fallback. We should probably disable this.
I would agree that it should be disabled... No autocomplete > incorrect autocomplete.
[SObjects] Did you do a "SFDX: Refresh SObject Defintions" after you have connected to an org?
sorry I missed that step!
After running "SFDX: Refresh SObject Defintions", I'm now seeing the additional fields show up @ acc.. However, it still doesn't work correctly for Account acc = new Account(. Maybe that's not supported yet?
FYI: I'm testing out the new traditional org dev features,
Similar issue reported on #399 for string literals
When typing inside of a String literal, if I complete a sentence with a ".", it pulls up the intellisense dropdown, which I have to press escape on in order to continue typing.

@ntotten is all of this happening inside the closed source jar?
Also if you guys haven't already taken a look at what @neowit has done with tooling-force it might be worth while peaking in. IMO the autocomplete features implemented here are the most robust (been a while since I've used illuminated cloud or welkin). Supports completion in SOQL, SObject creation, attributes, inner classes. No need for proxy SObject classes. Etc
My Salesforce Language Support extension is pretty much just a wrapper of this library. Unfortunately there are some limitations around memory and currently no support for cancelation tokens so it doesn't work great on larger orgs.
Thanks for the link, @ChuckJonas. I am aware of it but due to its LGPL v3 licensing, we are very careful not to use/link it.
@ChuckJonas Correct, these fixes are all happing in the closed source jar. We have discussed open sourcing it in the future, but it's not something we're able to do just yet.
Adding to the List...
I can't seem to get static variables and functions to auto-complete either.
IMO the lack of decent auto-complete really is the biggest productivity killer.
Is there a team working on this? I understand the challenging of building AST, but other multiple other individuals have been able to do a pretty decent job of it...
Seems like a company as big as salesforce should be able to figure out how to write autocomplete for their own language pretty easily
PS: I'm not trying to be snarky, I'm just sincerely wondering this issue is a priority.
I am not able to refresh sObject definitions.
Starting SFDX: Refresh SObject Definitions
19:10:56.481 sfdx sobject definitions refresh
Failure performing sObject describe Must pass a username and/or OAuth options when creating an AuthInfo instance.
19:11:00.567 sfdx sobject definitions refresh ended with error Failure performing sObject describe Must pass a username and/or OAuth options when creating an AuthInfo instance.
19:11:00.568 sfdx sobject definitions refresh ended with exit code 1
Closing this since it was addressed on release v47.5.0
Most helpful comment
Adding to the List...
I can't seem to get
staticvariables and functions to auto-complete either.IMO the lack of decent auto-complete really is the biggest productivity killer.
Is there a team working on this? I understand the challenging of building AST, but other multiple other individuals have been able to do a pretty decent job of it...
Seems like a company as big as salesforce should be able to figure out how to write autocomplete for their own language pretty easily
PS: I'm not trying to be snarky, I'm just sincerely wondering this issue is a priority.