Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
6.7
-
None
Description
We should investigate whether it makes sense to add snippets for binding completions.
Some ideas:
- when completing a property name of the current type, automatically insert a snippet with a `: ` but place the cursor before, so after using the completion it should look like `myProperty<cursor> : someValue`
- when completing a QML type (for bindings to the default property, do as above but add the `{}` braces: `MyItem<cursor> {}`
- when completing a qualified name: suggest the entire name (and do not stop at dots, if possible), such that `QQ.Item` (when `import QtQuick as QQ`), `font.family`. This allows to also insert the `: {}` or `: value` at the same time, which is quite nice for our current parser.
-
- One could also suggest the `{}` completion when completing only `font` to get the grouped 'grouped properties' syntax
- check if that does not generate way too much completions, it could be unhandy for the user if the completion is too full of stuff
Attachments
Issue Links
- is required for
-
QTBUG-113727 qmlls: improve Code completion using new QQmlLSUtils stuff
- Closed
- relates to
-
QTBUG-119969 qmlls: snippets completion for Quick
- Closed
- resulted from
-
QTBUG-120100 qmlls: completion inserts colons in bindings
- Closed