title: Drupal form template suggestion
body: <p>I'm trying to create a drupal form suggestion using :</p>
  <pre><code>function pfe_theme_suggestions_form_alter(array &amp;$suggestions, array $variables) {
      $suggestions[] = 'form__'. $variables['element']['#id'];
  }
  </code></pre>
  <p>but after creating the <strong>form--user-login-form.html.twig</strong> , drupal doesn't take this template in consideration but it always uses <strong>form.html.twig</strong>.</p>
  <p>This is the html comment :</p>
  <pre><code>&lt;!-- THEME DEBUG --&gt;
  &lt;!-- THEME HOOK: 'form' --&gt;
  &lt;!-- FILE NAME SUGGESTIONS:
     * form--user-login-form.html.twig
     x form.html.twig
  --&gt;
  &lt;!-- BEGIN OUTPUT from 'core/themes/stable/templates/form/form.html.twig' --&gt;
  </code></pre>
  <p>After adding the HOOK_theme() :</p>
  <pre><code>function pfe_theme_suggestions_form_alter(array &amp;$suggestions, array $variables) {
     $suggestions[] = 'form__'.$variables['element']['#id']; //form--user-login-form.html.twig
  }
  
  function pfe_theme($existing, $type, $theme, $path) {
  
    return [
      'form__user-login-form' =&gt; [
        '#theme' =&gt; 'form--user-login-form',
        'render element' =&gt; 'form',
      ],
    ];
  
  }
  </code></pre>
  <p>I get this error :</p>
  <blockquote>
  <p>Twig_Error_Loader: Template &quot;themes/pfe/templates/form--user-login-form.html.twig&quot; is not defined (Drupal\Core\Template\Loader\ThemeRegistryLoader: Unable to find template &quot;themes/pfe/templates/form--user-login-form.html.twig&quot; in the Drupal theme registry.). in Twig_Loader_Chain-&gt;getCacheKey() (line 43 of /home/marwen/workspace/pfe/themes/pfe/templates/block/block--userlogin.html.twig).</p>
  </blockquote>