Autocomplete / IntelliSense not working
See original GitHub issueSummary
Autocomplete / IntelliSense not working for Apex code. On both SObjects and built in Apex functions.
Steps To Reproduce:
- Open Salesforce project, with existing classes.
- Run
sfdx sobject definitions refresh -u ORG_NAME
- Type something and wait for the autocomplete
Expected result
Should show autocomplete/IntelliSense or snippet suggestion
Actual result
No autocomplete suggestions.
Additional information
SObject definitions pull in nicely.
Autocomplete doesnt work so nicely.
Additional information VS Code Version: 1.44.2 SFDX CLI Version: 7.56.1-2773b53bf5 OS and version: Windows 10 Home, Version 1909 JAVA Version: jdk-11.0.7
Have tried using various environments, both sandboxes and scratch orgs. Projects have very few apex classes, or any other components.
Test Classes do work very nicely, and I have double checked my JAVA_HOME/JDK_HOME paths (in addition to adding "salesforcedx-vscode-apex.java.home": "C:\\Program Files\\Java\\jdk-11.0.7",
to preferences.
Apex Language Server output log
19:59:22.493 [Apex Prelude Service STARTING] INFO a.j.l.i.s.ApexPreludeManagedService - Scanning built-in and system Apex types.
May 03, 2020 7:59:23 PM apex.jorje.parser.impl.BaseApexLexer dedupe
INFO: Deduped array ApexLexer.DFA22_transition. Found 7075527 shorts which is 13MB not including array overhead. Removed 6418975 shorts which is 12MB not counting array overhead. Took 12 ms.
19:59:26.822 [Apex Prelude Service STARTING] INFO a.j.l.i.s.ApexPreludeManagedService - Patching standard library for System.Database.* methods
19:59:26.832 [Apex Prelude Service STARTING] INFO a.j.l.i.s.ApexPreludeManagedService - Done patching standard library for System.Database.* methods
19:59:28.150 [ApexIndexer STARTING] INFO a.jorje.lsp.impl.index.ApexIndexer - ApexIndexer: Scanning user-defined types.
19:59:28.154 [Apex Prelude Service STARTING] INFO a.j.l.i.s.ApexPreludeManagedService - Scanning built-in and system Apex types took 5659 ms.
19:59:38.908 [ApexIndexer STARTING] INFO a.jorje.lsp.impl.index.ApexIndexer - ApexIndexer: Scanning user-defined types took 10740 ms.
Other related issues https://github.com/forcedotcom/salesforcedx-vscode/issues/2095 https://github.com/forcedotcom/salesforcedx-vscode/issues/920 https://github.com/forcedotcom/salesforcedx-vscode/issues/935
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:18 (5 by maintainers)
Top GitHub Comments
autocomplete is not working on trigger files it works on certain variables but not work on other ones
(it shows no suggestions)
(no errors on apex language server) vscode: 1.51.1 java: 11.0.9
Is there a work-around for this issue? Barring that, is there a specific version set (VSCode, SFDX) that I can install to get fully-functional autocomplete for Apex classes? For what it’s worth, I’m seeing the same logging output for the Apex Language Server.