lsp: Send contents to preview for implicitly loaded slint files

This fixes the no preview in slintpad issue when retrieving the contents
of files is slow (e.g. when loaded from the web).

Fixes: #3855
This commit is contained in:
Tobias Hunger 2023-11-08 14:00:33 +01:00 committed by Tobias Hunger
parent aeb512686e
commit 0774d01a59
5 changed files with 73 additions and 59 deletions

View file

@ -123,7 +123,7 @@ pub struct Context {
pub document_cache: RefCell<DocumentCache>,
pub server_notifier: crate::ServerNotifier,
pub init_param: InitializeParams,
pub preview: Box<dyn PreviewApi>,
pub preview: Rc<dyn PreviewApi>,
}
#[derive(Default)]