aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock12
-rw-r--r--Cargo.toml3
-rw-r--r--src/lib.rs2
3 files changed, 15 insertions, 2 deletions
diff --git a/Cargo.lock b/Cargo.lock
index a5e3162..3147795 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -138,6 +138,7 @@ version = "0.1.0"
dependencies = [
"iced_core",
"syntect",
+ "two-face",
]
[[package]]
@@ -466,6 +467,17 @@ dependencies = [
]
[[package]]
+name = "two-face"
+version = "0.4.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "384eda438ddf62e2c6f39a174452d952d9d9df5a8ad5ade22198609f8dcaf852"
+dependencies = [
+ "once_cell",
+ "serde",
+ "syntect",
+]
+
+[[package]]
name = "unicode-ident"
version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
diff --git a/Cargo.toml b/Cargo.toml
index 5524086..eb7f89f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,7 +11,8 @@ keywords = ["gui", "ui", "graphics", "interface", "widgets"]
rust-version = "1.80"
[dependencies]
-syntect = { version = "5.2", default-features = false, features = ["default-syntaxes", "regex-onig"] }
+syntect = { version = "5.2", default-features = false, features = ["regex-onig"] }
+two-face = "0.4.3"
[dependencies.iced_core]
git = "https://github.com/pml68/iced"
diff --git a/src/lib.rs b/src/lib.rs
index 69cea60..5506d0e 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -65,7 +65,7 @@ use syntect::highlighting;
use syntect::parsing;
static SYNTAXES: LazyLock<parsing::SyntaxSet> =
- LazyLock::new(parsing::SyntaxSet::load_defaults_nonewlines);
+ LazyLock::new(two_face::syntax::extra_no_newlines);
const LINES_PER_SNAPSHOT: usize = 50;