Navigation & Symbols

Go to definition, find all references, and symbol search across cartridges, hooks, routes, templates, and properties

The language server turns SFCC's string-based wiring - require() paths, hook names, route names, template paths, property keys - into navigable links. Jump from where something is used to where it is defined, even across cartridges and file types.

Go to Definition

Press F12 (or Cmd/Ctrl+click) to jump to the definition. The server resolves a wide range of SFCC targets:

FromJumps to
require('*/cartridge/...') / ~/... / relativeThe resolved module file (respecting the cartridge overlay)
require('dw/...') and dw.* membersThe bundled API type definition
custom.myAttributeThe attribute definition in your metadata XML
HookMgr.callHook('name', 'fn')The hook's script implementation
URLUtils.url('Route-Name')The controller route or pipeline that backs it
res.render('path/to/template')The .isml template file
Resource.msg('key', 'bundle')The line in the .properties file
Custom API operationThe endpoint's implementation script or schema
steptypes.json functionThe exported function in the step module
module.superModule memberThe assignment in the overridden parent module

When a module exists in more than one cartridge, the server returns all matching locations so you can pick the right layer of the overlay.

// F12 on the path below opens the winning cartridge's collections.js
var collections = require('*/cartridge/scripts/util/collections');

Find All References

Shift+F12 finds every usage of a symbol. Beyond ordinary local symbols, the server resolves cross-file SFCC references:

  • Exported module members - find everywhere a module.exports.foo is consumed via require() across cartridges.
  • Route names - find every place a route is referenced.
  • Resource keys - find every use of a property key.
  • ISML variables - references to <isset> / <isloop> variables within a template's ${ … } expressions and <isscript> blocks.
// Find All References on `placeOrder` shows every requiring caller
module.exports.placeOrder = function (order) { /* ... */ };

Document Symbols & Outline

The Outline view and breadcrumbs show a structured map of the current file:

  • Scripts - functions, classes, methods, top-level variables, exports, importScript/importPackage calls, and SFRA route definitions (server.get(...), etc.).
  • hooks.json - each hook entry as an event symbol.
  • api.json - each custom-API endpoint as a method symbol.

Cmd/Ctrl+T searches symbols across the whole project - not just functions and classes, but indexed SFCC artifacts:

  • Functions, variables, classes, and methods in every script.
  • Hooks (from hooks.json).
  • Custom-API endpoints (from api.json).
  • Routes and step types.

Type a name and jump straight to it, wherever it lives.

Cmd+T  →  "Account-Show"      → the route definition
Cmd+T  →  "dw.order.calculate" → the hook entry
Cmd+T  →  "getProductPrice"   → the function

What Gets Indexed

Navigation accuracy depends on the project indexes. The server scans and keeps these up to date as files change:

IndexSource filesPowers
Routescontrollers (server.*), *.xml pipelinesroute completion, definition, symbols
Hookshooks.json + hook scriptshook completion, definition, symbols
Properties*.properties in templates/resourcesresource key completion, definition, references
Custom APIsapi.json + OpenAPI YAML + scriptsendpoint completion, definition, symbols
Step typessteptypes.json + step modulesstep completion, definition
Templates.isml filestemplate path completion and navigation
Import scriptimportScript graphsimported-symbol completion, navigation
Super modulemodule.superModule usageparent-module completion, navigation

Indexes refresh automatically as you edit, save, add cartridges, or change the active cartridge path. After large structural changes (adding cartridges, moving API folders), give the server a moment to reindex.

On this page