Code Completion
Context-aware autocomplete for the dw.* API, require paths, hooks, routes, templates, resource keys, and more
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, loop variables from <isloop>, and variables from <isset>.
<isloop items="${pdict.products}" var="product">
<isprint value="${product. }" /> <!-- ← Product member completion -->
</isloop>See ISML LSP for the full ISML language support, and Scripting in ISML for how expressions and <isscript> blocks get this completion.
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.