Turn on QML Language Server

QML Language Server offers code completion and issues warnings for QML. Qt Extension for VS Code supports QML Language Server from Qt 6.8.0, and later. You can check for QML Language Server updates and download the latest version.

To turn on QML Language Server when you activate an extension:

  1. Go to Command Palette, and select Qt: Open Qt Settings.
  2. Go to Qt Qml Configuration, and select Run QML Language Server when activating an extension.

    {Qt QML Configuration}

To use custom QML Language Server arguments instead of the default arguments, select Add Item in Custom Args and add the arguments.

Check for updates

To install the latest QML Language Server version, go to Command Palette, and then select Qt: Check for QML Language Server update.

If Qt Extension for VS Code finds a newer version of QML Language Server, it offers to install it. You can also go to Command Palette, and then select Qt: Download the most recent QML Language Server language server.

To turn off the notification about downloading QML Language Server, go to Qt Qml Configuration and select Do Not Ask for Qmlls Download.

Set QML Language Server location

To use QML Language Server when you develop with an older Qt version than Qt 6.8.0, go to Qt Qml Configuration and set the path to QML Language Server from Qt 6.8.0 or later in Custom Exe Path.

Configure QML Language Server output

To collect trace output from QML Language Server, go to Qt Qml Configuration and select an option in Handle LSP trace.

To show verbose output from QML Language Server, select Verbose Output.

Manage QML modules

To look for QML modules in the specified folders and use the -I option to add import statements for them when you start QML Language Server, go to Qt Qml Configuration and select Add Item in Additional Import Paths.

To use the QML_IMPORT_PATH and -E options to look for QML modules when you start QML Language Server, select Use QML Import Path Env Var.

To stop QML Language Server from triggering a CMake rebuild when it detects that the source code of a C++ defined QML type has been modified, select No CMake Calls. For more information, see Disabling Automatic CMake Builds.

Restart QML Language Server

To restart QML Language Server, go to Command Palette and select Qt: Restart QML Language Server.

See also Qt settings.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.