Managing language servers | Qt Creator Documentation
Description: Get code completion, highlighting of the symbol under cursor, and jumping to the symbol definition in the editor for other programming languages besides C++, as well as diagnostics.

- Qt Creator Documentation
- How to
- Editing code
- Managing language servers
- Qt Creator 19.0.1

Specify code style ◦ Add a Java language server

# Managing language servers

> How to: Manage language servers

For several programming languages, a language server offers information about the code to IDEs as long as they support communication via the language server protocol (LSP). The IDE can then offer the following services:

- Code completion
- Sending document formatting requests to the language server to automatically format documents using the settings specified in Preferences > Text Editor > Behavior
- Highlighting the symbol under cursor
- Viewing function tooltips
- Semantic highlighting, as defined in Proposal of the semantic highlighting protocol extension
- Navigating in the code by using the locator or moving to the symbol definition
- Inspecting code by viewing the document outline in the Outline view or in the Symbols list on the editor toolbar
- Viewing the callers and callees of a function
- Viewing the base classes and derived classes of a class
- Finding references to symbols
- Renaming the symbol under the cursor
- Code actions
- Displaying diagnostics from the language server as tooltips. You can also select a code range to display diagnostics for.

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.

## Adding MIME types for language servers

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 language server if they are known to be handled by it. For more information about how Qt Creator uses MIME types, see Edit MIME types.

## Adding language servers

Qt Creator adds a Python language server by default.

Also, it offers to install language servers for JSON and YAML files when you open them in the editor if it can find the NPM package manager on the computer.

Qt Creator also offers to install language servers for Rust, C#, and Swift from their respective systems when you open projects in the editor that use them.

Add a Java language server for Android development. For other languages, add generic stdIO language servers.

To add language servers, go to Preferences > Language Client and select Add.

To enable a language server, select the checkbox next to the language server name and set server preferences.

To remove language servers from the list, select Delete.

## Updating Python language server

Qt Creator offers to update the Python language server when you open a Python file in the editor.

To update the language server, select Update. To save your choice, select Always Update.

To skip updating and hide the message for future updates, select Never.

## Supported locator filters

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:

- Locating symbols in the current project (`:`)
- Locating symbols in the current document (`.`)
- Locating class (`c`), enum, and function (`m`) definitions in your project

## Reporting issues

The language server client has been mostly tested with Python and C++. If problems arise when you try them 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.

See also How to: Manage language servers and Behavior.

Specify code style ◦ Add a Java language server