diff --git a/.changeset/wild-sloths-drop.md b/.changeset/wild-sloths-drop.md
new file mode 100644
index 00000000..4d36b048
--- /dev/null
+++ b/.changeset/wild-sloths-drop.md
@@ -0,0 +1,5 @@
+---
+'mdsvex': minor
+---
+
+Pass filename to highligher
diff --git a/packages/mdsvex/src/transformers/index.ts b/packages/mdsvex/src/transformers/index.ts
index a992fcca..417df56d 100644
--- a/packages/mdsvex/src/transformers/index.ts
+++ b/packages/mdsvex/src/transformers/index.ts
@@ -547,7 +547,7 @@ export function highlight_blocks({
 		}
 	}
 
-	return async function (tree) {
+	return async function (tree, vFile) {
 		if (highlight_fn) {
 			const nodes: (Code | HTML)[] = [];
 			visit<Code>(tree, 'code', (node) => {
@@ -560,7 +560,9 @@ export function highlight_blocks({
 					node.value = await highlight_fn(
 						node.value,
 						(node as Code).lang,
-						(node as Code).meta
+						(node as Code).meta,
+						//@ts-ignore
+						vFile.filename,
 					);
 				})
 			);
diff --git a/packages/mdsvex/src/types.ts b/packages/mdsvex/src/types.ts
index 3d5a25c8..51b98da0 100644
--- a/packages/mdsvex/src/types.ts
+++ b/packages/mdsvex/src/types.ts
@@ -153,7 +153,8 @@ export type Layout = Record<string, LayoutMeta>;
 export type Highlighter = (
 	code: string,
 	lang: string | null | undefined,
-	metastring: string | null | undefined
+	metastring: string | null | undefined,
+	filename?: string,
 ) => string | Promise<string>;
 interface HighlightOptions {
 	/**