diff --git a/crates/djls-server/src/documents.rs b/crates/djls-server/src/documents.rs index 8e2a01e..58b7a66 100644 --- a/crates/djls-server/src/documents.rs +++ b/crates/djls-server/src/documents.rs @@ -2,11 +2,12 @@ use anyhow::{anyhow, Result}; use djls_project::TemplateTags; use std::collections::HashMap; use tower_lsp::lsp_types::{ + DidOpenTextDocumentParams, DidChangeTextDocumentParams, DidCloseTextDocumentParams, CompletionItem, CompletionItemKind, CompletionResponse, Documentation, InsertTextFormat, MarkupContent, MarkupKind, Position, Range, Url, }; use tower_lsp::Client; -use super::diagnostics::Diagnostics; +use crate::diagnostics::Diagnostics; #[derive(Debug)] pub struct Store { diff --git a/crates/djls-template-ast/src/lexer.rs b/crates/djls-template-ast/src/lexer.rs index 4833183..a522dad 100644 --- a/crates/djls-template-ast/src/lexer.rs +++ b/crates/djls-template-ast/src/lexer.rs @@ -262,17 +262,8 @@ pub enum LexerError { #[error("source is empty")] EmptySource, - #[error("at beginning of source")] - AtBeginningOfSource, - #[error("at end of source")] AtEndOfSource, - - #[error("invalid character access")] - InvalidCharacterAccess, - - #[error("unexpected token type '{0:?}'")] - UnexpectedTokenType(TokenType), } #[cfg(test)] diff --git a/crates/djls-template-ast/src/tagspecs.rs b/crates/djls-template-ast/src/tagspecs.rs index 9c9d918..e11b710 100644 --- a/crates/djls-template-ast/src/tagspecs.rs +++ b/crates/djls-template-ast/src/tagspecs.rs @@ -152,19 +152,7 @@ pub struct ArgSpec { pub is_kwarg: bool, } -impl ArgSpec { - pub fn is_placeholder(arg: &str) -> bool { - arg.starts_with('{') && arg.ends_with('}') - } - - pub fn get_placeholder_name(arg: &str) -> Option<&str> { - if Self::is_placeholder(arg) { - Some(&arg[1..arg.len() - 1]) - } else { - None - } - } -} +impl ArgSpec {} #[cfg(test)] mod tests {