@NipunaRanasinghe we have small issue that is see without desgin, now with how annotators work the consumer of the library needs to register the annotator according to his language. Now for example if we have two language servers for same extensions from two seperate plugins, then we have duplicate annotators which do the same thing. Do you follow me ?
But i think if we can change the design so that a annotator will always talks to a simple language server from the sample plugin the annotor is registered from, then we can solve this right ? WDYT ?
Yeah I do get what you said and yes its possible when using annotator.. Anyway dont you think that it should be expected behavior? Lets say we have foo and bar language servers, which both works for java language and we have "fooPlugin" and "barPlugin" plugins installed... But since the diagnostics coming from the foo and bar language servers (lets say for .java extensions) can be different since those can be two different implementations.. So dont you think that the "union of inspections" should be shown?
@NipunaRanasinghe that only happens of the annotators will only take in the diagnostics from the language server they are providing. But the way we have implement the library, a annotator from foo and bar plugins will take diagnostics from a single editor manager for that extension. And that editor manager will get publishDiagnostics messages from both foo and bar language servers. So the way we have implemented the org.wso2.lsp4intellij.editor.EditorEventManager#diagnostics i don't think it will work right isn't it ?
Since this this behavior will aslo depends on our decision on making this a plugin, hopefully I'll be able to update you after testing using two plugins (hopefully in this weekend)
Hi folks, does lsp4intellij support
Yes it does :) invoking
IntelliJLanguageClient.didChangeConfiguration(DidChangeConfigurationParams params, Project project) should do the trick.. We are still working on adding the missing pieces to the documentation I'll add this too
And another question - is it possible yet to listen to custom notifications from the server on the client?
Thanks to @gayanper, we have a initial implementation for listening server responses using
org.wso2.lsp4intellij.client.languageserver.wrapper.MessageHandler. Maybe @gayanper can explain whether it fits for your use case or we need to extend the existing functionalities
didChangeConfiguration, it’s not the same as
wirkspace/configuration. The former is a notification from the client, the latter a request from the server
didChanfeConfigurationon the server, instead of (preferably) being able to request config from the server
textDocument/publishDiagnostics. However, the client doesn’t show any of the reported diagnostics. I added
plugin.xmlaccording to the docs, but that didn’t seem to make a difference. Should I rather report it through a GH issue?
collectInformationphase, before going to the annotation phase.