mirror of
https://github.com/JetBrains/intellij-sdk-code-samples.git
synced 2025-07-28 01:07:49 +08:00
language_server_protocol.md: Status Bar Integration, code snippet
This commit is contained in:
parent
ef342fa2b1
commit
b63f23c0da
@ -119,6 +119,13 @@ private class FooLspServerDescriptor(project: Project) : ProjectWideLspServerDes
|
||||
Since 2024.1, a dedicated <control>Language Services</control> status bar widget is available to monitor the status of all LSP servers.
|
||||
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)
|
||||
```
|
||||
|
||||
If there are configuration problems preventing from starting an LSP server, the plugin can provide a widget item
|
||||
with an error and give the user a hint how to fix the problem.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user