![visual studio javascript intellisense horrible visual studio javascript intellisense horrible](https://hanselmanblogcontent.azureedge.net/Windows-Live-Writer/733b36a7f64d_ED6F/image_7549c9be-f3c6-4d80-bbf4-ef8e0a201a0a.png)
To give you a real-life example, I took the snippet I wrote for the web-version of the P5JS Editor and added the Typescript Definition on top.Īs mentioned at the beginning of this post, I put together a all-in-one solution. You then reference it from your sketch.js file by putting the following line on top of your sketch, adjusting the path, if needed: ///
VISUAL STUDIO JAVASCRIPT INTELLISENSE HORRIBLE CODE
What you have to do to enable Visual Studio Code to be your P5JS Editor, is to download this TypeScript Definition File and put it into your Project Directory. It gained quite a bit of traction and so I decided to write this post, to provide a comprehensive resource for other people to refer to. So I posted this question on Stack Overflow. When I wanted to use Visual Studio Code for P5JS, I too had trouble getting started. Extending Visual Studio Code to become a P5JS Editor
![visual studio javascript intellisense horrible visual studio javascript intellisense horrible](https://code.visualstudio.com/assets/updates/1_40/activity-bar-indicator.gif)
The reason for that, is that Visual Studio Code sees P5JS is “just” a library and therefor does not bring native support for the language out of the box.īut Visual Studio Code is versatile tool, and we will extend it to understand P5JS, so it will become a full-featured P5JS Editor. While Visual Studio Code supports a great many languages out of the box, it does not understand P5JS.
![visual studio javascript intellisense horrible visual studio javascript intellisense horrible](https://community.platformio.org/uploads/default/original/2X/b/bacb2c5a099496f3335e27553f56250a0484cc3f.png)
(Bonus: The Atom Editor is also based on Electron, therefor the solution provided here may well work for the Atom Editor, too). Visual Studio Code is my P5JS Editor of choice. It can be installed on many platforms using common package managers. Note that an alternate build of VS Code exists, called VSCodium. VS Code is available for Mac, Linux and Windows. If you are working on a bigger project, you definitely want to use something better than a website to realize your ideas. Overview Visual Studio Code (VS Code) is a free tool for editing and debugging Web apps based on the Visual Studio Code - Open Source code base. To summarize the above points: If you just want to hack together a short sketch, the web-version of the P5JS Editor is the right tool for the job. In the short sketch I wrote above you can see some of the features, as well as some of the drawbacks of the P5JS online editor: Pros