Details
-
Task
-
Resolution: Unresolved
-
P2: Important
-
6.7
-
None
Description
Currently, the parser requires exactly one UIRootMember. However, that's problematic for the LSP when starting with an empty document, as it means we cannot offer auto-completion (for import statements, and the very first item).
One way to fix this would be to make an empty UiProgram (or ones containing only UiHeaderItemListOpt nodes) valid (unconditionally), and add checks in the appropriate places to reject such files.
Another solution would be to add basically the same, but as a new toplevel rule, and have only the LSP (and potentially qmllint) opt into this behaviour
Attachments
Issue Links
- is required for
-
QTBUG-113727 qmlls: improve Code completion using new QQmlLSUtils stuff
- Closed