The language server configures its SFCC type model automatically. The settings below customize editor behavior and recognized helper calls; they are not prerequisites for basic API completion.
Teach completion about your helpers
A completion rule identifies a method name, an optional receiver name, and the zero-based argument position containing an SFCC identifier.
Setting under intellij-sfcc.completions | Default contexts |
|---|---|
routes | URLUtils.url/abs/http/https, corresponding method-name matches, and URLAction; argument 0 |
hooks.name | callHook, hasHook, hooksHelper, hookHelper; argument 0 |
hooks.function | callHook, hooksHelper, hookHelper; argument 1 |
templates | render and renderTemplate; argument 0. sendEmail; argument 1 |
resources.properties | msg and msgf; argument 0 |
resources.bundles | msg and msgf; argument 1 |
For example, suppose a helper accepts a site identifier followed by a route:
links.forRoute('DemoSite', 'Product-Show');Add a route rule with className: "links", methods: ["forRoute"], and paramIndex: 1. A configured array replaces the setting's default array, so retain the defaults you want:
{
"intellij-sfcc.completions.routes": [
{ "className": "URLUtils", "methods": ["url", "abs", "http", "https"], "paramIndex": 0 },
{ "methods": ["url", "abs", "http", "https"], "paramIndex": 0 },
{ "methods": ["URLAction"], "paramIndex": 0 },
{ "className": "links", "methods": ["forRoute"], "paramIndex": 1 }
]
}Invoke completion inside the second string argument. The definition provider also uses these context rules for recognized route, hook, template, key, and bundle lookups. A rule identifies a syntactic call shape; it does not teach the server what arbitrary helper code does at runtime.
Editor visibility settings
| VS Code setting or action | What it controls |
|---|---|
Editor: Code Lens (editor.codeLens) | Whether CodeLens actions are visible |
Editor: Inlay Hints Enabled (editor.inlayHints.enabled) | Whether supplied inlay hints are displayed |
| Trigger Suggest | Manually open completion at the caret |
| Trigger Parameter Hints | Reopen signature help inside a function call |
| Go to Definition / Peek Definition | Inspect a definition without depending on a particular keybinding |
| Go to References | Inspect references from the current symbol or recognized identifier |
Use the Command Palette names if your keyboard layout or keybindings differ from the shortcuts in these guides.
Diagnose a missing result
Check the language mode
Open the file and inspect the language indicator. Cartridge server scripts should use the SFCC JavaScript, SFCC TypeScript, or Digital Script mode. Files under frontend client or static folders intentionally use the normal frontend service.
Check cartridge discovery
Confirm the cartridge is linked or discovered in the extension's cartridge view. Open the workspace containing it, rather than only an unrelated file. See Zero configuration.
Check the active context
An overlay import and module.superModule depend on cartridge order. Confirm the selected site scope and the locally available cartridge path before treating a different target as a navigation defect.
Check the feature's source
A custom attribute needs local metadata; a form needs its XML; a hook needs its registration; log lenses need loaded log data. Open the source file and confirm its identifier matches the code.
Let indexing finish and retry
Large project changes can temporarily leave specialized results unavailable. Save the relevant files, allow indexing to finish, then invoke the editor action explicitly. Inspect the extension's Output entries if the result remains missing.
Common symptoms
| Symptom | Likely next check |
|---|---|
dw/* types are missing everywhere | Language mode, extension activation, and language-server startup |
require('*/…') resolves to an unexpected file | Active cartridge order and discovered cartridge locations |
A parent export is missing on base | Matching relative file in a later cartridge, plus the parent's actual exports |
product.custom lacks a project attribute | Local XML, its type-id, generated declarations, and the receiver's type |
server.forms.getForm('name') has no known fields | Form XML name, cartridge discovery, and generated form-types.d.ts |
| A hook implementation parameter is untyped | Registration, script path, export name, and whether a known hook signature exists |
| A resource reference is missing | Bundle name, key spelling, and whether the lookup is statically recognizable |
| Script-symbol rename or a refactoring does not apply | These are not completed scripting workflows in this release; see Diagnostics. |
Useful information for a reproducible report
Include the extension version, language mode, a minimal source example, expected and actual navigation targets, and the relevant cartridge order. For metadata or form issues, include a small synthetic XML definition. For UI issues, capture the editor action and its result with readable file names.
A small two-cartridge example is usually more useful than a whole storefront. Keep credentials and private business data out of the sample.