mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-09-14 06:15:07 +00:00
use nightly rustfmt and sort imports (#145)
Some checks are pending
lint / pre-commit (push) Waiting to run
release / build (push) Waiting to run
release / test (push) Waiting to run
release / release (push) Blocked by required conditions
test / generate-matrix (push) Waiting to run
test / Python , Django () (push) Blocked by required conditions
test / tests (push) Blocked by required conditions
zizmor 🌈 / zizmor latest via PyPI (push) Waiting to run
Some checks are pending
lint / pre-commit (push) Waiting to run
release / build (push) Waiting to run
release / test (push) Waiting to run
release / release (push) Blocked by required conditions
test / generate-matrix (push) Waiting to run
test / Python , Django () (push) Blocked by required conditions
test / tests (push) Blocked by required conditions
zizmor 🌈 / zizmor latest via PyPI (push) Waiting to run
This commit is contained in:
parent
00140c58ca
commit
e87c917cb6
25 changed files with 143 additions and 60 deletions
|
@ -1,6 +1,8 @@
|
|||
use anyhow::{anyhow, Result};
|
||||
use djls_project::TemplateTags;
|
||||
use std::collections::HashMap;
|
||||
|
||||
use anyhow::anyhow;
|
||||
use anyhow::Result;
|
||||
use djls_project::TemplateTags;
|
||||
use tower_lsp_server::lsp_types::*;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
use anyhow::{anyhow, Result};
|
||||
use std::future::Future;
|
||||
use std::pin::Pin;
|
||||
use std::sync::Arc;
|
||||
use tokio::sync::{mpsc, oneshot};
|
||||
|
||||
use anyhow::anyhow;
|
||||
use anyhow::Result;
|
||||
use tokio::sync::mpsc;
|
||||
use tokio::sync::oneshot;
|
||||
|
||||
/// Type alias for a type-erased, pinned, heap-allocated, Send-able future
|
||||
/// that resolves to `Result<()>`.
|
||||
|
@ -186,12 +189,15 @@ impl Drop for QueueInner {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
use anyhow::anyhow;
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
use std::sync::atomic::AtomicUsize;
|
||||
use std::sync::atomic::Ordering;
|
||||
use std::time::Duration;
|
||||
|
||||
use anyhow::anyhow;
|
||||
use tokio::time::sleep;
|
||||
|
||||
use super::*;
|
||||
|
||||
#[tokio::test]
|
||||
async fn test_submit_and_process() {
|
||||
let queue = Queue::new();
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
use crate::queue::Queue;
|
||||
use crate::session::Session;
|
||||
use std::sync::Arc;
|
||||
|
||||
use tokio::sync::RwLock;
|
||||
use tower_lsp_server::jsonrpc::Result as LspResult;
|
||||
use tower_lsp_server::lsp_types::*;
|
||||
use tower_lsp_server::{Client, LanguageServer};
|
||||
use tower_lsp_server::Client;
|
||||
use tower_lsp_server::LanguageServer;
|
||||
|
||||
use crate::queue::Queue;
|
||||
use crate::session::Session;
|
||||
|
||||
const SERVER_NAME: &str = "Django Language Server";
|
||||
const SERVER_VERSION: &str = "0.1.0";
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
use crate::documents::Store;
|
||||
use djls_conf::Settings;
|
||||
use djls_project::DjangoProject;
|
||||
use tower_lsp_server::lsp_types::ClientCapabilities;
|
||||
|
||||
use crate::documents::Store;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct Session {
|
||||
client_capabilities: Option<ClientCapabilities>,
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
use percent_encoding::percent_decode_str;
|
||||
use std::path::PathBuf;
|
||||
use tower_lsp_server::lsp_types::{InitializeParams, Uri};
|
||||
|
||||
use percent_encoding::percent_decode_str;
|
||||
use tower_lsp_server::lsp_types::InitializeParams;
|
||||
use tower_lsp_server::lsp_types::Uri;
|
||||
|
||||
/// Determines the project root path from initialization parameters.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue