Announcing JuDE: autocomplete and jump to definition support for Atom

1,096 views
Skip to first unread message

James Dang

unread,
Mar 20, 2016, 2:58:15 PM3/20/16
to julia-users
Hi All, Julia has been great for me, and I wanted to give back a little. LightTable and Atom are great editors, but I was really starting to miss good intellisense-like autocomplete and basic navigation features like jump-to-definition, especially on larger codebases. It's really quite a slog to remember exactly where in which file a function was defined, or what its exact arguments are. And maybe with better tooling, more people will be drawn to the community. So I put a bit of work into a new package for Atom that gives you that!

https://atom.io/packages/jude



This is a bit different from what you get out of julia-client and autocomplete-julia because it does a full syntax parsing and scope resolution of your codebase without executing it in a Julia process. It reparses very quickly on the fly without needing to save. And the matching is precise, not fuzzy, giving you exactly what names are available in the scope you are in currently. It's quite new and unpolished, but please try it out and let me know what you think!

Cheers,
James

feza

unread,
Mar 20, 2016, 3:52:59 PM3/20/16
to julia-users
Nice I will try this! BTW which theme are you using :) 

Kristoffer Carlsson

unread,
Mar 20, 2016, 4:52:54 PM3/20/16
to julia-users
This looks very nice! Might even push me into using Atom ;)

Uwe Fechner

unread,
Mar 20, 2016, 5:04:45 PM3/20/16
to julia-users
Today I thought multiple times: How nice would it be to have a "goto definition" function in Juno/Atom. And now it is already there!
Very nice. :)

Uwe

Eric Forgy

unread,
Mar 20, 2016, 6:03:54 PM3/20/16
to julia-users
*drool*

That looks awesome. Can't wait to try it out. Thanks!

James Dang

unread,
Mar 20, 2016, 11:07:03 PM3/20/16
to julia-users
Thanks! I think it's the default Atom theme heh.

Nitin Arora

unread,
Mar 21, 2016, 2:34:45 AM3/21/16
to julia-users
Awesome :) . I will try this tomm.

Nitin Arora

unread,
Mar 21, 2016, 6:03:54 PM3/21/16
to julia-users
I am getting the following error. Seems like it couldn't find Julia on my OSX machine. I am able to run Julia directly from my terminal so not sure what exactly is the issue:

Dump of the atom error log:


/opt/homebrew-cask/Caskroom/atom/1.4.0/Atom.app/Contents/Resources/app.asar/src/workspace-element.js:26 ::shadow pseudo-element is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.


index
.js:52 Window load time: 1386ms


/opt/homebrew-cask/Caskroom/atom/1.4.0/Atom.app/Contents/Resources/app.asar/src/text-editor-component.js:982 /deep/ combinator is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.


/Users/arora/.atom/packages/Jude/dist/core/Controller.js:145 Reparsing all files.
/Users/arora/.atom/packages/Jude/dist/core/parseWorkspace.js:30 Successfully read project files from disk: 3908 ms
/Users/arora/.atom/packages/Jude/dist/core/parseWorkspace.js:46 Parsed expression trees: 1156 ms
/Users/arora/.atom/packages/Jude/dist/nameResolution/resolveFullWorkspace.js:34 Mapped inclusion trees: 1 ms
/Users/arora/.atom/packages/Jude/dist/nameResolution/resolveFullWorkspace.js:51 First resolve: 9 ms
/Users/arora/.atom/packages/Jude/dist/utils/juliaChildProcess.js:33 Starting julia child process


events
.js:141 Uncaught Error: spawn julia ENOENT

Message has been deleted

Evan Fields

unread,
Mar 21, 2016, 11:45:43 PM3/21/16
to julia-users
Looks great - I'm excited to try this out. Does the autocomplete work in the console as well? I recently tried Atom flavored Juno and was super impressed but found the lack of console completions a major pain point. Will this play nicely with Juno's packages?

James Dang

unread,
Mar 22, 2016, 1:05:46 AM3/22/16
to julia-users
Hi Nitin, yeah I haven't set up a way to configure which Julia binary to run, so it just expects `julia` on your path. That will be fixed up soon. Another user who used homebrew found a workaround: https://github.com/jamesdanged/Jude/issues/1

