diff --git a/CHANGELOG.md b/CHANGELOG.md
index 251e699d36..831e2cac6f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -122,6 +122,7 @@
- Update onig_sys dependency to 69.9.1 to fix a gcc build failure #3400 (@CosmicHorrorDev)
- Add a cargo feature (`vendored-libgit2`) to build with vendored libgit2 version without depending on the system's one #3426 (@0x61nas)
- Update syntect dependency to v5.3.0 to fix a few minor bugs, see #3410 (@keith-hall)
+- Remove dependency on once_cell #3653 (@cyqsimon)
## Syntaxes
diff --git a/Cargo.lock b/Cargo.lock
index 2e777a2e6b..c2568d9278 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -135,7 +135,6 @@ dependencies = [
"minus",
"nix",
"nu-ansi-term",
- "once_cell",
"path_abs",
"plist",
"predicates",
diff --git a/Cargo.toml b/Cargo.toml
index 6c78333655..f908c28303 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -47,7 +47,6 @@ ansi_colours = "^1.2"
bincode = "1.0"
console = "0.16.2"
flate2 = "1.1"
-once_cell = "1.20"
thiserror = "2.0"
wild = { version = "2.2", optional = true }
content_inspector = "0.2.4"
@@ -110,7 +109,6 @@ nix = { version = "0.31", default-features = false, features = ["term"] }
anyhow = "1.0.97"
indexmap = { version = "2.13.0", features = ["serde"] }
itertools = "0.14.0"
-once_cell = "1.20"
prettyplease = "0.2.37"
proc-macro2 = "1.0.106"
quote = "1.0.40"
diff --git a/build/syntax_mapping.rs b/build/syntax_mapping.rs
index b0db01eb80..db795a557f 100644
--- a/build/syntax_mapping.rs
+++ b/build/syntax_mapping.rs
@@ -3,12 +3,12 @@ use std::{
env, fs,
path::{Path, PathBuf},
str::FromStr,
+ sync::LazyLock,
};
use anyhow::{anyhow, bail};
use indexmap::IndexMap;
use itertools::Itertools;
-use once_cell::sync::Lazy;
use proc_macro2::TokenStream;
use quote::{quote, ToTokens, TokenStreamExt};
use regex::Regex;
@@ -79,7 +79,7 @@ impl ToTokens for Case {
/// A single matcher.
///
-/// Codegen converts this into a `Lazy