From 5df1edd1f500a2a3035fcd93f223985613253d24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yann=20C=C3=A9bron?= Date: Tue, 13 Aug 2024 10:50:15 +0200 Subject: [PATCH] language_server_protocol.md: update "Supported Features" --- topics/intro/content_updates.md | 7 +++ .../language_server_protocol.md | 46 +++++++++++++------ 2 files changed, 40 insertions(+), 13 deletions(-) diff --git a/topics/intro/content_updates.md b/topics/intro/content_updates.md index fca204fd7..84c8bc3ff 100644 --- a/topics/intro/content_updates.md +++ b/topics/intro/content_updates.md @@ -12,6 +12,13 @@ See [GitHub Changelog](https://github.com/JetBrains/intellij-sdk-docs/commits/ma ## 2024 +### August +{august-24} + +Minor Changes and Additions +: +- Updated list of [supported features](language_server_protocol.md#supported-features) for Language Server Protocol (LSP). + ### July {july-24} diff --git a/topics/reference_guide/custom_language_support/language_server_protocol.md b/topics/reference_guide/custom_language_support/language_server_protocol.md index abdf1ca29..5f9d0c2f8 100644 --- a/topics/reference_guide/custom_language_support/language_server_protocol.md +++ b/topics/reference_guide/custom_language_support/language_server_protocol.md @@ -107,21 +107,37 @@ The LSP API sources are bundled in IntelliJ IDEA Ultimate and can be found withi The LSP support provided by the IntelliJ Platform covers the following features for these releases: -### 2023.2 +### 2024.2 -- Errors and warnings highlighting [textDocument/publishDiagnostics](https://microsoft.github.io/language-server-protocol/specification/#textDocument_publishDiagnostics) -- Quick fixes for errors and warnings ([textDocument/codeAction](https://microsoft.github.io/language-server-protocol/specification/#textDocument_codeAction)) -- Code completion ([textDocument/completion](https://microsoft.github.io/language-server-protocol/specification/#textDocument_completion)) -- Go to Declaration ([textDocument/definition](https://microsoft.github.io/language-server-protocol/specification/#textDocument_definition)) +- Find Usages ([`textDocument/references`](https://microsoft.github.io/language-server-protocol/specification#textDocument_references)) +- Completion Item Resolve Request ([`completionItem/resolve`](https://microsoft.github.io/language-server-protocol/specification/#completionItem_resolve)) +- Code Action Resolve Request ([`codeAction/resolve`](https://microsoft.github.io/language-server-protocol/specification/#codeAction_resolve)) -### 2023.3 +### 2024.1 -- Intention actions ([textDocument/codeAction](https://microsoft.github.io/language-server-protocol/specification/#textDocument_codeAction)) -- Code formatting ([textDocument/formatting](https://microsoft.github.io/language-server-protocol/specification/#textDocument_formatting)) +- Communication channel: Socket +- Execute a command ([`workspace/executeCommand`](https://microsoft.github.io/language-server-protocol/specification/#workspace_executeCommand)) +- Apply a WorkspaceEdit ([`workspace/applyEdit`](https://microsoft.github.io/language-server-protocol/specification/#workspace_applyEdit)) +- Show Document Request ([`window/showDocument`](https://microsoft.github.io/language-server-protocol/specification/#window_showDocument)) ### 2023.3.2 -- Quick documentation ([textDocument/hover](https://microsoft.github.io/language-server-protocol/specification#textDocument_hover)) +- Quick documentation ([`textDocument/hover`](https://microsoft.github.io/language-server-protocol/specification#textDocument_hover)) +- Client-side file watcher ([`workspace/didChangeWatchedFiles`](https://microsoft.github.io/language-server-protocol/specification#workspace_didChangeWatchedFiles)) + +### 2023.3 + +- Intention actions ([`textDocument/codeAction`](https://microsoft.github.io/language-server-protocol/specification/#textDocument_codeAction)) +- Code formatting ([`textDocument/formatting`](https://microsoft.github.io/language-server-protocol/specification/#textDocument_formatting)) +- Request cancellation ([`$/cancelRequest`](https://microsoft.github.io/language-server-protocol/specification/#cancelRequest)) + +### 2023.2 + +- Communication channel: StdIO +- Errors and warnings highlighting ([`textDocument/publishDiagnostics`](https://microsoft.github.io/language-server-protocol/specification/#textDocument_publishDiagnostics)) +- Quick-fixes for errors and warnings ([`textDocument/codeAction`](https://microsoft.github.io/language-server-protocol/specification/#textDocument_codeAction)) +- Code completion ([`textDocument/completion`](https://microsoft.github.io/language-server-protocol/specification/#textDocument_completion)) +- Go to Declaration ([`textDocument/definition`](https://microsoft.github.io/language-server-protocol/specification/#textDocument_definition)) ## Basic Implementation @@ -161,10 +177,14 @@ A dedicated Language Services status bar widget is available Override `LspServerSupportProvider.createLspServerWidgetItem()` to provide a custom icon and link to [Settings](settings.md) page (if available). ```kotlin -override fun getLspServerWidgetItem(lspServer: LspServer, - currentFile: VirtualFile?) = - LspServerWidgetItem(lspServer, currentFile, - FooIcons.PluginIcon, FooConfigurable::class.java) +override fun getLspServerWidgetItem( + lspServer: LspServer, + currentFile: VirtualFile? +) = + LspServerWidgetItem( + lspServer, currentFile, + FooIcons.PluginIcon, FooConfigurable::class.java + ) ``` If there are configuration problems preventing from starting an LSP server, the plugin can provide a widget item