Can I have multiple configurations of Visual Studio Code, one per coding language, each with its own plugins? - visual-studio-code

This is not a duplicate of How do I open multiple instances of Visual Studio Code?.
My previous question, How can I make Visual Studio Code's auto-complete suggestions appear more quickly? explains my problem.
I was using VSC with the PlatformIo plugin for embedded development for a few months with no problem. Then I started on Flutter/Dart and soon had a problem with auto-suggest being really slow.
It could be that I just loaded a duff plug-in (I am adding them back, one by one, to see if/when it "breaks"), but ... I am considering doing all development in VCS, so as to have a single IDE.
I am currently using Eclipse for C/C++ and PHP, WebStorm for AngualrJs and PyCharm for Python.
I had previously used Eclipse for everything, and had a different copy of Eclipse for each language, each with its own plugins.
Since I will be developing in 4 or 5 languages, even if I don't hit a problem as bad as I just did, adding plug-ins for that many languages into a single IDE will inevitably slow things down.
So, question: can I have multiple installs of VSC, each with its own plug-ins, and launch them separately?

I solved this problem on windows using vs code portable.
I created a folder at the root of my machine with subfolders for each language, inside each I put the vs code, then I created a data folder inside each of them so that the information was stored locally, I modified the name of the executables and added it to the path.
As an example, to access a vscode configured for python I put code-python . at the terminal.
I Have the idea watching this video, it may help you (it is in portuguese, but you can see more os less what it does).

Related

Cannot find Arduino IDE path. In Visual Studio Code

I wants to use Arduino in vs code Visual Studio Code.
I installed arduino IDE on my local machine on C:\Program Files\Arduino IDE I also added arduino path my Visual Studio Code's setting .json
"arduino.path": "C:\\Program Files\\Arduino IDE",
setting .json
I am using arduino extension.
This is the pic of extension
Any suggestion or recommendations would greatly aid me. I've been struggling to find a solution for this problem for 6 hours.
This was giving me issues for the longest time, too. It seems that the Arduino 2.X IDE doesn't work well with VSCode.
To resolve, use the legacy IDE (Arduino 1.8.X). First, uninstall the 2.X version of Arduino. As of February 2023, you can download the legacy version by going to the Arduino Downloads page and scrolling down to the "Legacy IDE (1.8.X)" section. There's a few different download options. I opted for the one labeled "Windows Win 7 and Newer" since it's a neatly contained executable to install Arduino.
From here, run the executable and install normally. I also reinstalled the Arduino plugin in the Visual Studio marketplace (not sure if necessary, but it doesn't hurt). There's at least three places you could potentially enter the arduino.path:
The one in YOUR PROJECT FILEPATH/.vscode/settings.json
The one in the VS Code User Settings (File>Preferences>Settings> User tab> Search for arduino.path in the search bar)
Same as above, but on the "Workspace" tab instead of "User"
For me, leaving all three empty worked fine. I believe that's because the installer added Arduino to the Windows Path variable. Here's a related post, though, where someone had to configure the path variable in case that doesn't work for you.

Can you have isolated VS Code environments so each project has its own extensions?

I work on multiple projects in VS code. Over time and across projects I have accumulated so many extensions so that starting up is slower and some extensions cause things to break so I have to reinstall VS code to open up a project.
Is there a way, similar to python venv, where you have have multiple instances of vs code each with its own set of extensions?
Yes - you can disable/enable extensions per workspace! Not quite the same as install/uninstall but should solve your problem of extensions running on startup
You go to extensions menu, click the gear icon on some installed extension and you can Disable (Workspace). You can do the same in reverse for enabling per workspace - docs here.

Visual Studio code : Issue loading Extensions

I am using visual studio code to do my LWC change and it takes at lest 5 minutes to load those extensions. Some times it fails outright and would not let me run commends.
Is there an option to force run extensions?
There is no option to force run extensions in VSCode. It is likely that your hardware and system configuration is not capable of running your program quickly. Consider editing your question to include your computer specs.
While IntelliJ IDEA does require better hardware than VSCode, consider trying that IDE for LWC instead in case it is a VSCode issue and not your hardware.

Why do no programs run in visual studio code?

I recently got a new computer and reinstalled visual studio code but I haven't been able to run any of my files. The error has occurred with both python and C++, so I feel as though it is the IDE that is the problem. I have looked online and there are no straight answers as I have tried following some solutions which have resulted in different errors.
The error above comes up when I run (F5) a simple line of code in c++. Does anyone have a solution?
Thanks, Jacob
[EDIT]
For my python files to work I have to manually select 'Python: current file' but for c++ files they still have the same error.
First step, uninstall python from this machine.
Second, reinstall and make sure that you check the box "add to path".
It's pretty easy to miss as it's a small box, and I missed it my first time installing python earlier in the year. Here's the box you may have missed while installing.
It could be your extensions.
I had a similar error message and simply updated all of my extensions and then my SDK. I was then able to run my code within the IDE. I was using VSCode for c++ and also updated my GCC compiler along with the extensions.
Also look into your computer's environment variables, if you have changed the %PATH variables it may be affecting your ability to run/compile programs.

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.