Is it possible to have Visual Studio Code custom configured from a .ps1 file? - powershell

I'm attempting to put together a standard VS Code build for my company. I have a ps1 file that copies/installs extensions for VS Code after it's been installed but I can't seem to find how or even if it is possible to then configure VS Code settings to utilize those extensions.
For example, one of the extensions is "vscode-icons". I can install the extension just fine but then the user needs to setup his preferences manually to actually use the extension by going to the File->Preferences->File Icon Theme->VS Code Icons.
Is it possible to have my ps1 install file actually make configuration changes so any user who opens VS Code has the custom configuration settings?

The config settings for VS Code are JSON files - just needs to locate and edit them.
First check what manual change is doing then create part in the script to edit the settings.
https://code.visualstudio.com/docs/customization/userandworkspace

Related

Is there a way to build vscode with a custom set of extensions?

Looking at its source code, vscode comes with a predefined set of extensions located at vscode/extensions/. To build a custom version of vscode with a custom set of extensions, do I need to just put the extension set/pack under exntesions or do I have to configure a specific file?

Install VS Code extension during development?

I am developing an extension for VS Code. This extension is already good enough for me to use during daily work, but not good enough to be published (yet). Is there a canonical way to make an unpublished extension under development available to VS Code? Optimally, I would like to always have the current state of the code running.
I did find a way that seems to work, but I'm not sure whether this is a terrible hack or okay: Create a symbolic link in VS Code's extensions directory (~/.vscode/extensions on Linux) to the development directory. Is there a better/official way?
You can package your extension (even if it's in development) using vsce with the command vsce package. This will create a .vsix file which you can install in your regular instance of VSCode in the marketplace menu (click on the ... icon at the top and select "Install from .vsix file).
If you need to view the logs of the extension, go to Help>Toggle Developer tools and use the console to view your extension's output (if there is any).

Visual Studio Code Love2D support extension detecting love.app as a directory

I have just started with löve because of an internet course I'm on, and I'm using Visual studio code as my editor. The course recommends that I use the "Love2D Support" extension with Visual Studio. It allows me to run the code directly from VS by pressing Command + L.
Although when I do it, VS outputs me this error:
The setting specified in pixelbyte.love2d.path must be an executable file, not a directory. Check your settings.
The path I have input in the settings is /Users/My_Username/Desktop/love.app
I am 100% sure that it is the correct directory. What is the problem?
Thanks for answering!
The actual executable file in Mac is /Applications/love.app/Contents/MacOS/love so put this in your pixelbyte.love2d.path command in vscode and you are good to go.

Multiple configurations for VSCode

At the moment I'm working on a few projects at the same time using VSCode, one in react, another in angular and some good old javascript.
The problem is that I have a few extensions installed that conflict, for example, some code snippets that are the same for React and Angular.
Is it possible to have 3 visual studio code installed on a Mac with different extensions installed?
There are two options for such setup:
Portable installation - unzip VSCode in a folder and create a subfolder there called data. This will trigger the portable mode and all settings will be stored in that data folder. The downside is that you'll have to manually update every portable folder whenever new version comes out. More info here.
Custom config paths - create a shortcut for your VSCode installation, and add those parameters:
--user-data-dir <some-path> --extensions-dir <some-path>
You can put them wherever and have as much shortcuts as you want, they even run in parallel. Best part is once you update the installation, all the configs are upgraded too. More info here.
Both modes are incompatible, so you have to choose one.

Run command line when a document is saved in Visual Studio 2013?

I'm currently evaluating using VS2013 for a HTML5 project.
In this project I would like to be able to run a command line tool every time a file is saved (and have the file path passed as argument to the command line tool), and then have the output displayed in the console in VS. It's also important that this setup can be part of the project file, so that when a developer opens the project it's already setup correctly and ready to go without any additional configuring in VS.
In both Sublime Text and Webstorm projects all this is easy to achieve, but I haven't been able to find anything similar in Visual Studio. Any tips would be much appreciated!
You can set a DocumentSaved handler with Visual Commander and run a tool. See the "2. Run Cppcheck on the saved file and show results in the Output window" extension sample.