generated from IWANABETHATGUY/tower-lsp-boilerplate
-
Couldn't load subscription status.
- Fork 4
Features
Viet Dinh edited this page May 18, 2024
·
48 revisions
A more complete listing is also available in the Support Matrix.
- π Python
- π XML
- β JavaScript
- π Specific to odoo-lsp
-
odoo-lsp initgenerates an.odoo_lspconfig file for the LSP -
odoo-lsp tsconfiggenerates atsconfig.jsonprefilled with paths to legacy modules -
odoo-lsp self-updateto update the binary
Also recommended to add--nightlyflag while the LSP is still under heavy development
- π
*.env.ref() - π
request.render() - π
inherit_id= - π
id=(references only) - π
ref= - π
<menuitem parent=".." />
odoo-lsp offers a non-standard syntax to annotate the model of a binding in XML:
<template>
<!-- @type foo stock.picking -->
<t t-out="foo.|"/>
<!-- ^
fields of stock.picking should appear here -->
</template>- π
t-inherit=,t-call=- No usage references yet
- π
<Component prop=".." /> - β
static template=
- π
*.env[] - π
_inherit= - π
comodel_namefor relational fields - π
_name=(references only)
- π
name= - π
Model.field - π Mapped access (completions, hover)
fields.*(related='..')@api.{depends,constrains}('..')Model.{mapped,sorted,create,write..}(..)- Fields in domains (for
search,read_groupetc.)
goto_owl.webm
- VSCode: Ctrl + T, or Quick Open Ctrl + P and prefix with
# - Helix: Space then Shift + S in normal mode
By default, records and models are matched by prefix, unless when the query contains a period in which case
it will be parsed as a module-scoped query. For example base.view_ searches for:
- all records whose
idstarts withview_and defined in thebasemodule; and - all models whose
_namestarts withview_
- π Non-existent fields, XML records
- π Invalid dotted access
Language injections for Python, JavaScript and XPath expressions in XML attributes.
- π
t-*and other attributes - β
t-on-click* - π
<xpath expr=".." />(requires the XSLT/XPath extension)
xml_syntax_highlight.mp4
Schema sourced from the official XML validator used by Odoo.
Supports <record>, <field>, <menuitem> and many other structures.
Powered by the XML extension.



