Add ".js" to file completion on require

Hi,

 

When I type the "require" command WebStorm starts its path completion but it doesnt include the file extension.

For example in the image below, I want to insert the "deploy.js" file, but when I hit Enter/Tab WebStorm will just insert "deploy", is there a way to chage this? I know that it will work just fine with node, but I still rather prefer to include the extension...

Thx.

 

0
2 comments

To complete required filename with extension, set registry key 'commonjs.complete.required.filename.with.extension' to 'true' :

  • Open "Help | Find Action..." dialog
  • Type Registry word, find Registry item in dropdown list and press Enter
  • Find 'commonjs.complete.required.filename.with.extension' there, tick the checkbox

 

0
Avatar
Permanently deleted user

Thx !!

0

Please sign in to leave a comment.