JUlia Development Extensions
In the future, this may include tools to find usages of a function, limited static type checking, and some refactoring/renaming.
julia should be on your PATH. You can customize the exact path to julia in the Jude package settings.
Autocomplete is triggered by typing. Only names available in the scope (eg try block, for loop, function scope) are shown. To get function signatures, press
ctrl-space after the
...(. You can
tab through the arg list.
Jump to defintion is also triggered by
ctrl-space when the cursor is on any word. You can jump to function definitions, type defintions, or variable declarations for files in your workspace. You can even jump to some function declarations in files not in your workspace, such as in the base library. Your jump history is tracked, and you can go back/forward using
Syntax errors are highlighted as lint warnings. Jude shows these when it cannot parse your code or resolve a name. You can customize the linter to hide the error message panel that pops up at the bottom of the screen by going to the Linter package options and unselecting
Show Error Panel.
Jude reparses some or all of your code as you type. This is done in <50 ms for small to medium sized codebases, especially if it is broken into modules. If you are editing a file that has no "module" declarations (maybe it is just included in another file that does), the reparse can be <5 ms.
Window: Toggle Dev Tools.
For imported modules that are not in the workspace, Jude starts up a short lived child Julia process and queries it for the module contents. It will import type definitions, function signatures, macros, and variables at the module level. During the first run with Jude newly installed, it may take a minute to retrieve the Base library and any modules you have imported into your files. Afterwards, the results are cached. The path to Julia is configurable in the Jude options.
Julia is a very flexible language, but for Jude to provide these capabilities, some restrictions are in place.
include("...")calls where the string is a constant literal.
include("...")can only be present at the module level, not inside a function.
+ = 5
foo = (a, b) -> a + bhas no signature information because foo is treated as a variable.
foo(a,b) = a + bis recognized.
Parsing should be very fast, but if it starts to cause noticable slow down in the GUI, you can reduce the parsing intervals by changing the lint delay in the Linter package (
Lint As You Type Interval, which defaults to 300 ms).
Julia is a dynamic language, so autocomplete currently only works for functions/types/variables, not for fields on types. This is because the type of the object often cannot be determined statically, so the fields are unknown. There is no fuzzy matching currently for fields. In the future, there may be some flow analysis that allows types to be inferred such as from function arg list signatures or type assertions. If Julia eventually allows return type declarations, these can be leveraged too.
:(a + b),
quote ... end
Good catch. Let us know what about this package looks wrong to you, and we'll investigate right away.