I actually found a way on accident
You can add the outset property to the box (not inset) like this:
#import "@preview/codly:1.0.0": *
#show: codly-init.with()
#codly(zebra-fill: none)
#codly(number-format: (n) => box(fill: luma(240), height: 1.5em, outset: 0.5em)[#text(luma(100), size: 1.5em)[#str(n)]])
```rust
pub fn main() {
println!("Hello, world!");
}
``` // you know the drill ;)
The result:
The outset does not effect the layout (so the surrounding styling) which makes it perfect for you usecase. It actually adds outset in the x and the y direction, so you might want to do something like outset: (x: 0.5em, y: 1em)
depending on the size you want your numbering to be.
Iām still kind of a nooby as well, but now I got it :)