Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.

Option to disable jumping into other files #149

Open
miliog opened this issue Oct 20, 2023 · 3 comments
Open

Option to disable jumping into other files #149

miliog opened this issue Oct 20, 2023 · 3 comments

Comments

@miliog
Copy link

miliog commented Oct 20, 2023

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.

@Enter-tainer
Copy link
Owner

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.

@Myriad-Dreamin
Copy link
Collaborator

@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.

@Myriad-Dreamin
Copy link
Collaborator

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

3 participants