Fork me on GitHub
#calva
<
2023-11-04
>
Jakub Holý (HolyJak)18:11:20

Hello! One of the main reasons I mostly prefer to use IntelliJ is that it has much better navigation. F.ex. when I open my project in Calva and click on this line https://github.com/holyjak/blog.jakubholy.net/blob/master/src/cryogen/compile.clj#L75 then it successfully navigates to the dependency and its compile-assets-timed but when I want to navigate to another fn in another ns of the same navigation, it is not possible - f.ex. when I want to click at cryogen-io/copy-resources https://github.com/cryogen-project/cryogen-core/blob/0.4.0/src/cryogen_core/compiler.clj#L665. Why is that? (FYI I am not running the repl)

pez22:11:51

Hi! I wasn’t aware about this. Guess I always start the repl! 😃 @UKFSJSM38, when I go to definition on line 75 in compile.clj, I see this in the log lsp message log:

[Trace - 11:24:02 PM] Sending request 'textDocument/definition - (35)'.
Params: {
    "textDocument": {
        "uri": "file:///Users/pez/Projects/tests/blog.jakubholy.net/src/cryogen/compile.clj"
    },
    "position": {
        "line": 74,
        "character": 19
    }
}


[Trace - 11:24:02 PM] Received response 'textDocument/definition - (35)' in 2ms.
Result: {
    "uri": "jar:file:///Users/pez/.m2/repository/cryogen-core/cryogen-core/0.4.1/cryogen-core-0.4.1.jar!/cryogen_core/compiler.clj",
    "range": {
        "start": {
            "line": 692,
            "character": 6
        },
        "end": {
            "line": 692,
            "character": 26
        }
    }
}
But when I try to go to definition on line 713 inside cryogen-core/compiler there, to cryogen-io/copy-resources-from-theme I don’t see any log message exchange. Is that the expected behaviour?

ericdallo00:11:38

Most likely that calva is not enabling LSP to the navigate dependency file, this works on emacs but is not that Out of the box integration indeed, I don't know how hard would be to fix on calva but I'd say should not be that hard

👀 1
🙏 1
pez09:11:09

Should be pretty easy to fix. Thanks for reporting @U0522TWDA! And thanks for your wonderful service level, @UKFSJSM38. Amazing.

❤️ 2
🚀 1