Commit Graph

1 Commits

Author SHA1 Message Date
Fawzi Mohamed 538600cf5a qmlls: completion support
Add support for completions to qmlls. This is a preliminary support
that uses QmlDom. For this reason it has some limitations, mainly
that it only uses QML types, no js completions are provided,
and no type propagation is kept into account.
On the plus side it is immediately up to date when dependencies
are updated.
The completion tries to find in which part of the qml file one is
and distinguishes mainly 4 parts:
* outside all QmlObjects
* in an import
* in a QmlObject, declaring a new binding
* in a script, or similar
It looks at the position in the editor and ts context, namely:
* the word before the cursor (which is used as filter in the client),
* the dot expression before that word
* the whole line before the cursor.

Change-Id: Iefd1332451c060d3d10c68bb427b26c1bc020666
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-05-19 11:03:39 +02:00