core-typed

Olical 2025-05-27T21:04:53.185859Z

Looking at morphing https://github.com/Olical/background-check into a LSP server, probably renaming it tc-lsp or something like that too. The issue I'm thinking about though is that I think typed.clojure needs to run in the JVM and classpath that your actual code you're checking is using. Is that correct? So basically I can't run a standalone binary containing typed.clojure and statically check the source code, it runs within the JVM itself. So I would need to kind of start a LSP server inside your project with like clojure -M:typed.clojure-lsp then connect your editor to the LSP server through a socket or something. Does that sound about right, @ambrosebs?

Olical 2025-05-28T10:16:49.131479Z

Understood, thanks for confirming! Just wanted to make sure my understanding was right and it's sort of a "runtime" thing where the runtime is my development REPL. I'll build with that in mind so you can launch it from the CLI as a standalone thing or as part of your development REPL I think. Then the LSP configuration in your editor will look for a .typedclojure-lsp-port file or something and connect to that. An interesting thing might fall out of this: LSP as a way to talk to your running REPL instead of nREPL for certain things. And I mean that in a generic sense, typedclojure just happens to be a great first use case. Maybe a more generic fork of this repo can be made some day to implement other features.

2025-05-28T14:31:29.818469Z

I'm curious to see where you end up. My first instinct is to connect to .nrepl-port and call it a day.

2025-05-28T14:32:13.187999Z

I don't know the LSP philosophy.

Olical 2025-05-27T21:31:44.821329Z

I've renamed it https://github.com/Olical/typedclojure-lsp - happy to change the name if you have any reservations. I'm proceeding down the "user runs it in their JVM, clients connect over TCP" path because I think that's the way it has to be.

👍 1
2025-05-28T00:16:53.829319Z

ideally it just shares your project REPL

2025-05-28T00:17:37.357659Z

but if you're not connected to one, yeah you need to boot up a normal repl from your project