Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to enable JavaScript IntelliSense for custom file extensions in VS Code?

The question title says it all. My organization uses a non-standard file extension on source code written using JavaScript. Changing the file extension to ".js" seems to activate IntelliSense.

However, I was wondering if the IntelliSense could be activated using the non-standard file extension.

like image 744
Rich P Avatar asked Oct 15 '25 14:10

Rich P


2 Answers

Click the bottom right of the window where it says "Plain Text" or the name of the detected language. This will bring up a menu at the top that lets you change it for the current session and also configure that specific extension to always be interpreted as JS. VS Code Bottom Toolbar VS Code Language selection Menu

Use the files.associations setting:

"files.associations": {
  "*.customExtension": "javascript"
}
like image 26
jabacchetta Avatar answered Oct 17 '25 03:10

jabacchetta