#[derive(Debug, Clone, PartialEq, Default)]
pub struct Span {
pub start: usize,
pub end: usize,
}
#[derive(Debug, Clone, PartialEq)]
pub struct Diagnostic {
pub span: Span,
pub message: String,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum LineEnding {
LF,
CRLF,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum FoldingStyle {
Expanded,
Compact,
}
#[derive(Debug, Clone, Copy, PartialEq)]
pub struct FormatOptions {
pub use_tabs: bool,
pub indent: u8,
pub line_ending: LineEnding,
pub folding_style: FoldingStyle,
pub sort_keys: bool,
pub space_after_colon: bool,
pub space_after_comma: bool,
}
impl Default for FormatOptions {
fn default() -> Self {
Self {
use_tabs: false,
indent: 2,
line_ending: LineEnding::LF,
folding_style: FoldingStyle::Expanded,
sort_keys: false,
space_after_colon: true,
space_after_comma: true,
}
}
}
#[derive(Debug, Clone, PartialEq)]
pub struct CompletionItem {
pub key: String,
pub path: String,
}