diff --git a/src/components.json b/src/components.json
index 7dfe6d098d..384c590198 100644
--- a/src/components.json
+++ b/src/components.json
@@ -502,6 +502,10 @@
"title": "GNU Linker Script",
"owner": "RunDevelopment"
},
+ "gleam": {
+ "title": "Gleam",
+ "owner": "nikhilkalburgi45"
+ },
"go": {
"title": "Go",
"owner": "arnehormann"
diff --git a/src/languages/gleam.js b/src/languages/gleam.js
new file mode 100644
index 0000000000..4284573623
--- /dev/null
+++ b/src/languages/gleam.js
@@ -0,0 +1,36 @@
+Prism.languages.gleam = {
+ // doc comments first so /// isn't matched as //
+ 'comment': [
+ /\/\/{3,4}.*/,
+ /\/\/.*/
+ ],
+
+ 'string': {
+ pattern: /"(?:\\.|[^"\\])*"/,
+ greedy: true
+ },
+
+ 'attribute': {
+ pattern: /@\w+/,
+ alias: 'annotation'
+ },
+
+ 'keyword': /\b(?:as|assert|case|const|echo|else|fn|if|import|let|opaque|panic|pub|todo|type|use)\b/,
+
+ 'boolean': /\b(?:True|False)\b/,
+
+ // keep before class-name so builtins are highlighted correctly
+ 'builtin': /\b(?:Int|Float|String|Bool|List|Result|Option|Nil)\b/,
+
+ // heuristic: matches types and constructors (no AST available)
+ 'class-name': /\b[A-Z]\w*\b/,
+
+ 'number': /\b(?:0b[01][01_]*|0o[0-7][0-7_]*|0x[\da-fA-F][\da-fA-F_]*|\d[\d_]*(?:\.[\d_]+)?(?:[eE][+-]?\d[\d_]*)?)\b/,
+
+ // best-effort: identifier followed by (
+ 'function': /\b[a-z_]\w*(?=\s*\()/,
+
+ 'operator': /\|>|<>|->|<-|\.\.|\+\.|-\.|\*\.|\/\.|==|!=|<=|>=|&&|\|\||[+\-*\/%<>=!]/,
+
+ 'punctuation': /[{}[\](),.:;#]/
+};
\ No newline at end of file
diff --git a/tests/languages/gleam/attributes.test b/tests/languages/gleam/attributes.test
new file mode 100644
index 0000000000..dbacc44462
--- /dev/null
+++ b/tests/languages/gleam/attributes.test
@@ -0,0 +1,9 @@
+======
+Attributes
+======
+@external(erlang, "calendar", "local_time")
+pub fn now() { Nil }
+======
+@external(erlang, "calendar", "local_time")
+pub fn now() { Nil }
+======
\ No newline at end of file
diff --git a/tests/languages/gleam/basic.test b/tests/languages/gleam/basic.test
new file mode 100644
index 0000000000..59cdb023be
--- /dev/null
+++ b/tests/languages/gleam/basic.test
@@ -0,0 +1,11 @@
+======
+Basic function
+======
+pub fn main() {
+ echo "hello"
+}
+======
+pub fn main() {
+ echo "hello"
+}
+======
\ No newline at end of file
diff --git a/tests/languages/gleam/numbers.test b/tests/languages/gleam/numbers.test
new file mode 100644
index 0000000000..57c0f1e21f
--- /dev/null
+++ b/tests/languages/gleam/numbers.test
@@ -0,0 +1,11 @@
+======
+Numbers
+======
+let x = 42
+let y = 3.14
+let z = 0xFF
+======
+let x = 42
+let y = 3.14
+let z = 0xFF
+======
\ No newline at end of file
diff --git a/tests/languages/gleam/operators.test b/tests/languages/gleam/operators.test
new file mode 100644
index 0000000000..d23a3b9729
--- /dev/null
+++ b/tests/languages/gleam/operators.test
@@ -0,0 +1,7 @@
+======
+Operators
+======
+[1, 2] |> list.map(fn(x) { x + 1 })
+======
+[1, 2] |> list.map(fn(x) { x + 1 })
+======
\ No newline at end of file
diff --git a/tests/languages/gleam/types.test b/tests/languages/gleam/types.test
new file mode 100644
index 0000000000..ff5a146aad
--- /dev/null
+++ b/tests/languages/gleam/types.test
@@ -0,0 +1,9 @@
+======
+Types and constructors
+======
+type Result(a, b) { Ok(a) Error(b) }
+Ok(42)
+======
+type Result(a, b) { Ok(a) Error(b) }
+Ok(42)
+======
\ No newline at end of file