mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-09-11 21:06:31 +00:00
switch from runner to ipc and long-running sidecar process (#21)
This commit is contained in:
parent
4c10afb602
commit
235bb4419d
23 changed files with 556 additions and 281 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue