typst-preview
typst-preview copied to clipboard
Option to disable jumping into other files
I'd like an option to disable jumping between files. In my particular case, I have a template which I do not want to modify or care how the internals look like. So when clicking somewhere on my document inside the preview, it should ideally try to jump to the relevant code within my current file, not dive into my template.
It is a good point but that's not how jump-to-code work. Currently we just blindly use the span information carried in the Frame
. (correct me if i'm wrong @Myriad-Dreamin). I agree this can be improved. But I guess this is an open problem at least for now.
@Enter-tainer you are right, it is a known upstream problem. there will be a stack of source location corresponding to you clicking point in document. However typst doesn't select or synthesize an ideal location from stack, which is hard-to-solve.
We could have some simple option, that rejects to jump to non-main file. But there are space for thinking smarter default setting for complex projects that have multiple files containing main content.