mirror of
https://github.com/Myriad-Dreamin/tinymist.git
synced 2025-08-01 00:42:15 +00:00
feat: prepare for parallelizing lsp requests (#342)
* feat: migrate steal_sync to snapshot_sync * feat: correctly make world/analysis snapshot * very rayon * dev: recover async lsp request * gg * dev: pin * fix: make server stable * dev: disable concurrent server by default * dev: very sync
This commit is contained in:
parent
5e4e1e9877
commit
6fcad1c1c7
36 changed files with 1736 additions and 1318 deletions
|
@ -333,6 +333,40 @@ mod polymorphic {
|
|||
DocumentMetrics(Option<DocumentMetricsResponse>),
|
||||
ServerInfo(Option<HashMap<String, ServerInfoResponse>>),
|
||||
}
|
||||
|
||||
impl CompilerQueryResponse {
|
||||
pub fn to_untyped(self) -> serde_json::Result<JsonValue> {
|
||||
match self {
|
||||
Self::OnExport(res) => serde_json::to_value(res),
|
||||
Self::OnSaveExport(res) => serde_json::to_value(res),
|
||||
Self::Hover(res) => serde_json::to_value(res),
|
||||
Self::GotoDefinition(res) => serde_json::to_value(res),
|
||||
Self::GotoDeclaration(res) => serde_json::to_value(res),
|
||||
Self::References(res) => serde_json::to_value(res),
|
||||
Self::InlayHint(res) => serde_json::to_value(res),
|
||||
Self::DocumentColor(res) => serde_json::to_value(res),
|
||||
Self::DocumentHighlight(res) => serde_json::to_value(res),
|
||||
Self::ColorPresentation(res) => serde_json::to_value(res),
|
||||
Self::CodeAction(res) => serde_json::to_value(res),
|
||||
Self::CodeLens(res) => serde_json::to_value(res),
|
||||
Self::Completion(res) => serde_json::to_value(res),
|
||||
Self::SignatureHelp(res) => serde_json::to_value(res),
|
||||
Self::PrepareRename(res) => serde_json::to_value(res),
|
||||
Self::Rename(res) => serde_json::to_value(res),
|
||||
Self::DocumentSymbol(res) => serde_json::to_value(res),
|
||||
Self::Symbol(res) => serde_json::to_value(res),
|
||||
Self::SemanticTokensFull(res) => serde_json::to_value(res),
|
||||
Self::SemanticTokensDelta(res) => serde_json::to_value(res),
|
||||
Self::Formatting(res) => serde_json::to_value(res),
|
||||
Self::FoldingRange(res) => serde_json::to_value(res),
|
||||
Self::SelectionRange(res) => serde_json::to_value(res),
|
||||
Self::InteractCodeContext(res) => serde_json::to_value(res),
|
||||
Self::OnEnter(res) => serde_json::to_value(res),
|
||||
Self::DocumentMetrics(res) => serde_json::to_value(res),
|
||||
Self::ServerInfo(res) => serde_json::to_value(res),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub use polymorphic::*;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue