For several programming languages, a language server is available that provides information about the code to IDEs as long as they support communication via the language server protocol (LSP). This enables the IDE to provide the following services:
By providing a client for the language server protocol, Qt Creator can support the above features for several other programming languages besides C++. However, the client does not support language servers that require special handling.
Qt Creator uses the MIME type of the file to determine which language server to request information from when you open a file for editing. Add new MIME types or file patterns to match language servers. If you do not set at least one MIME type or file pattern, no files will be sent to the language server. This is done to avoid unnecessary traffic and inaccurate information, as files are only sent to the languge server if they are known to be handled by it. For more information about how Qt Creator uses MIME types, see 编辑 MIME 类型 .
To use a language server:
(
变量
) button to use a variable for the server name. For more information, see
Using Qt Creator Variables
.
To remove language servers from the list, select Delete .
The locator enables you to browse not only files, but any items defined by locator filters . The language client plugin supports the following locator filters:
:
)
.
)
c
), enum, and function (
m
) definitions in your project
The language service client has been mostly tested with Python. If problems arise when you try it or some other language, please select
Help
>
Report Bug
to report them in the
Qt Project Bug Tracker
. The reports should include Qt Creator console output with the environment variable
QT_LOGGING_RULES=qtc.languageclient.*=true
set.