To write extensions you have to install the extensibility workload. That’s technically all you need, but this set of documentation make use of the community driven extension called Extensibility Essentials.
Install extensibility workload
Open the Visual Studio Installer from Tools -> Get Tools and Features… top menu inside Visual Studio and make sure to install the Visual Studio extension development workload found toward the bottom.
Install Extensibility Essentials
Install the Extensibility Essentials by going to Extensions -> Manage Extensions and search for extensibility.
That’s it, you are now ready to start developing your first extension.