use crate::config::Settings;
use crate::infrastructure::di::ServiceContainer;
use crate::lsp::services::{CommandService, CompletionService, DocumentService, LspSnippetService};
use std::sync::Arc;
pub struct LspServiceContainer {
pub completion_service: CompletionService,
pub command_service: CommandService,
pub document_service: DocumentService,
}
impl LspServiceContainer {
pub fn new(service_container: &ServiceContainer, _config: &Settings) -> Self {
let snippet_service = Arc::new(LspSnippetService::with_services(
service_container.bookmark_service.clone(),
service_container.interpolation_service.clone(),
));
Self {
completion_service: CompletionService::new(snippet_service.clone()),
command_service: CommandService::with_service(
service_container.bookmark_service.clone(),
),
document_service: DocumentService::new(),
}
}
}