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:
| From | Jumps to |
|---|---|
require('*/cartridge/...') / ~/... / relative | The resolved module file (respecting the cartridge overlay) |
require('dw/...') and dw.* members | The bundled API type definition |
custom.myAttribute | The 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 operation | The endpoint's implementation script or schema |
steptypes.json function | The exported function in the step module |
module.superModule member | The 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.foois consumed viarequire()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/importPackagecalls, 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.
Workspace Symbol Search
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 functionWhat Gets Indexed
Navigation accuracy depends on the project indexes. The server scans and keeps these up to date as files change:
| Index | Source files | Powers |
|---|---|---|
| Routes | controllers (server.*), *.xml pipelines | route completion, definition, symbols |
| Hooks | hooks.json + hook scripts | hook completion, definition, symbols |
| Properties | *.properties in templates/resources | resource key completion, definition, references |
| Custom APIs | api.json + OpenAPI YAML + scripts | endpoint completion, definition, symbols |
| Step types | steptypes.json + step modules | step completion, definition |
| Templates | .isml files | template path completion and navigation |
| Import script | importScript graphs | imported-symbol completion, navigation |
| Super module | module.superModule usage | parent-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.