How do I theme a link with twig for a specific content type? I'm trying to create a custom file-link.html.twig for a particular content type. I've looked at https://www.drupal.org/node/2354645 which doesn't link plugin theme twigs like file-link but tried file-link--&lt;CONTENTYPE&gt;.html.twig anyway. It doesn't work. 

None of the variables passed include the node or content type. Any ideas on how to proceed?
There are a number of things you would need to do to accomplish this. 


Enable Twig debugging
Create a hook theme suggestions preprocess function
Get the node object within your theme hook.
Craft the theme hook suggestion to get a template name with the node type in it. 


Once you have Twig debugging enabled, you can inspect your file link. As a default for file_link, I see:

&lt;!-- THEME DEBUG --&gt;
&lt;!-- THEME HOOK: 'file_link' --&gt;
&lt;!-- BEGIN OUTPUT from 'core/themes/classy/templates/field/file-link.html.twig' --&gt;


In my case, I use Classy as a base theme for my sub-theme, thus the classy path above. but what is missing here is any useful theme hook suggestions out of the box. Next we will remedy that. 

Since we are given the theme hook name above, I can craft the theme hook suggestion based on that and by getting the node type and incorporating it into the theme hook suggestion. (see function hook_theme_suggestions_HOOK_alter)

My theme hook alter then would be:

  function MYTHEME_theme_suggestions_file_link_alter(&amp;$suggestions, $vars, $hook) {

  // Get the node type.
  $node = \Drupal::routeMatch()-&gt;getParameter('node');
  $type = $node-&gt;getType();

  // Create the theme hook suggestion. 
  $suggestions[] = 'file__link__' . 'type_' . $type;

}


Once I do this and drush cr, I will see my new theme hook template suggestion as such:

&lt;!-- THEME DEBUG --&gt;
    &lt;!-- THEME HOOK: 'file_link' --&gt;
&lt;!-- FILE NAME SUGGESTIONS:
   * file--link--type-news.html.twig
   x file-link.html.twig
--&gt;


In my case, my node type is "News" and you can see that in the template suggestion name:

file--link--type-news.html.twig


Now you can create that file and theme away! For more insight on this, I just wrote a blog post about this: Drupal 8 Theming Tutorial: How to Craft Custom Theme Hook Suggestions and Templates