My most useful VS Code Extensions
Cover generated by DALL E under the prompt "Create me a blog cover titled "My most useful VS Code Extensions"
While not necessarily a single extension, extensions like Go, Pylance, and Language Support for Java(TM) by Red Hat give you the ability to code in Golang, Python, and Java, respectively, all in VS Code. They are examples of language servers that allow you to code in their respective language.
Without them, VS Code is simply just a text editor, but with them, it becomes the fastest full-fledged Integrated Developer Environment (IDE) you can use. They provide the ability to code in any language you know, all in the same IDE. This can be seen in contrast to the JetBrains suite of IDEs which needs separate applications for each programming language to get the same result. The language servers usually provide features like code completion, code formatting, parameter info, build tools, and more. They usually have customizable settings that allow you to have a productivity boost while working.
The Remote - SSH extension allows you to open any folder on a remote machine using SSH and take advantage of VS Code's full feature set. You can code as if you were on your local machine, but on a remote server! If installed with the bundled extension pack, which includes three additional extensions regarding remote development, coding on a remote server becomes easier than any other alternative.
I personally use this when I need to connect to an external TPU node or computer with greater computing power than my own MacBook. Sometimes I simply use it to code Python on my Raspberry Pi, which works better than any other remote development tool I have used. The remote development is also great since it is lightweight and doesn't consume as much resources. The user interface provided by VS Code is also a nice way to manage files.
For a in-depth explanation on how this works, I recommend reading it on VS Code’s own website here. It basically connected to the remote machine using the Secure Shell (SSH) protocol, installs VS Code server, and allows you to simply use VS Code as you would before, but instead to edit files and folders on a different machine. Especially if you have SSH keys setup, connecting and editing on a remote server becomes as seamless as possible. One interesting feature is the ability to have separate extensions different between your local machine and your remote machine, which makes sense especially if your usages between the remote servers are different. It also allows you to forward the remote host’s ports so you can access them on your local device.
I've found to enjoy myself pairing Remote - SSH with Resource Monitor, an extension which displays current CPU stats, memory/disk consumption, and battery percentage remaining. I don't care for it much on my local VS Code, but it is interesting and useful to witness the effects of your code on the remote machine. Especially when working with my Raspberry Pi with limited resources, I can monitor my usage.
Prettier allows you to format your code, regardless of what language, to however you want it to be. While an important feature is its customization, it enforces a consistent formatting and style of code throughout projects that makes it useful to edit not just among yourself, but especially when working with multiple people on a single codebase.
The way I customize is I make a .prettierrc file with the customizations I want, which are only applied in the project containing the .prettierrc. This extension even has its own plugins. For example, the Tailwind CSS Prettier plugin allows you to format the TailwindCSS styles that you use in your HTML using Prettier, which creates a standard organization of the styles.
There are many customization options within VS Code, whether it be messing around with the settings or installing extensions. The Material Icon Theme extension changes the icons that appear in the explorer, which makes the editor look better to a much higher degree. Beyond simply aesthetics, the extension allows me to better navigate large coding projects by being able to identify the files.
Released only a week ago and not even available on the marketplace, OpenAI's own ChatGPT extension gives your computer's ChatGPT access to your open files in VS Code. It is important to note it only has access to the code currently being viewed. If you want to have more code in context, you need them open in split view. This extension is very new and has very limited features beyond what I have mentioned.
Since the extension is not available on the marketplace, you need to install its .vsix file. You can read the steps to installing it
here.
Github Copilot is definitely better without a doubt, and while I don’t really see this as even trying to compete with Copilot, it is somewhat nice for those users who are coding and don’t need to constantly copy and paste their code anymore. I use this mainly to explain code I don’t understand or want better clarification on.
Note that I have only tested this on MacOS.