How to render a template declared in hook_theme directly in a twig template without preprocess? Lets say I have a hook_theme like this :

/**
 * Implements hook_theme().
 */
function mytheme_theme($existing, $type, $theme, $path) {
  return [
    'partial' =&gt; [
      'variables' =&gt; ['current_url' =&gt; NULL],
      'template' =&gt; 'partial'
    ]
  ];
}


Then in a node.html.twig, I want to call the template.

Currently I'm doing this :

{% include '@mytheme/partials/partial.html.twig' {'current_url': url('&lt;current&gt;')} %}


But the problem with this is that I never go into my

function mytheme_preprocess_partial(&amp;$variables) {}


Also I can't benefit from the TWIG DEBUG mode.

Is there any way to do something like this :

{{ theme('partial', {'current_url': url('&lt;current&gt;')}) }}


Thanks for helping.
In D8 there is no theme() function, so if you want to render a template you use a render array for it. Put it in a twig variable and print it:

{% set partial = {
  '#theme': 'partial',
  '#current_url': url('&lt;current&gt;'),
} %}

{{ partial }}


As a side note, because of a security issue for Twig in Views you might be no longer be able to do this in Drupal 8.6 and are forced to use PHP in the near future. There is an ongoing discussion what to do about the code execution vulnerability without (hopefully) preventing such valid use cases, see https://www.drupal.org/project/drupal/issues/2860607