Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Rasika Perera
    @rasika
    @gayanper Is it a valid use case? language server is unique for a language. why we want two language servers for the same lang from the same library?
    gayanper
    @gayanper
    @rasika i mean from two plugins/libs provide lang server support for same lang. What if have a langserver for spring configs and another langserver for ejb configs which both targets java files for config support ?
    gayanper
    @gayanper
    @NipunaRanasinghe are you guys still busy with bal release ?
    Denis Loginov
    @dinvlad
    Hi folks, does lsp4intellij support workspace/configuration request?
    And another question - is it possible yet to listen to custom notifications from the server on the client?
    Denis Loginov
    @dinvlad
    (I’d like to implement proposed window/progress extension, either in my own client or in lsp4intellij if you think that’s appropriate; it requires reacting to notifications on the client, as well as sending a notification to the server)
    Nipuna Ransinghe
    @NipunaRanasinghe

    @NipunaRanasinghe are you guys still busy with bal release ?

    @gayanper Unfortunately Yes :/ It is due to the end of july and hopefully we can work on blocker issues until that

    @dinvlad

    Hi folks, does lsp4intellij support workspace/configuration request?

    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

    Nipuna Ransinghe
    @NipunaRanasinghe

    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

    Denis Loginov
    @dinvlad
    @NipunaRanasinghe thanks - I looked at MessageHandler a little bit, but couldn’t figure out how to use it
    Re didChangeConfiguration, it’s not the same as wirkspace/configuration. The former is a notification from the client, the latter a request from the server
    So I wonder if atm we have to listen to didChanfeConfiguration on the server, instead of (preferably) being able to request config from the server
    gayanper
    @gayanper
    @dinvlad the current server listening support is only for ResponseMessage#getResult where the result is InitializeResult
    @dinvlad you should try to provide your own client implementation by overriding this method org.eclipse.lsp4j.services.LanguageClient#configuration in org.wso2.lsp4intellij.client.DefaultLanguageClient
    That should solve your issue if i understood your problem correct :)
    Denis Loginov
    @dinvlad
    @gayanper that makes sense, thanks!
    Re listener support, are you working to expose additional methods to allow extensions, or should we also try to override something?
    gayanper
    @gayanper
    @dinvlad well additional client method, if thats what you are after, you can define it in your own LanguageClient you are providing.
    Denis Loginov
    @dinvlad
    @gayanper could you elaborate please? which method/class could I extend to listen to a custom notification from the server?
    gayanper
    @gayanper
    @dinvlad you need to extend the DefaultLanguageClient and add these methods with the json annotation like its done in LanguageClient interface. The extended client class must be exposed to lsp4intellij through the extension support
    Denis Loginov
    @dinvlad
    @gayanper thanks - which methods in particular should I extend?
    gayanper
    @gayanper
    @dinvlad to which class methods are referring too ?
    Denis Loginov
    @dinvlad
    @gayanper I guess I just wanted to understand where to start when implementing a listener..
    gayanper
    @gayanper
    @dinvlad you will need a CustomeClient implementation. check this fork of mine, you will find all the details you need like the client implementation to start with at https://github.com/gayanper/sts4/blob/lsp4intellij/idea-extensions/idea-boot-java/src/org/spring/tools/boot/java/ls/StsLanuageClient.java
    Denis Loginov
    @dinvlad
    Perfect, thanks @gayanper !
    gayanper
    @gayanper
    @rasika have you given any thoughts on making this a plugin ?
    At the same time i'm also thinking make the definition to be connected files via Language than the extension
    List of Language will enable to reuse LS which supports multiple languages
    Denis Loginov
    @dinvlad
    Hi folks, I’ve configured LSP and can see messages being exchanged via server logs. The server sends textDocument/publishDiagnostics. However, the client doesn’t show any of the reported diagnostics. I added localInspection in plugin.xml according to the docs, but that didn’t seem to make a difference. Should I rather report it through a GH issue?
    gayanper
    @gayanper
    @dinvlad try the latest changes from ballerina-platform/lsp4intellij#86 (gayanper:pr/enhance-inspections ) PR branch and see if diagnostics are fixed
    gayanper
    @gayanper
    Are we dead in this group ? 🙄
    Rasika Perera
    @rasika
    Not yet 😂
    gayanper
    @gayanper
    @rasika shall we try to my latest changes in the inspection PR. I think now it should solve the delaying issue
    Nipuna Ransinghe
    @NipunaRanasinghe
    @gayanper Sorry for being dead for a while 😂 It's been a hell of a month with our language 1.0 release... I tried your latest changes and it works perfectly except now the annotator is triggered twice in each document change event. So it would be better if we can trigger the external annotator only when a diagnostics message is received. So I'll try to improve and after that, we are all good to merge I guess.
    @dinvlad Did you try with the @gayanper's latest changes? How was your experience? :)
    gayanper
    @gayanper
    @NipunaRanasinghe are you sure that there are no two diagnostic messages coming in ?
    gayanper
    @gayanper
    @NipunaRanasinghe also make sure you don't have any other annotators running as well, cause for example the SonarLint plugin does the same things like this library to re-invoke the annotators, that it restart the deamon for that file.
    Nipuna Ransinghe
    @NipunaRanasinghe
    @gayanper There's only one message is coming from our language server but the annotator is running twice for each document change event. I've added few changes to your PR with minor improvements.. Shall I push my changes to your branch if that's fine with you? Then you can verify my changes and hopefully, we can merge after that :)
    gayanper
    @gayanper
    @NipunaRanasinghe sure please do i will give you permission if its not already provided
    Nipuna Ransinghe
    @NipunaRanasinghe
    @gayanper Sure thanks!
    I just pushed my changes to your branch. Please verify it and collaborate if you see any points where we can further improve :)
    gayanper
    @gayanper
    @NipunaRanasinghe did check which caused the additional annotator invocation ?
    Nipuna Ransinghe
    @NipunaRanasinghe
    @gayanper I think we cannot avoid it since the annotators are supposed to be triggered when the file content is changed. That's why I've added a diagnostics lock mechanism to terminate the annotator in the collectInformation phase, before going to the annotation phase.
    gayanper
    @gayanper
    Hmmmm i see. So your plan is to just let the first execution which has diagnostics to handle it and let the next one exit early right ?
    gayanper
    @gayanper
    @NipunaRanasinghe What if we just drain the diagnostic list and get rid of the lock variable and do a empty check internally with a methos hasDiagnostics ?
    And how is your license permission to fork and do some major changes, like making a plugin and make it based on intellij languages
    Because i still see some problems if ppl smart to make mocktails out of this lib with different versions of thr lib in same installation with different consumer plugins.
    Nipuna Ransinghe
    @NipunaRanasinghe
    @gayanper I've already tried it earlier but it failed to update diagnostics intermittently which I couldn't dig in further. If you don't see any blockers maybe we can continue merging and do the fine tunings after that.

    And how is your license permission to fork and do some major changes, like making a plugin and make it based on intellij languages.

    I'll check with my team and get back to you :) Meanwhile, do you see any advantages of making this coupled with the language implementations instead of using the extensions?