mirror of
https://github.com/joshuadavidthomas/django-language-server.git
synced 2025-09-11 21:06:31 +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,9 +1,11 @@
|
|||
use crate::args::Args;
|
||||
use crate::commands::{Command, DjlsCommand};
|
||||
use crate::exit::Exit;
|
||||
use anyhow::Result;
|
||||
use clap::Parser;
|
||||
|
||||
use crate::args::Args;
|
||||
use crate::commands::Command;
|
||||
use crate::commands::DjlsCommand;
|
||||
use crate::exit::Exit;
|
||||
|
||||
/// Main CLI structure that defines the command-line interface
|
||||
#[derive(Parser)]
|
||||
#[command(name = "djls")]
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
mod serve;
|
||||
|
||||
use anyhow::Result;
|
||||
use clap::Subcommand;
|
||||
|
||||
use crate::args::Args;
|
||||
use crate::exit::Exit;
|
||||
use anyhow::Result;
|
||||
use clap::Subcommand;
|
||||
|
||||
pub trait Command {
|
||||
fn execute(&self, args: &Args) -> Result<Exit>;
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
use anyhow::Result;
|
||||
use clap::Parser;
|
||||
use clap::ValueEnum;
|
||||
use djls_server::DjangoLanguageServer;
|
||||
use tower_lsp_server::LspService;
|
||||
use tower_lsp_server::Server;
|
||||
|
||||
use crate::args::Args;
|
||||
use crate::commands::Command;
|
||||
use crate::exit::Exit;
|
||||
use anyhow::Result;
|
||||
use clap::{Parser, ValueEnum};
|
||||
use djls_server::DjangoLanguageServer;
|
||||
use tower_lsp_server::{LspService, Server};
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
pub struct Serve {
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
use anyhow::Result;
|
||||
use std::error::Error;
|
||||
use std::fmt;
|
||||
|
||||
use anyhow::Result;
|
||||
|
||||
type ExitMessage = Option<String>;
|
||||
|
||||
#[derive(Debug)]
|
||||
|
|
|
@ -8,9 +8,10 @@ mod cli;
|
|||
mod commands;
|
||||
mod exit;
|
||||
|
||||
use pyo3::prelude::*;
|
||||
use std::env;
|
||||
|
||||
use pyo3::prelude::*;
|
||||
|
||||
#[pyfunction]
|
||||
/// Entry point called by Python when the CLI is invoked.
|
||||
/// This function handles argument parsing from Python and routes to the Rust CLI logic.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue