mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-09-14 06:15:07 +00:00
rename field
This commit is contained in:
parent
dff986b91b
commit
60609c34bd
1 changed files with 4 additions and 4 deletions
|
@ -8,7 +8,7 @@ use djls_pyenv::PythonEnvironment;
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
struct Backend {
|
struct Backend {
|
||||||
client: Client,
|
client: Client,
|
||||||
python_env: PythonEnvironment,
|
python: PythonEnvironment,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tower_lsp::async_trait]
|
#[tower_lsp::async_trait]
|
||||||
|
@ -35,7 +35,7 @@ impl LanguageServer for Backend {
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
self.client
|
self.client
|
||||||
.log_message(MessageType::INFO, format!("\n{}", self.python_env))
|
.log_message(MessageType::INFO, format!("\n{}", self.python))
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,12 +46,12 @@ impl LanguageServer for Backend {
|
||||||
|
|
||||||
#[tokio::main]
|
#[tokio::main]
|
||||||
async fn main() -> Result<()> {
|
async fn main() -> Result<()> {
|
||||||
let python_env = PythonEnvironment::initialize()?;
|
let python = PythonEnvironment::initialize()?;
|
||||||
|
|
||||||
let stdin = tokio::io::stdin();
|
let stdin = tokio::io::stdin();
|
||||||
let stdout = tokio::io::stdout();
|
let stdout = tokio::io::stdout();
|
||||||
|
|
||||||
let (service, socket) = LspService::build(|client| Backend { client, python_env }).finish();
|
let (service, socket) = LspService::build(|client| Backend { client, python }).finish();
|
||||||
|
|
||||||
Server::new(stdin, stdout, socket).serve(service).await;
|
Server::new(stdin, stdout, socket).serve(service).await;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue