How does the plugin handle RPC requests for 'workspace/configuration' from Language Server Protocol (LSP)?


I have developed an LSP (Language Server Protocol) for a new language, and it runs well on VSCode. Now, I want to add support for this language in IntelliJ IDEA.

The language server sends 'workspace/configuration' requests to fetch user-specific settings. To support this request, I have added a SettingsComponent, SettingsState, and SettingsConfigurable to the plugin. The implementation is as follows

I would like the 'workspace/configuration' request to retrieve the content pointed to by the red arrow. How can I achieve this?


I tried to override the 'configuration' function in the Lsp4jClient, but it is marked as final, and I cannot override it. I also attempted to add multiple functions to handle the same request, but it still resulted in an error.




First of all, make sure you have the LSP API source code available in your IntelliJ Plugin project. See the red banner here for help:

Once you have the LSP API source code configured, you'll find the answer in the documentation for the LspServerDescriptor.getWorkspaceConfiguration() function.