diff --git a/dist/changelog/changes-14.0.0.md b/dist/changelog/changes-14.0.0.md index 8ef28236d6e..8c51242e3d5 100644 --- a/dist/changelog/changes-14.0.0.md +++ b/dist/changelog/changes-14.0.0.md @@ -95,12 +95,15 @@ Editing ([QTCREATORBUG-30594](https://bugreports.qt.io/browse/QTCREATORBUG-30594)) * Language Server * Switched on by default for Qt 6.8 and later - * Added option for generating `qmlls.ini` files for CMake projects + * Added an option for generating `qmlls.ini` files for CMake projects in + `Preferences` > `Qt Quick`> `QML/JS Editing` ([QTCREATORBUG-30394](https://bugreports.qt.io/browse/QTCREATORBUG-30394)) ([Qt Documentation](https://doc.qt.io/qt-6/cmake-variable-qt-qml-generate-qmlls-ini.html)) * Fixed that tool tips from the built-in model were shown instead of tool tips from the server + [Documentation](https://doc.qt.io/qtcreator/creator-how-to-use-qml-language-server.html) + ### Python * Added options for updating Python Language Server diff --git a/doc/qtcreator/images/qtcreator-qml-js-editing.webp b/doc/qtcreator/images/qtcreator-qml-js-editing.webp index c0b56264dd1..f9475414f54 100644 Binary files a/doc/qtcreator/images/qtcreator-qml-js-editing.webp and b/doc/qtcreator/images/qtcreator-qml-js-editing.webp differ diff --git a/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc b/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc index 281201fb300..7fc22f4b0e8 100644 --- a/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc +++ b/doc/qtcreator/src/editors/creator-only/creator-language-server.qdoc @@ -85,9 +85,8 @@ To enable a language server, select the checkbox next to the language server name and set server preferences. - To turn on \l{Turn on \QMLLS}{\QMLLS}, go to - \preferences > \uicontrol {Qt Quick} > \uicontrol {QML/JS Editing} and - select \uicontrol {Enable \QMLLS}. + To configure \l{Configure \QMLLS}{\QMLLS}, go to + \preferences > \uicontrol {Qt Quick} > \uicontrol {QML/JS Editing}. To remove language servers from the list, select \uicontrol Delete. @@ -237,35 +236,33 @@ \ingroup creator-how-to-lsp - \title Turn on \QMLLS + \title Configure \QMLLS - Since Qt 6.4, \QMLLS offers code completion and - issues warnings for QML. To use it, go to \preferences > - \uicontrol {Qt Quick} > \uicontrol {QML/JS Editing} and select - \uicontrol {Enable \QMLLS}. + Since Qt 6.4, \QMLLS offers code completion and issues warnings for QML. - By default, enabling \QMLLS will only enable warning messages - and code completion, while advanced features such as renaming and finding usages - will be handled by the embedded code model. - To disable the embedded code model and use \QMLLS for everything, - select \uicontrol {Use \QMLLS advanced features}. + To turn off \QMLLS, go to \preferences > \uicontrol {Qt Quick} > + \uicontrol {QML/JS Editing} and clear \uicontrol {Turn on}. + + By default, \QMLLS issues warning messages and provides code completion, + while the embedded code model handles advanced features, such as renaming + symbols and finding usages. To disable the embedded code model and use + \QMLLS for everything, select \uicontrol {Use advanced features}. Also, \QC tries to use \QMLLS shipped with the Qt version in your current \l{Kits}{kit}. To override that behavior and always use \QMLLS of the highest registered Qt version, select - \uicontrol {Use \QMLLS from latest Qt version}. + \uicontrol {Use from latest Qt version}. To use older \QMLLS versions, select \uicontrol{Allow versions below Qt 6.8}. \image qtcreator-qml-js-editing.webp {QML/JS Editing preferences} - When using \c qmlls from Qt 6.7 or later, set \l{QT_QML_GENERATE_QMLLS_INI} - to \c{ON} in \uicontrol Projects > \uicontrol {Build Settings} - > \uicontrol {Initial Configuration}. + To automatically configure new CMake projects, select + \uicontrol {Create .qmlls.ini files for new projects}. \sa {Manage Language Servers}{How To: Manage Language Servers}, - {Enabling and Disabling Messages}, {CMake Build Configuration}, {Kits} + {Enabling and Disabling Messages}, {CMake Build Configuration}, {Kits}, {Language Servers} */ diff --git a/src/plugins/qmljseditor/qmljseditingsettingspage.cpp b/src/plugins/qmljseditor/qmljseditingsettingspage.cpp index 433f0f8b1e0..c0e16b12887 100644 --- a/src/plugins/qmljseditor/qmljseditingsettingspage.cpp +++ b/src/plugins/qmljseditor/qmljseditingsettingspage.cpp @@ -401,7 +401,7 @@ public: uiQmlOpenComboBox->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); uiQmlOpenComboBox->setSizeAdjustPolicy(QComboBox::QComboBox::AdjustToContents); - useQmlls = new QCheckBox(Tr::tr("Enable QML Language Server")); + useQmlls = new QCheckBox(Tr::tr("Turn on")); useQmlls->setChecked(s.qmllsSettings().useQmlls); ignoreMinimumQmllsVersion = new QCheckBox( @@ -411,16 +411,16 @@ public: ignoreMinimumQmllsVersion->setEnabled(s.qmllsSettings().useQmlls); disableBuiltInCodemodel = new QCheckBox( - Tr::tr("Use QML Language Server advanced features (renaming, find usages and co.) " - "(EXPERIMENTAL!)")); + Tr::tr("Use advanced features (renaming, find usages, and so on) " + "(experimental)")); disableBuiltInCodemodel->setChecked(s.qmllsSettings().disableBuiltinCodemodel); disableBuiltInCodemodel->setEnabled(s.qmllsSettings().useQmlls); - useLatestQmlls = new QCheckBox(Tr::tr("Use QML Language Server from latest Qt version")); + useLatestQmlls = new QCheckBox(Tr::tr("Use from latest Qt version")); useLatestQmlls->setChecked(s.qmllsSettings().useLatestQmlls); useLatestQmlls->setEnabled(s.qmllsSettings().useQmlls); generateQmllsIniFiles = new QCheckBox( - Tr::tr("Generate QML Language Server .qmlls.ini configurations for new projects.")); + Tr::tr("Create .qmlls.ini files for new projects")); generateQmllsIniFiles->setChecked(s.qmllsSettings().generateQmllsIniFiles); generateQmllsIniFiles->setEnabled(s.qmllsSettings().useQmlls); QObject::connect(useQmlls, &QCheckBox::stateChanged, this, [this](int checked) {