Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clicking on the preview jumps to module source code #581

Open
lublak opened this issue Aug 30, 2024 · 1 comment
Open

clicking on the preview jumps to module source code #581

lublak opened this issue Aug 30, 2024 · 1 comment
Labels

Comments

@lublak
Copy link

lublak commented Aug 30, 2024

Motivation

Jump to use of the module and not the module source code.

Description

I don't know whether it's a bug or a feature request. In general, the element is also placed in the module. But I think it would make more sense to jump to where I have placed the module.

Examples/Questions

Example:

#import "@preview/tiaoma:0.2.0"

#tiaoma.c25-inter(
  "123",
  options:(
    height: 15.0,
  )
)

Package/Software version:

VSCode version(Help -> About):

Version: 1.92.2 (system setup)
Commit: fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
Date: 2024-08-14T17:29:30.058Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.19045

tinymist extension version: v0.11.0. Get it by tinymist --version in terminal.

tinymist 
Build Timestamp:     2024-08-26T16:23:08.361428700Z
Build Git Describe:  v0.11.20
Commit SHA:          1f9a42c2e863f6b1fe8624da796e47adf44a9a83
Commit Date:         None
Commit Branch:       None
Cargo Target Triple: x86_64-pc-windows-msvc
Typst Version:       0.11.1
@Myriad-Dreamin
Copy link
Owner

Myriad-Dreamin commented Aug 30, 2024

This is a feature, and I copy the hints for you which will fit in cases of improving experience of jumping from preview panel to source panel:

Note: Jumping to source location of the outline item doesn't work well if its body doesn't have source location, e.g.
```typ
#let my-heading(h) = heading(h) // will jump to here
#my-heading("Title") // will not jump to here
```.
Hence, you may want to use `my-heading[Title]` instead to gain better experience of outline jumping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants