I have a custom field with formatter which is currently outputting via field.html.twig
I've modified the theme function to
function mymodule_theme()
{
return [
'field__field_family_and_education' => ['base_hook' => 'field'],
];
}
and the twig debug indicates it's now using this template, however, despite copying the field.html.twig to field--field-family-and-education.html.twig the variables are not being passed to the template. I want the template to reside in the module, not in the main theme so this is being done within the module that defines the field & formatter.
I'm guessing I've missed an obvious step, any ideas?