Body: <p>I'd like to be able to only have to refer to a file by it's name, just like it works in JS (e.g. <code>import './js/scripts'</code>) and SCSS (e.g. <code>@import './variables'</code>), without the need for file extensions or underscores.</p>
  <p>However, when I try that in Twig, then first of all CraftCMS doesn't like me omitting the &quot;_&quot; when the file starts with one (and the IDE for that matter), and when I omit the file extension, then PhpStorm simply doesn't like it, but CraftCMS can work with it. For everything to look and work smoothly, I need to write the file name as is.</p>
  <p><a href="https://i.sstatic.net/sePny.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/sePny.png" alt="enter image description here" /></a></p>
  <p>I'm currently on PhpStorm 2021.3.2 and following are my Symfony and Twig settings</p>
  <p><a href="https://i.sstatic.net/aH3Lq.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/aH3Lq.png" alt="enter image description here" /></a></p>
  <p><a href="https://i.sstatic.net/oBVQG.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/oBVQG.png" alt="enter image description here" /></a></p>
  <p>Did I forget to change something, or is that just how it is right now?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-02-18T14:56:31.123Z
Comments.Text: me too! After switching to PHPStorm I'm now resigned to putting .twig after everything, and getting colleagues to do the same :-( I suspect this is more a question for JetBrains though as there's not really anything Craft can do about this.
Comments.UserDisplayName: James Smith
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-01-21T00:27:25.917Z
Comments.Text: Manuele what theme are you using?
Comments.UserDisplayName: a-am
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-01-22T17:05:25.793Z
Comments.Text: @a-am If i remember right, i was using "Material Theme UI" with "Atom Material Icons" at the time, but since I'm a weeb, I've already switched to "Doki Theme". The Material Theme comes with a lot of UI customizations that still seem to apply when using other themes, so I still have it anyways (e.g. to condense everything, i hate the big spaces).
Comments.UserDisplayName: D3strukt0r
Tags: <templating><phpstorm>
Title: "Missing template" when omitting file extensions (.html.twig) or underscore
ThreadText: # "Missing template" when omitting file extensions (.html.twig) or underscore
  
  (Asked by: username_0 on 2022-02-18)
  
  I'd like to be able to only have to refer to a file by it's name, just like it works in JS (e.g. `import './js/scripts'`) and SCSS (e.g. `@import './variables'`), without the need for file extensions or underscores.
  
  However, when I try that in Twig, then first of all CraftCMS doesn't like me omitting the "\_" when the file starts with one (and the IDE for that matter), and when I omit the file extension, then PhpStorm simply doesn't like it, but CraftCMS can work with it. For everything to look and work smoothly, I need to write the file name as is.
  
  [![enter image description here](https://i.sstatic.net/sePny.png)](https://i.sstatic.net/sePny.png)
  
  I'm currently on PhpStorm 2021.3.2 and following are my Symfony and Twig settings
  
  [![enter image description here](https://i.sstatic.net/aH3Lq.png)](https://i.sstatic.net/aH3Lq.png)
  
  [![enter image description here](https://i.sstatic.net/oBVQG.png)](https://i.sstatic.net/oBVQG.png)
  
  Did I forget to change something, or is that just how it is right now?
  
  **Tags:** templating, phpstorm
  
  > **Comments:**
  > **username_1**: me too! After switching to PHPStorm I'm now resigned to putting .twig after everything, and getting colleagues to do the same :-( I suspect this is more a question for JetBrains though as there's not really anything Craft can do about this.  
  > **username_2**: Manuele what theme are you using?  
  > **username_0**: @username_2 If i remember right, i was using "Material Theme UI" with "Atom Material Icons" at the time, but since I'm a weeb, I've already switched to "Doki Theme". The Material Theme comes with a lot of UI customizations that still seem to apply when using other themes, so I still have it anyways (e.g. to condense everything, i hate the big spaces).  
  
  ---
  
  ## 0 answers
  
  