This commit adds basic autocomplete in xml files. This includes autocompletion for elements, components, props, attributes, and javascript expressions.
The current implementation, while relatively simple, has a couple of drawbacks:
Javascript imports are not resolved by the xml autocomplete, this means that it does not understand the types of imported functions or objects. That said, I've added custom support for frequently used Owl imports, namely useState and useRef. More can be added in the settings if needed.
The autocomplete is limited to templates directly linked to components, sub-templates used via t-call will not get autocompletion as no component/context can be bound to them.
This commit also:
Adds "Go To Definition" support for props and javascript expressions in xml
Support for the following directives: t-att, t-model, t-tag, t-debug, t-log
Fixes t-else syntax highlight to be non-dynamic as the attribute value should be empty
This commit adds basic autocomplete in xml files. This includes autocompletion for elements, components, props, attributes, and javascript expressions.
The current implementation, while relatively simple, has a couple of drawbacks:
useState
anduseRef
. More can be added in the settings if needed.This commit also: