Configuring Visual Studio Code
Note, VS Code Docs located here, please use this for questions
Visual Studio Code is the code editor used at Texas Torque. The reason for this is the fact that it is easy to use with WPILib and has an incredible ammount of tools available to us. VS Code allows you to install extensions and themes from the extensions menu. Control (command on Mac) + p gives a list of files, while control (command on Mac) + shift + p gives a list of commands called the command pallet. This is how we use WPILib and other extensions.
This is what my VS Code looks like.
On the far left, there are icons for various extensions. To the left, there is the file tree. In the center, there is the code editor section. To the right, I have a terminal.
Extensions
The extensions tab is the icon on the far left that has the 4 blocks.
You must hav the following extensions installed:
- WPILib
- Live Share
To avoid random annoying import errors, do not have:
- Java Language support by George Fraser
You really should have:
-
Extensions Pack for Java, which comes with:
- Language Support for Java(TM) by Red Hat
- Debugger for Java
- Maven for Java
- Project Manager for Java
- Test Runner for Java
-
Java Debugger by on Jayamanne
-
Tabnine (we have Pro if you login with your school email)
Extensions that make everyones life easier:
- Bracket Pair Colorizor
- Tabout
- Prettier Code Formatter
Git and source control
Sign in to Visual Studio with Github. This allows you to access Git functions in source control tab. More about Git integration [here](Git/How to Use VSCode Git)
WPILib
WPILib extension will add a red "W" hexagon shaped button in the top right of the editor pane. You can use that, or use the command pallet to access all of the WPILib exetensions.
Credits
Initially written by Justus Languell in August 2021