Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Nipuna Ransinghe
    @NipunaRanasinghe
    @gayanper I must really give you credits for being such a valuable contributor of this project and your astounding work towards adding workspace symbols support, improving the plugin stability, and much more! :)
    gayanper
    @gayanper
    @NipunaRanasinghe your most welcome. I would love to contribute more if we can keep working on this more actively 😉
    I even started a ls plugin thinking that this will be abandoned as a kotlin plugin
    Nipuna Ransinghe
    @NipunaRanasinghe
    @gayanper Why not! :wink: Anyway I'm planning to start working on the DAP client. WDYT?
    gayanper
    @gayanper
    @NipunaRanasinghe Thats good news, but shall we first come to conclusion about making this a plugin ?
    @matthewmichihara Did you checked more on whats happening in your plugin implementation ?
    Matthew Michihara
    @matthewmichihara
    hmm i dont seem to be getting a psi file for plaintext files
    i have the psi viewer plugin installed and it doesnt display anything for a sample foo.txt file so perhaps this is the issue?
    in your testing, were things working with plaintext files @gayanper ?
    gayanper
    @gayanper
    yes i used a .txt file
    gayanper
    @gayanper
    @NipunaRanasinghe @matthewmichihara check the new changes in ballerina-platform/lsp4intellij#86 with Annotator support. @matthewmichihara when you register the LSPAnnotator use "TEXT" as the language
    Matthew Michihara
    @matthewmichihara
    oh nice! trying it out now
    Matthew Michihara
    @matthewmichihara
    this works great @gayanper
    i'm now seeing the expected diagnostics
    gayanper
    @gayanper
    @matthewmichihara 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 ?
    gayanper
    @gayanper
    @matthewmichihara Fixed compilation issue at isExtensionSupported, now every thing should be working
    Nipuna Ransinghe
    @NipunaRanasinghe

    @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?

    gayanper
    @gayanper
    @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 ?
    Nipuna Ransinghe
    @NipunaRanasinghe

    @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)

    gayanper
    @gayanper
    @NipunaRanasinghe make sure you have two language servers for the same lang from those two plugins :)
    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