# Language servers

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/idea/llms.txt).

> **TL;DR**
> `File | Settings | Languages & Frameworks | Language Servers` for Windows and Linux
>
>
>
> `IntelliJ IDEA | Settings | Languages & Frameworks | Language Servers` for macOS
>
>
>
> `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) ![the Settings icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.settings.svg)

IntelliJ IDEA can connect to any language server that implements the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/) (LSP) and use it for coding assistance in the files that you map to the server. This way, you can work with languages that have no dedicated support in IntelliJ IDEA.

This functionality relies on the [LSP Connection Manager](https://plugins.jetbrains.com/plugin/34030-lsp-connection-manager)  plugin, which  is bundled and enabled in IntelliJ IDEA   by default. If the relevant features are not available, make sure that you did not disable the plugin.

The features that are available in your files depend on the capabilities of the language server you connect to.

* [Code completion](auto-completing-code.html)

* [Error and warning highlighting](code-inspection.html)

* [Code actions and quick-fixes](intention-actions.html)

* [Quick documentation and parameter info](viewing-reference-information.html)

* [Navigation to declarations and implementations](navigating-through-the-source-code.html)

* [Finding and highlighting usages](find-highlight-usages.html)

* [Rename refactoring](rename-refactorings.html)

* [Inlay hints](inlay-hints.html)

* [Code folding](working-with-source-code.html#code_folding)

* [File structure](viewing-structure-of-a-source-file.html)

* [Call and type hierarchy](viewing-structure-and-hierarchy-of-the-source-code.html#ws_build_hierarchy)

* [Semantic highlighting](configuring-colors-and-fonts.html#customize-color-scheme)

* [Code formatting](reformat-and-rearrange-code.html)

> **Note:**
> IntelliJ IDEA uses a language server to format code only in files that have no other formatter.

## Before you begin

* Install the language server in the environment where the project is located: on your computer, in a [WSL distribution](how-to-use-wsl-development-environment-in-product.html), or on a [remote host](remote-development-overview.html).

* Make sure the project is [trusted](project-security.html). IntelliJ IDEA does not start language servers for projects opened in Safe Mode.

Language servers work only with files that are part of the project. Server configurations are saved for the current project in the workspace file (`.idea/workspace.xml`) and are not shared through version control.

## Add a language server

IntelliJ IDEA communicates with a language server over standard input and output (stdio) or over a socket. Use a socket if the server does not support stdio, or if you want to connect to a server that is already running.

Procedure: Connect over standard input and output (stdio)

1. Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) to open settings and then select `Languages & Frameworks | Language Servers`.

2. Click ![the Add LSP Server button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.add.svg) (Add LSP Server). IntelliJ IDEA creates an enabled configuration that uses stdio.

3. In the Name field, enter a unique name for the server. The name identifies the server in the Language Services widget and in the Services tool window.

4. In the Executable path field, specify the path to the server executable. For a project in WSL or on a remote host, specify a path in that environment. IntelliJ IDEA starts the server in the project root directory.

5. In the Arguments field, specify the command-line arguments that the server needs to communicate over stdio. The default value is `--stdio`. For the exact arguments, refer to the documentation of the server. Enclose arguments that contain spaces in quotes.

6. Under File name patterns, click ![the Add button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.add.svg) and enter a pattern for the files that the server needs to process. Use `*` and `?` as wildcards, or specify an exact file name.

![The Language Servers settings page](https://resources.jetbrains.com/help/img/idea/2026.3/language-servers-settings.png)

7. Optionally, configure additional server settings:

* Environment variables: variables to pass to the server process.

* Initialization options (JSON): a JSON object that IntelliJ IDEA sends to the server in the `initialize` request. The supported options depend on the server. If the JSON is not valid, IntelliJ IDEA sends no initialization options.

8. Click OK.

Procedure: Connect over a socket

1. Press `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) to open settings and then select `Languages & Frameworks | Language Servers`.

2. Click ![the Add LSP Server button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.add.svg) (Add LSP Server). IntelliJ IDEA creates an enabled configuration that uses stdio.

3. In the Name field, enter a unique name for the server. The name identifies the server in the Language Services widget and in the Services tool window.

4. Set Communication channel to socket. IntelliJ IDEA replaces `--stdio` in the Arguments field with `--socket=<port>` and selects a free port.

5. If the server listens on a different port, change the port number in `--socket=<port>`.

6. Choose how to connect to the server:

* To start the server from IntelliJ IDEA, specify the Executable path. IntelliJ IDEA starts the server with the specified arguments and connects to the port on localhost.

* To connect to a server that is already running, leave the Executable path field empty. IntelliJ IDEA connects to the port on localhost without starting a process.

7. Under File name patterns, click ![the Add button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.add.svg) and enter a pattern for the files that the server needs to process. Use `*` and `?` as wildcards, or specify an exact file name.

8. Optionally, configure additional server settings:

* Environment variables: variables to pass to the server process.

* Initialization options (JSON): a JSON object that IntelliJ IDEA sends to the server in the `initialize` request. The supported options depend on the server. If the JSON is not valid, IntelliJ IDEA sends no initialization options.

9. Click OK.

> **Note:**
> Socket connections are not available for projects in WSL or on a remote host.

The server starts when you open a file that matches one of its patterns. When you change the server configuration and apply the changes, IntelliJ IDEA restarts the server.

> **Tip:**
> Some plugins provide preconfigured language servers. To find them, click More via plugins… on the Language Servers settings page. For a server that a plugin provides, you can change only the arguments, environment variables, file name patterns, and initialization options.

## Monitor and restart language servers

### Language Services widget

The Language Services widget ![the Language Services widget](https://resources.jetbrains.com/help/img/idea/2026.3/app-client.expui.json.object.svg) on the status bar lists the running servers under Running on Current File and Running on Other Files.

![The Language Services widget on the status bar](https://resources.jetbrains.com/help/img/idea/2026.3/language-services-widget.png)

If a server terminates unexpectedly, its item is marked as Terminated.

Click a server to open its settings. Next to a server, the following actions are available:

* ![the Restart Server icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.actions.stopAndRestart.svg) Restart Server: restart the server.

* ![the Stop and Autorun Server as Needed icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.actions.stopAndRestart.svg) Stop and Autorun Server as Needed: stop a server that is running on other files. IntelliJ IDEA starts it again when you open a matching file.

* ![the Open Settings icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.settings.svg) Open Settings: open the server configuration.

* Open Server Error Output: after a server terminates unexpectedly, open the error output of the server in an editor tab.

### Services tool window

Language servers are listed in the [Services](services-tool-window.html) tool window under Language Servers (LSP). Select a server to view its log: start and stop events, messages from the server, and the requests, responses, and notifications that IntelliJ IDEA and the server exchange. Incoming and outgoing messages are marked `IN` and `OUT`. To view the formatted JSON of a message, click its link.

Use the toolbar to restart the server (![the Restart Server icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.actions.restart.svg)) or stop it (![the Stop Server icon](https://resources.jetbrains.com/help/img/idea/2026.3/app.actions.suspend.svg)).

![A running language server in the Services tool window](https://resources.jetbrains.com/help/img/idea/2026.3/language-servers-services-tw.png)

## Disable or remove a language server

On the Language Servers settings page, select the server and do one of the following:

* To stop using the server without deleting its configuration, clear the Enabled option.

* To delete the configuration, click ![the Remove button](https://resources.jetbrains.com/help/img/idea/2026.3/app.expui.general.remove.svg) (Remove) and confirm the deletion.

