One of the spark types we have is {:spark_function_behaviour, ... that allows specifying a "builtins module" which is a module from which to show autocompletions automatically. What we should do is allow other modules to add to that list by putting doing the following:
defmodule Foo do
use Spark.Builtins, for: Ash.Resource.Changes.Builtins, extension: ExtensionName
end
for example.
The spark autocomplete extension would then look for any module doing that and add its functions into the mix, as long as the resource is using the provided extension. (since the extension would do the importing). Then users would get nice autocomplete of automatically imported additional builtins.
One of the spark types we have is
{:spark_function_behaviour, ...
that allows specifying a "builtins module" which is a module from which to show autocompletions automatically. What we should do is allow other modules to add to that list by putting doing the following:for example.
The spark autocomplete extension would then look for any module doing that and add its functions into the mix, as long as the resource is using the provided extension. (since the extension would do the importing). Then users would get nice autocomplete of automatically imported additional builtins.