James Dang

unread,
Mar 22, 2016, 1:17:08 AM3/22/16
to julia-users
Hi Evan, no, the console is controlled by Juno (or "julia-client" in Atom), and Jude can't hook into that. Besides, Jude is complementary and distinct from what Juno provides. Jude does auto-complete within scopes, so you can get autocomplete in the middle of a function body you are editing, which might be nested deep in a module which is imported into your main script. Juno does auto-complete just on your main script, ie at global scope, just like a Julia REPL. It's probably possible for Juno to eventually hook its own auto-completes into the console. It's just not as easy because then it can't use Atom's Autocomplete+ package.

Instead, you could type your code directly into your source file, leveraging Jude's autocomplete there. Then once you're done typing the line, you could type Ctrl-Enter to execute it via Juno. When I use Juno, I rarely have to type directly into the console. I usually just edit a script file and run the lines individually.


Mike Innes

unread,
Mar 22, 2016, 7:00:53 AM3/22/16
to julia-users
This is very cool! RE the path, perhaps it could make sense for Jude to check for the `julia-client.juliaPath` before defaulting to `julia`? I'm also hoping that julia-client can expose some kind of API eventually so that people can build whatever custom interactions they want.

Autocomplete in the console is definitely an issue, but there's actually a set of PRs to Atom and autocomplete-plus that will help us fix this. In future, there's no reason not to expect both julia-client and Jude autocompletions to be available there.

James Dang

unread,
Mar 23, 2016, 7:51:31 AM3/23/16
to julia...@googlegroups.com
I just updated Jude so you can configure your Julia path. Good to know we can eventually get autocomplete in the console for autocomplete+.

David Anthoff

unread,
Mar 24, 2016, 2:09:36 PM3/24/16
to julia...@googlegroups.com

Very nice!

 

Any chance that this could just become part of julia-client at some point?

James Dang

unread,
Mar 27, 2016, 7:56:44 AM3/27/16
to julia-users
Hi David, I think Jude's functionality is pretty orthogonal to julia-client so they function pretty well as distinct, easier to manage packages. julia-client is focused on live code execution and results visualization while Jude is more about getting traditional IDE tools via static syntax analysis. Why do you think they should merge?

David Anthoff

unread,
Mar 28, 2016, 1:27:01 PM3/28/16
to julia...@googlegroups.com

I think the user experience for almost all people would be much easier if they install Atom, then add one package for julia support and everything works. Having multiple Atom packages (julia-language, ink, julia-client, latex-completion and Jude right now) makes things confusing for most people, installation a pain and most people probably won’t even discover all of these packages.

 

Maybe another solution to this would be to eventually have one “juno” package that automatically installs all the individual useful plugins for Atom that make it a good julia IDE. I also don’t think any of this is urgent, right now the whole Atom story is so experimental in any case that most likely only a small number of people is using it in the first place.

 

From: julia...@googlegroups.com [mailto:julia...@googlegroups.com] On Behalf Of James Dang


Sent: Sunday, March 27, 2016 4:57 AM
To: julia-users <julia...@googlegroups.com>

Jonathan Malmaud

unread,
Mar 28, 2016, 4:26:06 PM3/28/16
to julia-users
Mike can step in, but I think it is indeed the plan to have a Julia IDE bundle, causing the exact packages required on the julia and atom side to be invisible implementation details from the user's POV.

Tomas Lycken

unread,
Mar 29, 2016, 5:38:51 PM3/29/16
to julia-users
It would be nice, though, if it were somewhere documented - or even better, a meta-package with dependencies on all the others - to allow turning an already existing Atom installation into a Julia IDE too. I'd be much more interested in improving an editor I'm already using for other thing, than in installing yet another atom-sublime-vscode-like (they all look the same nowadays...) editor just to get the Julia goodness.

This is, of course and as already noted, definitely not urgent, but I think it should be on the road map.

// T

David Anthoff

unread,
Mar 29, 2016, 5:41:26 PM3/29/16
to julia...@googlegroups.com

+1 I’m also much more interested in a simple install story for an existing Atom installation than a standalone juno bundle.

Reply all
Reply to author
Forward
0 new messages