# Hook Lua on AST nodes?

**URL:** https://community.silverbullet.md/t/hook-lua-on-ast-nodes/3237
**Category:** Ideas
**Created:** [September 19, 2025, 7:05am UTC](https://community.silverbullet.md/t/hook-lua-on-ast-nodes/3237 "2025-09-19T07:05:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mjf](https://community.silverbullet.md/user_avatar/community.silverbullet.md/mjf/32/654_2.png) [@mjf](https://community.silverbullet.md/u/mjf)
#### Post date: [September 19, 2025, 7:05am UTC](https://community.silverbullet.md/t/hook-lua-on-ast-nodes/3237/1 "2025-09-19T07:05:09Z")

</div>

Is this idea doable? How hard would it be to implement? [Reference discussion](https://community.silverbullet.md/t/mathematical-expressions/421/20).

It would be great if we could hook in, say, `[[link]]`s and then write on-hover preview of the linked page in Lua or do other insane things like that. 😃

Sidenote: For me it would be great if I could do what’s mentioned in the referenced discussion: to make hook in `$ ... $`'s AST node to use @MrMugame’s `${latex.inline(...)}` and similarly to hook in `$$ ... $$`'s AST node for the `${latex.block(...)}`.
