Skip to content
Navigate to variable's definition with a click in JupyterLab (or with a few key strokes)
Branch: master
Clone or download
krassowski Merge branch 'jupyterlab-v0.35' into master:
master will become the default after JupyterLab 1.0 release (pending, currently in alpha)
Latest commit 569524c Apr 7, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Add demo gif Jan 3, 2019
src Merge branch 'jupyterlab-v0.35' into master: Apr 6, 2019
style Seed go-to-definition project from cookiecutter Nov 4, 2018
typings/codemirror Initial commit Dec 22, 2018
.gitignore Seed go-to-definition project from cookiecutter Nov 4, 2018
LICENSE Initial commit Dec 22, 2018 Implement modifier key polyfill for Safari #3 Mar 16, 2019
jest.config.js Add basic unit tests, split up longer functions Jan 1, 2019
package.json Merge branch 'jupyterlab-v0.35' into master: Apr 6, 2019
requirements.txt Add binder Dec 24, 2018
tsconfig.json Add basic unit tests, split up longer functions Jan 1, 2019
yarn.lock Upgrade to jupyterlab 1.0.0-alpha.3 Feb 22, 2019

Go to definition extension for JupyterLab

Build Status codebeat badge Binder

Jump to definition of a variable or function in JupyterLab notebook and file editor.

Use Alt + click to jump to a definition using your mouse, or Ctrl + Alt + B keyboard-only alternative.

Go to definition

You can replace the key modifier for mouse click from Alt to Control, Shift, Meta or AltGraph in the settings*.

To jump back to the variable/function usage, use Alt + o.

The plugin is language-agnostic, though optimized for Python. Initial support for R was recently implemented. Support for other languages is possible (PRs welcome).

*) For full list of physical keys mapped to the modifiers (which depend on your Operating System), please see the MDN documentation.

Safari users: Safari does not implement MouseEvent.getModifierState (see #3), thus only Alt, Control, Shift and Meta are supported.


  • JupyterLab


jupyter labextension install @krassowski/jupyterlab_go_to_definition


For a development install (requires npm version 4 or later), do the following in the repository directory:

npm install
npm run build
jupyter labextension link .

To rebuild the package and the JupyterLab app:

npm run build
jupyter lab build

To run tests suite:

npm test

Adding support for additional languages

Support for new languages should be provided by implementation of abstract LanguageAnalyzer class (in case of languages which support use of semicolons to terminate statements LanguageWithOptionalSemicolons helper class can be utilized).

Each new language class needs to be included in chooseLanguageAnalyzer function and the developer needs to verify if setLanguageFromMime in fileeditor.ts will be able to recognize the language properly.

You can’t perform that action at this time.