Skip to content

Commit

Permalink
fix(Automattic#230): remove feature flags
Browse files Browse the repository at this point in the history
  • Loading branch information
grantlemons committed Jan 10, 2025
1 parent fcd965b commit 911bcdb
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
5 changes: 2 additions & 3 deletions harper-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
1 change: 0 additions & 1 deletion harper-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 2 additions & 3 deletions harper-ls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand All @@ -28,5 +28,4 @@ futures = "0.3.31"
serde = { version = "1.0.214", features = ["derive"] }

[features]
default = ["typst"]
typst = ["dep:harper-typst"]
default = []
5 changes: 1 addition & 4 deletions harper-ls/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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};
Expand Down Expand Up @@ -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,
};
Expand Down

0 comments on commit 911bcdb

Please sign in to comment.