miniblog.

← Back to all posts
45
@PaniczGodek @aartaka @jack I am working in a toy PL (Garden) in this space, but details like go-to-def logic become more complicated when you allow redefinition.

5 Comments

@wilfredh @PaniczGodek @aartaka Are you assuming that the editor will be connected to a live system that can show you the source code of a given function when it was last compiled? In that scenario, the only tricky bit is the UX to show the difference between what’s in the file/on-disk and what has been compiled in the running image…
@jack @PaniczGodek @aartaka Yeah, exactly. The devil's in the details though. If the loaded function was on line 20, do you try to find the current version on line 25, or just pop up a buffer of the loaded version? Where does the user then edit? One idea I've been thinking about is making the interpreter session speak LSP. That way you'd have go-to-def and completion based on loaded definitions, but it's unconventional.
@wilfredh but wait, isn’t LSP file-oriented? Clojure one is, and it sucks. @jack @PaniczGodek
@aartaka @jack @PaniczGodek Well, LSP reflects the state of the editor: the editor sends didOpen at the start, then didChange on every edit. So the server knows the editor state even without saving. Sounds like you have a different model in mind though?
@wilfredh no, I simply didn’t know about it! Thanks for the details! @jack @PaniczGodek