How do I enable and weight fields through .yml?
Adding formatters or widgets to field configuration doesn't work. You have to add them to the existing display modes in hook_install().

See entity_get_display and entity_get_form_display, which are deprecated, but contain examples how to add components to display modes and code replacing the deprecated functions to load the entity displays.