on master help sign in
lsp: Outdated comment
48fd484Blaž Hrastnik
helix-lsp/src/lib.rs−26
@@ -437,32 +437,6 @@ impl LspProgressMap {
437 }
437 }
438}
438}
439
439
440−// REGISTRY = HashMap<LanguageId, Lazy/OnceCell<Arc<RwLock<Client>>>
441−// spawn one server per language type, need to spawn one per workspace if server doesn't support
442−// workspaces
443−//
444−// could also be a client per root dir
445−//
446−// storing a copy of Option<Arc<RwLock<Client>>> on Document would make the LSP client easily
447−// accessible during edit/save callbacks
448−//
449−// the event loop needs to process all incoming streams, maybe we can just have that be a separate
450−// task that's continually running and store the state on the client, then use read lock to
451−// retrieve data during render
452−// -> PROBLEM: how do you trigger an update on the editor side when data updates?
453−//
454−// -> The data updates should pull all events until we run out so we don't frequently re-render
455−//
456−//
457−// v2:
458−//
459−// there should be a registry of lsp clients, one per language type (or workspace).
460−// the clients should lazy init on first access
461−// the client.initialize() should be called async and we buffer any requests until that completes
462−// there needs to be a way to process incoming lsp messages from all clients.
463−// -> notifications need to be dispatched to wherever
464−// -> requests need to generate a reply and travel back to the same lsp!
465−
466#[cfg(test)]
440#[cfg(test)]
467mod tests {
441mod tests {
468 use super::{lsp, util::*, OffsetEncoding};
442 use super::{lsp, util::*, OffsetEncoding};