Hi, big fan of this project! I'm trying to familiarize myself with what goes into writing an IntelliJ LSP client and have been browsing some of the code. One thing I've noticed is that for hover documentation support, lsp4intellij doesn't use the DocumentationProvider IntelliJ API and instead uses what appears to be a custom UI. Why is that? Is it so that markdown documentation can be supported?
Hi @matthewmichihara, Welcome to the community! :) Forgive me for not being around for sometime since I was busy with some other works.. When I was working on the documentation provider I couldn't find an proper detailed documentation about the DocumentationProvider support for markdown etc. and so I stick with the custom documentation dialog which is inspired by the intellij-lsp plugin. But of course we can give it a try and migrate if it improves the UX.
Makes sense, thanks for the context!
One other thing im trying wrap my head around -- i've been playing around with lsp4j and this example language server: https://github.com/microsoft/vscode-extension-samples/tree/master/lsp-sample. This language server looks at 'txt' files, and returns diagnostics for words that are all uppercase. When I hook this language server up to lsp4intellij, I can see it almost working. The words that should have diagnostics are briefly highlighted, but then quickly unhighlighted for some reason.
There's something wrong with the client it seems :/ Thanks for reporting this! Before going further it would be great if you can specify your OS type, IntelliJ version etc. Shall we create a github issue to track this with the details I've just requested? :) WDYT?
Good idea, issue created here: ballerina-platform/lsp4intellij#96. LMK if I can provide more info here.
hoverProvider: false
to the onInitialize
handler in the LS. was noticing some exceptions in lsp4intellij if I didn't do that
One other thing im trying wrap my head around -- i've been playing around with lsp4j and this example language server: https://github.com/microsoft/vscode-extension-samples/tree/master/lsp-sample. This language server looks at 'txt' files, and returns diagnostics for words that are all uppercase. When I hook this language server up to lsp4intellij, I can see it almost working. The words that should have diagnostics are briefly highlighted, but then quickly unhighlighted for some reason.
There's something wrong with the client it seems :/ Thanks for reporting this! Before going further it would be great if you can specify your OS type, IntelliJ version etc. Shall we create a github issue to track this with the details I've just requested? :) WDYT?
Good idea, issue created here: ballerina-platform/lsp4intellij#96. LMK if I can provide more info here.
Perfect!
@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?