Open up your favorite text editor and go to your VSCode install directory. Doing an 'ls' should look something like this:
$ ls Code content_shell.pak icudtl.dat libgcrypt.so.11 libnode.so libnotify.so.4 locales natives_blob.bin resources snapshot_blob.bin
Now, 'cd' into your resources/app/extensions/ directory and you'll see all sorts of extensions. For me, it looks a little something like this:
$ ls bat ini perl theme-monokai clojure jade php theme-monokai-dimmed coffeescript java powershell theme-quietlight cpp javascript python theme-red csharp less r theme-solarized-dark csharp-o lib.core.d.ts ruby theme-solarized-light css lua rust theme-tomorrow-night-blue declares.d.ts make shaderlab tsconfig.json docker markdown shellscript typescript fsharp mono-debug sql vb go node-debug swift vscode-api-tests groovy node.d.ts theme-abyss xml html objective-c theme-kimbie-dark yaml
Now, most of those are directories, and they have files under them... the one we care about is
"extensions" : [ ".py", ".rpy", ".pyw", ".cpy", ".gyp", ".gypi" ],
"extensions": [ ".php", ".phtml", ".ctp" ],
etc... Just add in your desired extension (for me, I added the text ',".inc" ') in the object and save it. Restart VSCode and you've got nicely syntax highlighted text!
Update!
As of VSCode 1.1.0+, you can actually add these things in your settings.json. To get there, go to "Preferences->User Settings". It'll open up a big (or small) json object it reads in for your settings. You'll want to add the lines in:{ ... "files.associations": { "*.inc": "php", } }
Save it and you're good to go! (you may need to restart VSCode)
No comments:
Post a Comment