Doc: Update info about QML Language Server

- Rename topic as "Configure QML Language Server", as QMLLS
  is now turned on by default
- Describe new preferences
- Remove "QML Language Server" from checkbox labels
- Add a link to the docs to the change log

Task-number: QTCREATORBUG-30604
Change-Id: I397b1747a3d23d728c78dc2eae000839655c4f32
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Leena Miettinen
2024-06-25 09:40:42 +02:00
parent 96815bb95e
commit 2f76130a49
4 changed files with 24 additions and 24 deletions

View File

@@ -95,12 +95,15 @@ Editing
([QTCREATORBUG-30594](https://bugreports.qt.io/browse/QTCREATORBUG-30594)) ([QTCREATORBUG-30594](https://bugreports.qt.io/browse/QTCREATORBUG-30594))
* Language Server * Language Server
* Switched on by default for Qt 6.8 and later * 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)) ([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)) ([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 * Fixed that tool tips from the built-in model were shown instead of tool tips
from the server from the server
[Documentation](https://doc.qt.io/qtcreator/creator-how-to-use-qml-language-server.html)
### Python ### Python
* Added options for updating Python Language Server * Added options for updating Python Language Server

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -85,9 +85,8 @@
To enable a language server, select the checkbox next to the language To enable a language server, select the checkbox next to the language
server name and set server preferences. server name and set server preferences.
To turn on \l{Turn on \QMLLS}{\QMLLS}, go to To configure \l{Configure \QMLLS}{\QMLLS}, go to
\preferences > \uicontrol {Qt Quick} > \uicontrol {QML/JS Editing} and \preferences > \uicontrol {Qt Quick} > \uicontrol {QML/JS Editing}.
select \uicontrol {Enable \QMLLS}.
To remove language servers from the list, select \uicontrol Delete. To remove language servers from the list, select \uicontrol Delete.
@@ -237,35 +236,33 @@
\ingroup creator-how-to-lsp \ingroup creator-how-to-lsp
\title Turn on \QMLLS \title Configure \QMLLS
Since Qt 6.4, \QMLLS offers code completion and Since Qt 6.4, \QMLLS offers code completion and issues warnings for QML.
issues warnings for QML. To use it, go to \preferences >
\uicontrol {Qt Quick} > \uicontrol {QML/JS Editing} and select
\uicontrol {Enable \QMLLS}.
By default, enabling \QMLLS will only enable warning messages To turn off \QMLLS, go to \preferences > \uicontrol {Qt Quick} >
and code completion, while advanced features such as renaming and finding usages \uicontrol {QML/JS Editing} and clear \uicontrol {Turn on}.
will be handled by the embedded code model.
To disable the embedded code model and use \QMLLS for everything, By default, \QMLLS issues warning messages and provides code completion,
select \uicontrol {Use \QMLLS advanced features}. 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 Also, \QC tries to use \QMLLS shipped with the Qt version in your current
\l{Kits}{kit}. To override that behavior and always use \l{Kits}{kit}. To override that behavior and always use
\QMLLS of the highest registered Qt version, select \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 To use older \QMLLS versions, select
\uicontrol{Allow versions below Qt 6.8}. \uicontrol{Allow versions below Qt 6.8}.
\image qtcreator-qml-js-editing.webp {QML/JS Editing preferences} \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 automatically configure new CMake projects, select
to \c{ON} in \uicontrol Projects > \uicontrol {Build Settings} \uicontrol {Create .qmlls.ini files for new projects}.
> \uicontrol {Initial Configuration}.
\sa {Manage Language Servers}{How To: Manage Language Servers}, \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} {Language Servers}
*/ */

View File

@@ -401,7 +401,7 @@ public:
uiQmlOpenComboBox->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred); uiQmlOpenComboBox->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Preferred);
uiQmlOpenComboBox->setSizeAdjustPolicy(QComboBox::QComboBox::AdjustToContents); 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); useQmlls->setChecked(s.qmllsSettings().useQmlls);
ignoreMinimumQmllsVersion = new QCheckBox( ignoreMinimumQmllsVersion = new QCheckBox(
@@ -411,16 +411,16 @@ public:
ignoreMinimumQmllsVersion->setEnabled(s.qmllsSettings().useQmlls); ignoreMinimumQmllsVersion->setEnabled(s.qmllsSettings().useQmlls);
disableBuiltInCodemodel = new QCheckBox( disableBuiltInCodemodel = new QCheckBox(
Tr::tr("Use QML Language Server advanced features (renaming, find usages and co.) " Tr::tr("Use advanced features (renaming, find usages, and so on) "
"(EXPERIMENTAL!)")); "(experimental)"));
disableBuiltInCodemodel->setChecked(s.qmllsSettings().disableBuiltinCodemodel); disableBuiltInCodemodel->setChecked(s.qmllsSettings().disableBuiltinCodemodel);
disableBuiltInCodemodel->setEnabled(s.qmllsSettings().useQmlls); 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->setChecked(s.qmllsSettings().useLatestQmlls);
useLatestQmlls->setEnabled(s.qmllsSettings().useQmlls); useLatestQmlls->setEnabled(s.qmllsSettings().useQmlls);
generateQmllsIniFiles = new QCheckBox( 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->setChecked(s.qmllsSettings().generateQmllsIniFiles);
generateQmllsIniFiles->setEnabled(s.qmllsSettings().useQmlls); generateQmllsIniFiles->setEnabled(s.qmllsSettings().useQmlls);
QObject::connect(useQmlls, &QCheckBox::stateChanged, this, [this](int checked) { QObject::connect(useQmlls, &QCheckBox::stateChanged, this, [this](int checked) {