slint icon indicating copy to clipboard operation
slint copied to clipboard

Standalone Live Preview

Open hunger opened this issue 5 months ago • 0 comments

This is a continuation of work I started last week, cleaning up the live preview and sits on top of my PRs from Friday (which are included here again since that is how github works).

This is just a experiment I did over the WE, it is not polished (or even done:-). What it tries to do is this:

Have the LSP start the live preview by running {argv[0} live-preview --remote-controlled and communicates via stdin/stdout with that. This makes the need for quite a bit of the complexity in native.rs go away.

Next steps are:

  • Remove dead code related to starting up the preview in a thread in parallel to the LSP
  • Check out how to do the WASM side of things. It is two separate binaries anyway, so that should nto be too hard
  • Make the code conenctiong the live preview to the LSP runtime-switchable, so that I can implement a version that does filesystem acces, etc. iteself without a LSP running.
  • Turn preview.rs into a object that I can store in a local variable and get rid of the thread-local.
  • Find all the bugs:-)

After that a logical step would be to allow users to run slint-lsp live-preview {file} and then use a different conenctor to not talk to a LSP and just interact with the fielsystem directly.

hunger avatar May 26 '25 07:05 hunger