Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    gayanper
    @gayanper
    Thanks @NipunaRanasinghe
    gayanper
    @gayanper
    @NipunaRanasinghe are you planning on implementing DSP (Debug Server Protocol) client as well ? isn't it going to be needed by the ballerina language support for IDEA ?
    Nipuna Ransinghe
    @NipunaRanasinghe
    @gayanper We don't have any immediate plans on adding DAP support for Lsp4IntelliJ as I'm assigned with few other prioritized works in our ballerina language implementation, but we have already implemented DAP-based debugging support for our ballerina plugin sometimes back.
    If you are planning to work on adding DAP client implementation, you can also refer our current DAP client implementation at https://github.com/ballerina-platform/ballerina-lang/tree/master/tool-plugins/intellij/src/main/java/io/ballerina/plugins/idea/debugger
    gayanper
    @gayanper
    Hi All,
    i need some help, did you found any licensing issue when including libs which are under EPL into a Apache License project ?
    i'm trying to start a spring tools project consuming the spring language server which is EPL, and i thought to have my intellij plugin to be apache since it matches with intellij community licesensing
    Nipuna Ransinghe
    @NipunaRanasinghe
    gayanper
    @gayanper
    @NipunaRanasinghe are still live in this project ? i'm trying to spend time on spawning up Spring Tools for idea using this project. I need to know that you will maintain this project as this is part of ballerina tools as well
    Nipuna Ransinghe
    @NipunaRanasinghe
    @gayanper Yeah absolutely! We'll continue this project as this is a crucial component for our ballerina IDEA plugin. I'm not sure whether I'll be able to work on new features in the coming few weeks (as I've been assigned to few other works), but we'll be maintaining the project with fixes/improvements. So your contributions will be more than welcome, if any.
    gayanper
    @gayanper
    @NipunaRanasinghe we have some compatibility issues with IJ 2020 release train. I reported a issue. I try to provide some PR during this week if you are not planning to take it. WDYT ?
    Andrei Biasprozvanny
    @biaspro
    Hi, I am writing an intelliJ plugin for a custom language (with existing language server written in JS/Node) using this amazing library
    code completion now works, but I'm stuck on go to definition for a few days now, was wondering maybe someone could give me some pointers in how to move on
    basically, when I ctrl - click, it seems to send the right event in Either<List<? extends Location>, List<? extends LocationLink>> definition = request.get(getTimeout(DEFINITION), TimeUnit.MILLISECONDS); but keeps throwing the TimeoutException
    maybe it's possible somehow output the logs somewhere when starting the server? as you can see, I'm quite new to all the IntelliJ plugin development :)
    gayanper
    @gayanper
    Logging depends on your language server. Try to see if can debug the langauge server and see what happens. Also make sure the language server you are using is under which lsp protocol version
    Logging and debugging should be controllable from your lspserver definition
    You should be able to do the same when you build your rawcommand server definition
    Andrei Biasprozvanny
    @biaspro
    @gayanper cool thanks, I'll give it a go
    Cary Robbins
    @carymrobbins
    Heads up, cut an issue for migrating from plugin components - ballerina-platform/lsp4intellij#192
    In my own plugin I'm seeing how well I can just adapt the existing component into an application service, but long term we should migrate the lsp4intellij code to use services instead.
    Cary Robbins
    @carymrobbins
    How does the icon get registered? Does this happen automatically by adding IntelliJLanguageClient in the plugin.xml? Does this work the same for project-level LSP definitions?
    I'm also unsure of how/if lsp4intellij logs output from the connected server
    Cary Robbins
    @carymrobbins
    Ok, I was able to get the icon thing working, seems it does automatically get added by the IntellijLanguageClient application component
    Cary Robbins
    @carymrobbins
    Is there a better way to configure the INIT timeout for an LSP server than doing this?
      override def runActivity(project: Project): Unit = {
        // TODO: Oh man this is bad, but I need to make lsp4intellij wait longer than
        // the default INIT timeout of 10 seconds, so overriding it as 5 minutes.
        Timeout.getTimeouts.put(Timeouts.INIT, 5 * 60 * 1000)
    Cary Robbins
    @carymrobbins
    actually i was able to get around that
    Next: the diagnostics seem out of sync, does this happen to anyone? the diagnostics i am seeing in the source seem to be from a few edits ago
    Cary Robbins
    @carymrobbins
    May be related to this - ballerina-platform/lsp4intellij#193
    Cary Robbins
    @carymrobbins
    I've fixed that locally, but the diagnostic messages still seem to be out of sync
    gayanper
    @gayanper
    Diagnostics run as part of the intellij inspection daemon. I cannot remember the exact name of that daemon. But some times it takes few milis to get the actuall message since when we receive new diag we run the daemon again. So may be the issue is with how we push diags to intellij daemon.
    Cary Robbins
    @carymrobbins
    @gayanper Maybe the LSP server is reading file contents from disk but IntelliJ hasn't yet saved the file?
    Cary Robbins
    @carymrobbins
    @gayanper I think the thing you are talking about is DaemonCodeAnalyzer?
    Cary Robbins
    @carymrobbins
    image.png
    I see this sometimes too, I'm not sure what's going on
    Maybe the LSP server is crashing?
    May 26, 2020 12:51:01 PM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint notify
    WARNING: Failed to send notification message.
    org.eclipse.lsp4j.jsonrpc.JsonRpcException: java.io.IOException: Stream closed
        at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:72)
        at org.wso2.lsp4intellij.client.languageserver.wrapper.MessageHandler.lambda$apply$0(MessageHandler.java:45)
        at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.notify(RemoteEndpoint.java:126)
        at org.eclipse.lsp4j.jsonrpc.services.EndpointProxy.invoke(EndpointProxy.java:88)
        at com.sun.proxy.$Proxy126.didSave(Unknown Source)
        at org.wso2.lsp4intellij.client.languageserver.requestmanager.DefaultRequestManager.didSave(DefaultRequestManager.java:362)
        at org.wso2.lsp4intellij.editor.EditorEventManager.lambda$documentSaved$36(EditorEventManager.java:1285)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)
    Caused by: java.io.IOException: Stream closed
        at java.base/java.lang.ProcessBuilder$NullOutputStream.write(ProcessBuilder.java:442)
        at java.base/java.io.OutputStream.write(OutputStream.java:157)
        at java.base/java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:81)
        at java.base/java.io.BufferedOutputStream.flush(BufferedOutputStream.java:142)
        at org.eclipse.lsp4j.jsonrpc.json.StreamMessageConsumer.consume(StreamMessageConsumer.java:69)
        ... 11 more
    Andrei Biasprozvanny
    @biaspro
    hi guys, maybe you know whether there is a working example of lsp4intellij working with Intellij 2020.1?
    2 replies
    gayanper
    @gayanper
    I have for sts4 tooling
    But it only uses few LSP endpoints
    Like symbols and completions
    Rasika Perera
    @rasika
    gayanper
    @gayanper
    There are two PR can some one review ?
    1 reply
    gayanper
    @gayanper
    Anyone thought about starting DAP client. I might be able to support if there more people interested in it. And the next question is where to build it ? Inside this same repo ?
    Trias
    @Trias
    Hey Guys! wanted to say hi..I am developing an internal plugin for intellij, using your library.
    Trias
    @Trias
    Is there a recommended way to setup the library such that you can debug/edit it as you are using it in a custom plugin? This would help me to identify issues more quickly.
    gayanper
    @gayanper
    You can run your plugin in debug mode and step into this library code to see what happening
    Trias
    @Trias
    thanks! I figured this out, but also wanted to make changes to the library and see how the changes affect my plugin/the ide. I found a way but it is rather "hacky". I'm somewhat new to Java so maybe i don't yet know / follow best practices :)
    2 replies
    Trias
    @Trias
    is it possible to replace org.wso2.lsp4intellij.client.languageserver.requestmanager.DefaultRequestManager with your own implementation, which adds, for example extra methods or additional logging? it appears from the code that this would be possible, maybe by some setting in the plugin.xml?
    gayanper
    @gayanper
    You need to provide your own LSPExtensionManager
    There is a API to register it in the IntellijLanuageClient
    Trias
    @Trias
    thanks that helped me :)