Adding placeholders to the user login block's username and password input fields Task

I'm trying to add the placeholder attribute to the username and password input fields of the user login block.

Problem

When I have twig debug on, the only twig file overrides list are the following.

&lt;!-- FILE NAME SUGGESTIONS:
* input--textfield.html.twig
x input.html.twig
--&gt;


I don't want to use either of these twig files as it would apply to every input or every textfield.

Caveat

I'm wanting to accomplish this from within my theme not a custom module. Which I'm not sure is able to be done.
In twig it's difficult to target a specific input field. You can do this more efficient in a form alter hook, which you can use in themes too:

mytheme.theme

function mytheme_form_user_login_form_alter(&amp;$form, $form_state) {
  $form['name']['#placeholder'] = t('placeholder for username');
}