marimo
marimo copied to clipboard
Go to definition should also work for external code
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 - i think this is enabled when you are using pylsp. I would need to double check