Olivier Goffart
18a244bb62
LSP preview: make sure that we always update the preview with the latest state
...
If a preview command is issued while we were compiling, we need to
recompile.
2023-11-08 16:22:56 +01:00
Tobias Hunger
5bf5b7b02d
lsp: Clean up PreviewApi
...
request_state went the wrong way around wrt. communication flow, so
remove and deduplicate it.
2023-11-03 22:14:20 +01:00
Tobias Hunger
b17d566349
lsp: Derive more Debug implementations
2023-11-03 22:14:20 +01:00
Tobias Hunger
d53cebd3e1
lsp: Get signalled by the preview
2023-11-03 22:14:20 +01:00
Tobias Hunger
7d4a73b76c
lsp: Make wasm and native previews work
...
Move code from the native side up into preview.rs as much as possible so
that both previews share as much code as possible.
2023-11-03 22:14:20 +01:00
Tobias Hunger
2aac47b3c6
Change communication of slintpad with Preview
...
... to route it through the LSP, so that we can have a unified approach
to interact with the Preview UI.
2023-11-03 22:14:20 +01:00
Tobias Hunger
55cc1ae31f
lsp: Remove the PostLoadBehavior
...
We always update if we have a UI and we never update if not. So this
flag does not help.
2023-11-03 22:14:20 +01:00
Tobias Hunger
a0cc85bfb4
LSP: Remove design mode custom commands
2023-11-03 22:14:20 +01:00
Tobias Hunger
97f3046dbd
LSP: Simplify the handling of ServerNotifier in the Previewer
...
The Preview delays starting the event loop as much as possible, simply
because our backends may panic/crash when they are not happy with the
UI configuration state they get started in.
So keep this... but use the `sender` in the Cache as an indicator of "we
have a UI". So explicitly set/reset the sender as the UI comes and goes
and do less implicit setup otherwise.
2023-11-03 22:14:20 +01:00
Tobias Hunger
55d0f5d473
lsp: Make native UI work
...
The UI is ugly and does not include the Design Mode button yet, but it
is a bit of progress.
2023-11-03 22:14:20 +01:00
J-P Nurmi
c5248c005e
Allow specifying paths for @library
imports
2023-10-20 16:47:00 +02:00
Tobias Hunger
d5cc147644
lsp: Use one common Error type (where possible)
2023-08-30 10:31:55 +02:00
Tobias Hunger
b35ccfcc77
lsp: Do not pass around a CompilerConfiguration
...
... when we only want the style and include_paths.
2023-08-24 17:14:54 +02:00
Tobias Hunger
3a1e077d18
lsp: Make the LSP part talk to the Preview part via the PreviewApi only
...
This should make it simpler to actually unify the WASM binaries of the
previewer and the LSP in an extra step.
Turn the PreviewApi into a trait object for easier use and
documentation.
2023-08-24 17:14:54 +02:00
Tobias Hunger
89a2e34c9e
lsp: Extract some types out into a new common location
...
These are types I want to use to separate the previewer and the LSP part
more cleanly going forward.
2023-08-24 17:14:54 +02:00