Odoo Shortcuts includes a proprietary Language Server (LSP) that provides intelligent autocomplete, code navigation, and static analysis for JavaScript/TypeScript in the Odoo context.
| OWL LSP Features |
|---|
![]() |
![]() |
![]() |
![]() |
The LSP provides context-aware autocomplete for:
F12) - Jump to definitionAlt+F12) - Show definition inlineShift+F12) - Find all referencesCtrl+T) - Search symbols by nameThe LSP needs to know where Odoo files are to index them:
{
"odooShortcuts.odooServerPaths": [
"/home/user/odoo",
"/home/user/enterprise"
]
}
The LSP starts automatically when you open JavaScript/TypeScript files. It activates for:
.js files with /** @odoo-module **/.ts filesstatic/src/ directoriesRestart the language server (useful if there are issues):
Command: Odoo Shortcuts: Restart OWL/JS Language Server
Force reindexing of all JavaScript files:
Command: Odoo Shortcuts: Reindex JavaScript Files (LSP)
Shows a notification with progress and result.
When you use an unimported symbol, the LSP can suggest automatic imports.

/** @odoo-module **/
import { Component } from "@odoo/owl";
export class MyComponent extends Component {
setup() {
// Type "use" and press Ctrl+Space
this.state = useState({}); // โ Autocompletes useState
}
}

import { Dialog } from "@web/core/dialog/dialog";
// Ctrl+Click on "Dialog" to go to its definition
/** @odoo-module **/
// Type "Component" without importing it
class MyComponent extends Component {
// LSP will suggest: import { Component } from "@odoo/owl";
}
When the LSP is indexing files, youโll see in the status bar:
๐ Indexing JS: 45%
This indicates the server is scanning your codebase. Once completed, all features will be available.
/** @odoo-module **/If you have a very large codebase:
odooServerPaths to only whatโs necessary.gitignoreIf you see connection errors to the LSP:
The LSP is divided into two parts:
The LSP indexes and provides information about:
useState, useRef, useEffect), lifecycle methodsregistry, services, common patternsThe LSP behavior automatically adjusts based on:
No additional manual configuration required.
Next: CodeLens