The language server offers completion that understands both the SFCC API and your project. Beyond ordinary member completion, it knows what belongs inside a require() string, a HookMgr.callHook() call, a URLUtils.url() route, a Resource.msg() key, and more - because it indexes those artifacts from your cartridges
API & Member Completion
Full completion for the entire dw.* API surface and for anything the engine can type - local variables, imported modules, custom attributes, and standard JavaScript
var ProductMgr = require('dw/catalog/ProductMgr');
var product = ProductMgr.getProduct('p1');
product. // ← Product methods, properties, and custom attributesCompletion items are resolved on demand: when you highlight an item, the server fills in its type signature and JSDoc documentation (including @param, @returns, and @deprecated tags) in the details pane
require() Path Completion
Start typing inside a require('…') string and the path is completed against the cartridge overlay
require('dw/') // ← dw/catalog, dw/order, dw/system, …
require('dw/catalog/') // ← ProductMgr, CatalogMgr, Category, …require('*/cartridge/scripts/') // ← files from every cartridge in the pathrequire('~/cartridge/scripts/') // ← files from the current cartridgerequire('./') // ← files beside the current file
require('../') // ← files one level upTop-level cartridge names are completed too - start typing a cartridge name (e.g. app_) and matching cartridges are suggested. The same path completion is offered inside importScript('…')
Project-Aware Completion
These completion types are powered by the project indexes. They become available once the workspace has been indexed
JSDoc Type Completion
Inside a JSDoc type expression, dw.* namespaces and common types complete - so typed JSDoc stays fast to write
/**
* @param {dw.catalog.Product} product
* @returns {dw.value.Money}
*/
function getPrice(product) { /* ... */ }
// ^ inside { } you get dw.* namespace completionISML Expression Completion
Inside .isml templates, ${ … } expressions and <isscript> blocks get the same script completion described above, including pdict, Resource, URLUtils, variables from <isscript> blocks, and variables from <isset>. Loop variables from <isloop> are declared but untyped, so their members do not complete
<isscript>
var ProductMgr = require('dw/catalog/ProductMgr');
var product = ProductMgr.getProduct(pdict.pid);
</isscript>
<isprint value="${product. }" /> <!-- ← Product member completion -->See ISML LSP for the full ISML language support, and Scripting in ISML for how expressions and <isscript> blocks get this completion
Forms, dictionaries, and generated members
Completion also follows the project types behind these values:
| Expression | Source of members |
|---|---|
product.custom | Metadata attribute definitions |
site.getCustomPreferenceValue(…) | Locally declared site-preference IDs and overloads |
server.forms.getForm(…) and its result | Form XML and generated SFRA form types |
args in a pipeline execute function | Input/output annotations |
base assigned from module.superModule | The next matching cartridge implementation |
Pipeline XML also completes script resources, static templates, pipeline targets, types, and groups in recognized attribute contexts. See Pipeline scripts & XML
Trigger Characters
Completion is offered automatically as you type, and is re-triggered on the characters that matter for SFCC: " ' . / ~ @ - _ $ < : {. You can always force it with Ctrl+Space
Customizing Completion Contexts
The provider's context rules (which method calls trigger route, hook, template, and resource completion) are configurable via intellij-sfcc.completions.* settings - useful if your project wraps the standard APIs in helpers. See Configuration & troubleshooting for the full setting list and a wrapper example