I have just downloaded unity and saw that now it supports Visual studio code, I downloaded it and made it the default editor.
After trying to edit a script, it prompted
Intellisense (Autocompletion) is a pure workflow of .Net Environment. So, you need to have .Net 'Developer pack' (not Runtime) installed on your system as it installs all three necessary components below:
reference link: https://dotnet.microsoft.com/download/visual-studio-sdks
It is directly installed to a system admin-accessible path, so no need setting it up. Now, you have to tell VS Code which .Net version to use (whichever you have installed). Your Unity project will have these two files in the root directory:
In these both files search for line (probably 16):
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
Edit version that you had just installed (I had 4.8). Then reopen VS Code. Now everything should work fine.
The issue here is that you haven't selected VS as your code editor preference (https://docs.unity3d.com/Manual/Preferences.html) . Once you do this, also install the Game development with Unity workload for Visual Studio
For new users who have the same requirement, I'll suggest you to switch to another IDE: Rider, provided by Jetbrains. It's just amazing and less cumbersome than VS Code.