I provide code completion for Elixir source fragments.
Given a code prefix string (everything from the last separator to
the cursor), I call Code.Fragment.cursor_context/1 to understand
what the user is typing and return matching completions from the
runtime.
Public API
complete/1— complete with no bindingscomplete/2— complete with bindings from an Eval sessioncomplete/3— complete with bindings and full source context
Summary
Functions
I return a list of completion strings for code_prefix,
including variable names from bindings.
Functions
@spec complete(String.t(), Code.binding(), String.t() | nil, Macro.Env.t()) :: [ String.t() ]
I return a list of completion strings for code_prefix,
including variable names from bindings.
The optional third argument source is the full source text up to
the cursor. When provided, it is passed through to sub-completers
that may need surrounding context (e.g. struct field completion).