clj-python / libpython-clj

Python bindings for Clojure
Eclipse Public License 2.0
1.06k stars 69 forks source link

ISSUE-116: Add Python module and line # information to allow for "jump to source" navigation #116

Closed jjtolton closed 4 years ago

jjtolton commented 4 years ago

Editors like CIDER look at the meta information on Clojure symbol to determine "jump to source" navigation.

Some preliminary tests I've run indicate that it would be possible to hack this include arbitrary file/line information to the metadata. During the population of require-python, it would be possible to gather the Python file/line information using the inspect module and transfer it to the metadata. This would allow for "jump to source" navigation for require-python symbols.

Acceptance criteria:

Python file/line information transferred to Clojure form metadata where appropriate in require-python forms.