Skip to content

Configuration

Viet Dinh edited this page May 11, 2024 · 5 revisions

Local configuration file

You can define an .odoo_lsp or .odoo_lsp.json file which defines the same options to odoo-lsp as you would in VSCode. For example:

// in .odoo_lsp
{
  "module": {
    "roots": ["foo", "bar"]
  }
}

This tells odoo-lsp to index only the roots specified, and only index other modules as needed, ignoring workspace folders and root files.

Options

odoo-lsp.module.roots

Accepts a list of paths (can be globbed) of roots to index, similar to --addons-path.

odoo-lsp.symbols.limit

The maximum number of items to show in the workspace symbols browser.

odoo-lsp.references.limit

The maximum number of model/record references to retrieve at once.

odoo-lsp.completions.limit

The maximum number of completion entries to retrieve at once.

odoo-lsp.binary.preferNightly

Whether to download the latest nightly binaries of the LSP server. odoo-lsp is under heavy development and therefore it is advisable to leave this at true, but set to false if you encounter major problems with the LSP server.

odoo-lsp.binary.overrideVersion

Specify the version (i.e. Git tag) of the LSP server to download among those listed at Releases. Overrides binary.preferNightly if set.