marimo icon indicating copy to clipboard operation
marimo copied to clipboard

Go to definition should also work for external code

Open yairchu opened this issue 2 months ago • 1 comments

Description

Background:

  • The wonderful cmd+click/F12 shortcut already goes to the definitions of variables defined in Marimo cells
  • Clicking on tracebacks already opens external editors to library code

It would be great if the same shortcut would also go to definitions of functions in external code

Suggested solution

While Python's dynamic nature means there's no clear definition of where a symbol was defined, a simple behavior that will solve most of the cases would be to use the info from inspect. Basically support a subset of what the srcview package does.

Are you willing to submit a PR?

  • [x] Yes

Alternatives

No response

Additional context

No response

yairchu avatar Nov 09 '25 12:11 yairchu

@yairchu - i think this is enabled when you are using pylsp. I would need to double check

mscolnick avatar Nov 13 '25 01:11 mscolnick