Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    gayanper
    @gayanper
    @matthewmichihara do you have your idea plugin implementation in github so that i can try that with my pr ?
    Matthew Michihara
    @matthewmichihara
    let me push that, one sec
    Matthew Michihara
    @matthewmichihara
    alright, heres the sample idea plugin https://github.com/matthewmichihara/sample-ballerina-plugin, and heres the project i open with it to test the sample language server: https://github.com/matthewmichihara/sample-ballerina-files
    ^ adding to the issue
    gayanper
    @gayanper
    perfect
    gayanper
    @gayanper
    @matthewmichihara is the binary ls is a linux binary or a windows ?
    Matthew Michihara
    @matthewmichihara
    oh sorry its a macos binary
    i can make a linux or windows one though
    any preference?
    gayanper
    @gayanper
    no worries i will try to run the sample ls from the source code
    Matthew Michihara
    @matthewmichihara
    from the lsp-sample source code?
    sounds good. you may need to add hoverProvider: false to the onInitialize handler in the LS. was noticing some exceptions in lsp4intellij if I didn't do that
    gayanper
    @gayanper
    sure
    gayanper
    @gayanper
    @matthewmichihara for me it is working fine
    @matthewmichihara try this branch and see if there is a change https://github.com/gayanper/lsp4intellij/tree/my-work
    Matthew Michihara
    @matthewmichihara
    really? thanks for trying it out
    so in the example project, are diagnostics rending for you on words that are all capitalized?
    Matthew Michihara
    @matthewmichihara
    just tried it out and im not getting any diagnostics. are you running on linux or windows?
    gayanper
    @gayanper
    Im running on linux with intellij 2019
    May be problem is for some reason you don't get a psifile for the text file you are working with. You should get a psi file for language plaintext
    If the psifile is not there the codeanlysis deamon will not restart, therefore the lsp inspection is not executed properly
    I will try to add error handling to the stream as well so that we can see whats happening
    gayanper
    @gayanper
    Sidenote i will switch to project reactor instead of rxjava if the debouncing solution can be optimized for bal ls as well. But lets solve your problem first.
    Nipuna Ransinghe
    @NipunaRanasinghe

    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!

    Nipuna Ransinghe
    @NipunaRanasinghe
    Hi Guys, happy news! We did a new stable release (0.91.0) with a whole lot of improvements and fixes. Sorry for not being able to release an intermediate release recently since we were targeting for the 1.0, but IMO we it would be better to go for 1.0 after deciding the "final shape" of our client (dependency plugin / dependency library jar) and few remaining fixes. So until then, I hope we are all good to use this as our latest stable version :)
    gayanper
    @gayanper
    Awsome
    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 ?