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 1c52eb81d..b27ca022b 100644 --- a/topics/reference_guide/custom_language_support/language_server_protocol.md +++ b/topics/reference_guide/custom_language_support/language_server_protocol.md @@ -119,6 +119,13 @@ private class FooLspServerDescriptor(project: Project) : ProjectWideLspServerDes Since 2024.1, a dedicated Language Services 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.