mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
language_server_protocol.md: update "Supported Features"
This commit is contained in:
parent
0a7585ac0b
commit
5df1edd1f5
@ -12,6 +12,13 @@ See [GitHub Changelog](https://github.com/JetBrains/intellij-sdk-docs/commits/ma
|
|||||||
|
|
||||||
## 2024
|
## 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
|
||||||
{july-24}
|
{july-24}
|
||||||
|
|
||||||
|
@ -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:
|
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)
|
- Find Usages ([`textDocument/references`](https://microsoft.github.io/language-server-protocol/specification#textDocument_references))
|
||||||
- Quick fixes for errors and warnings ([textDocument/codeAction](https://microsoft.github.io/language-server-protocol/specification/#textDocument_codeAction))
|
- Completion Item Resolve Request ([`completionItem/resolve`](https://microsoft.github.io/language-server-protocol/specification/#completionItem_resolve))
|
||||||
- Code completion ([textDocument/completion](https://microsoft.github.io/language-server-protocol/specification/#textDocument_completion))
|
- Code Action Resolve Request ([`codeAction/resolve`](https://microsoft.github.io/language-server-protocol/specification/#codeAction_resolve))
|
||||||
- Go to Declaration ([textDocument/definition](https://microsoft.github.io/language-server-protocol/specification/#textDocument_definition))
|
|
||||||
|
|
||||||
### 2023.3
|
### 2024.1
|
||||||
|
|
||||||
- Intention actions ([textDocument/codeAction](https://microsoft.github.io/language-server-protocol/specification/#textDocument_codeAction))
|
- Communication channel: Socket
|
||||||
- Code formatting ([textDocument/formatting](https://microsoft.github.io/language-server-protocol/specification/#textDocument_formatting))
|
- 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
|
### 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
|
## Basic Implementation
|
||||||
|
|
||||||
@ -161,10 +177,14 @@ A dedicated <control>Language Services</control> status bar widget is available
|
|||||||
Override `LspServerSupportProvider.createLspServerWidgetItem()` to provide a custom icon and link to [Settings](settings.md) page (if available).
|
Override `LspServerSupportProvider.createLspServerWidgetItem()` to provide a custom icon and link to [Settings](settings.md) page (if available).
|
||||||
|
|
||||||
```kotlin
|
```kotlin
|
||||||
override fun getLspServerWidgetItem(lspServer: LspServer,
|
override fun getLspServerWidgetItem(
|
||||||
currentFile: VirtualFile?) =
|
lspServer: LspServer,
|
||||||
LspServerWidgetItem(lspServer, currentFile,
|
currentFile: VirtualFile?
|
||||||
FooIcons.PluginIcon, FooConfigurable::class.java)
|
) =
|
||||||
|
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
|
If there are configuration problems preventing from starting an LSP server, the plugin can provide a widget item
|
||||||
|
Loading…
x
Reference in New Issue
Block a user