pub mod client;
pub mod manager;
pub mod config;
pub mod types;
pub use client::LspClient;
pub use manager::LspManager;
pub use config::{LspConfig, LspServerConfig};
pub use types::{
LspError, LspDiagnostic, DiagnosticSeverity, Position, Range, Location,
CompletionItem, CompletionItemKind, Hover, CodeAction, SymbolInformation, SymbolKind
};
use std::path::Path;
use async_trait::async_trait;
#[async_trait]
pub trait LspService: Send + Sync {
async fn get_diagnostics(&self, file_path: &Path) -> Result<Vec<LspDiagnostic>, LspError>;
async fn did_change_file(&self, file_path: &Path, content: &str) -> Result<(), LspError>;
async fn did_open_file(&self, file_path: &Path, content: &str) -> Result<(), LspError>;
async fn did_close_file(&self, file_path: &Path) -> Result<(), LspError>;
fn supports_file(&self, file_path: &Path) -> bool;
async fn get_completions(&self, file_path: &Path, position: Position) -> Result<Vec<CompletionItem>, LspError>;
async fn goto_definition(&self, file_path: &Path, position: Position) -> Result<Vec<Location>, LspError>;
async fn get_hover(&self, file_path: &Path, position: Position) -> Result<Option<Hover>, LspError>;
async fn find_references(&self, file_path: &Path, position: Position, include_declaration: bool) -> Result<Vec<Location>, LspError>;
async fn get_code_actions(&self, file_path: &Path, range: Range) -> Result<Vec<CodeAction>, LspError>;
async fn get_document_symbols(&self, file_path: &Path) -> Result<Vec<SymbolInformation>, LspError>;
async fn format_document(&self, file_path: &Path) -> Result<String, LspError>;
async fn format_range(&self, file_path: &Path, range: Range) -> Result<String, LspError>;
}