Offline, privacy-first grammar checker. Fast, open-source, Rust-powered
fix(#230): remove feature flags
Grant Lemons911bcdb0c728
diff --git a/harper-cli/Cargo.toml b/harper-cli/Cargo.tomlindex 4adb6553d..876c42763 100644--- a/harper-cli/Cargo.toml+++ b/harper-cli/Cargo.toml@@ -12,9 +12,8 @@ ariadne = "0.4.1"clap = { version = "4.5.23", features = ["derive"] }harper-core = { path = "../harper-core", version = "0.15.0" }harper-comments = { path = "../harper-comments", version = "0.15.0" }-harper-typst = { path = "../harper-typst", version = "0.15.0", optional = true }+harper-typst = { path = "../harper-typst", version = "0.15.0" }serde_json = "1.0.133"[features]-default = ["typst"]-typst = ["dep:harper-typst"]+default = []diff --git a/harper-cli/src/main.rs b/harper-cli/src/main.rsindex 91517ecc9..6740158c6 100644--- a/harper-cli/src/main.rs+++ b/harper-cli/src/main.rs@@ -171,7 +171,6 @@ fn load_file(file: &Path) -> anyhow::Result<(Document, String)> {let parser: Box<dyn harper_core::parsers::Parser> =match file.extension().map(|v| v.to_str().unwrap()) {Some("md") => Box::new(Markdown),- #[cfg(feature = "typst")]Some("typ") => Box::new(harper_typst::Typst),_ => Box::new(CommentParser::new_from_filename(file)diff --git a/harper-ls/Cargo.toml b/harper-ls/Cargo.tomlindex b06af9d8d..de1b018cb 100644--- a/harper-ls/Cargo.toml+++ b/harper-ls/Cargo.toml@@ -10,7 +10,7 @@ repository = "https://github.com/automattic/harper"[dependencies]harper-core = { path = "../harper-core", version = "0.15.0", features = ["concurrent"] }harper-comments = { path = "../harper-comments", version = "0.15.0" }-harper-typst = { path = "../harper-typst", version = "0.15.0", optional = true }+harper-typst = { path = "../harper-typst", version = "0.15.0" }harper-html = { path = "../harper-html", version = "0.15.0" }tower-lsp = "0.20.0"tokio = { version = "1.42.0", features = ["fs", "rt", "rt-multi-thread", "macros", "io-std", "io-util", "net"] }@@ -28,5 +28,4 @@ futures = "0.3.31"serde = { version = "1.0.214", features = ["derive"] }[features]-default = ["typst"]-typst = ["dep:harper-typst"]+default = []diff --git a/harper-ls/src/backend.rs b/harper-ls/src/backend.rsindex 1f42de435..02715bf03 100644--- a/harper-ls/src/backend.rs+++ b/harper-ls/src/backend.rs@@ -11,6 +11,7 @@ use harper_core::{WordMetadata,};use harper_html::HtmlParser;+use harper_typst::Typst;use serde_json::Value;use tokio::sync::{Mutex, RwLock};use tower_lsp::jsonrpc::Result;@@ -29,9 +30,6 @@ use tower_lsp::lsp_types::{use tower_lsp::{Client, LanguageServer};use tracing::{error, info, warn};-#[cfg(feature = "typst")]-use harper_typst::Typst;-use crate::config::Config;use crate::diagnostics::{lint_to_code_actions, lints_to_diagnostics};use crate::dictionary_io::{load_dict, save_dict};@@ -216,7 +214,6 @@ impl Backend {"git-commit" | "gitcommit" => Some(Box::new(GitCommitParser)),"html" => Some(Box::new(HtmlParser::default())),"mail" | "plaintext" => Some(Box::new(PlainEnglish)),- #[cfg(feature = "typst")]"typst" => Some(Box::new(Typst)),_ => None,};