switch from runner to ipc and long-running sidecar process (#21)

This commit is contained in:
Josh Thomas 2024-12-11 16:16:40 -06:00 committed by GitHub
parent 4c10afb602
commit 235bb4419d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 556 additions and 281 deletions

View file

@ -7,6 +7,7 @@ use crate::notifier::TowerLspNotifier;
use crate::server::{DjangoLanguageServer, LspNotification, LspRequest};
use anyhow::Result;
use djls_django::DjangoProject;
use djls_ipc::PythonProcess;
use std::sync::Arc;
use tokio::sync::RwLock;
use tower_lsp::jsonrpc::Result as LspResult;
@ -80,8 +81,8 @@ impl LanguageServer for TowerLspBackend {
}
}
pub async fn serve() -> Result<()> {
let django = DjangoProject::setup()?;
pub async fn serve(python: PythonProcess) -> Result<()> {
let django = DjangoProject::setup(python)?;
let stdin = tokio::io::stdin();
let stdout = tokio::io::stdout();