Ammonite
Ammonite copied to clipboard
Autocomplete import $ivy requires opening and closing back tick
When using the new auto complete for $ivy imports feature https://github.com/lihaoyi/Ammonite/pull/957. The usability is a bit counter intuitive and not consistent with the other tab completion features. You must add two back ticks for the auto complete to trigger, when clicking tab, or it doesnt do anything. As I have tried to demonstrate in this gif.
PS. Thanks for this awesome feature.
I confirm that the second closing backtick is necessary for now (for the initial code to be more or less correctly parsed, so that we can detect what the code corresponds to when trying to complete things).
I wish we could somehow close any open thing ("
, (
, …) before completing
This is definitely solvable using ScalaParse, the same way we currently do syntax highlighting: use the intercept
parameter to capture parts of the parse tree, and use ~/
cuts in order to make sure we stop at the end of the file when there's an incomplete parse. This allows you to extract pieces of information out of an incomplete/broken parse tree, which should be enough to capture the partial import $ivy
body and use it for autocomplete