Top
Best
New

Posted by jamesbvaughan 7/1/2025

Code-GUI bidirectional editing via LSP(jamesbvaughan.com)
241 points | 68 commentspage 2
legobmw99 7/2/2025|
The idea of a language server also being some other kind of server is almost fiendishly clever to me and I'm shocked I hadn't seen other people play with this before. Definitely can think of applications to game programming -- a sufficiently dedicated engine team could fork their language's LS and allow you to e.g. integrate the map editor's feedback into the source code. I know hot-reloading is considered super valuable in games, but this is almost the dual of that idea. So clever!
harrylepotter 7/2/2025||
We do quite a lot of this using webviews in vscode over at Darwinium. Similar process that involves postMessages between the UI container and the host containing the LSP. Biggest challenge I had with this was figuring out how to map a diagnostic from the language server (which is inherently range-based) to a UI component that would display it - it involves a fairly intricate pubsub system and mapping UI components explicitly to parts of a tree. Would love to share it eventually.
taeric 7/1/2025||
Reminds me of the excitement I got on seeing https://www.youtube.com/watch?v=4tyTgyzUJqM. I still get excited about trying something like this again pretty much every time I see it. Have yet to really get any traction on anything. :(

A lot of folks had fun watching Minecraft built using a live code session, if I recall.

legobmw99 7/2/2025|
Hot reload in Java is still a crucial part of my workflow for modding Minecraft, but it doesn't have the other direction where an action in the game could alter the code
taeric 7/2/2025||
Ah, fair. Seems that is probably more applicable to image based development than it is typical batch processed source files? Doesn't seem too strange to have your code editing a data file, for example. No reason you couldn't treat your source as a data object, in some sense. Though, I'll note Common Lisp explicitly warns against editing literal objects. Such that I'm assuming this was considered and largely agreed to be a bad idea. :D
WillAdams 7/1/2025||
I've suggested this sort of interactivity for (Open)PythonSCAD:

https://lists.openscad.org/empathy/thread/GAX4QYYRUC3CEH572I...

The devil is in the details though, and I worry about the UI becoming cluttered and unmanageable.

Bjartr 7/2/2025||
I know it's not quite the same, and maybe it's just the demo video doing it, but this reminds me of the Light Table IDE http://lighttable.com/
disconcision 7/2/2025||
Here's a similar example using lean widgets (in the live programming part of the talk): https://www.youtube.com/watch?v=c5LOYzZx-0c
kennykartman 7/1/2025||
I know basically nothing about CAD, but I know thet fornjot exists and wondered if it might be useful to your purposes, in case you don't know about that.

But well, the project is very cool and I love the idea of using LSP for something more!

love2read 7/1/2025||
Related: https://chromewebstore.google.com/detail/ghosttext/godiecgff...

> Write in the browser with your text editor.

FloatArtifact 7/2/2025||
This is really interesting being able to do bi-directional editing. This is desperately needed for accessibility software to get at underlying text. I would use it for semantic editing of code by voice. However, getting at GUI elements would be amazing.
SwiftyBug 7/1/2025|
This is awesome! If someone created a Interface Builder on top of that, I feel like I might even go back to making iOS apps. Xcode makes the whole experience so terrible that it sucks the joy out of it.
More comments...