Load proc-macros asynchronously

This commit is contained in:
Lukas Wirth 2023-03-25 18:06:06 +01:00
parent e9fb2ffe45
commit 607375dc20
10 changed files with 154 additions and 88 deletions

View file

@ -59,10 +59,11 @@ pub(crate) struct GlobalState {
pub(crate) mem_docs: MemDocs,
pub(crate) semantic_tokens_cache: Arc<Mutex<FxHashMap<Url, SemanticTokens>>>,
pub(crate) shutdown_requested: bool,
pub(crate) proc_macro_changed: bool,
pub(crate) last_reported_status: Option<lsp_ext::ServerStatusParams>,
pub(crate) source_root_config: SourceRootConfig,
pub(crate) proc_macro_clients: Vec<Result<ProcMacroServer, String>>,
pub(crate) proc_macro_changed: bool,
pub(crate) proc_macro_clients: Arc<[Result<ProcMacroServer, String>]>,
pub(crate) flycheck: Arc<[FlycheckHandle]>,
pub(crate) flycheck_sender: Sender<flycheck::Message>,
@ -151,10 +152,11 @@ impl GlobalState {
mem_docs: MemDocs::default(),
semantic_tokens_cache: Arc::new(Default::default()),
shutdown_requested: false,
proc_macro_changed: false,
last_reported_status: None,
source_root_config: SourceRootConfig::default(),
proc_macro_clients: vec![],
proc_macro_changed: false,
proc_macro_clients: Arc::new([]),
flycheck: Arc::new([]),
flycheck_sender,