Motoko: Why vscode?

For code highlighting and completion it seems the only native plugin to date is for Visual Studio Code. Is this the main IDE that the internal team is using currently, and if so why?

(sell me on it)

I will say the interactive playground that it suggests on install has taught me things I didn’t even know I was missing (like Emmet Abbreviation)

I’m sure vscode isn’t the only IDE it’s in, but it’s the only IDE that made it a point to show me in an interactive way.

I think I can get used to it, just wondering if this is the primary IDE being used internally and by most Internet Computer / Motoko developers and if so, why.

… also just hit me that Microsoft also maintains TypeScript which has similar type checking syntax and functionality, so maybe it’s a good fit for Motoko as well on that note.

If I remember correctly, VS Code is the most popular editor so it makes sense to target that first.

I haven’t tried it myself recently but Motoko provides a language server that is compatible with editors that support the Language Server Protocol.

https://langserver.org isn’t the official site but I think it does a great job of explaining why LSP makes sense. It also lists language server implementations for different languages, and LSP clients for different editors.

It should be possible to find your editor near the bottom of that page and get it to talk to the Motoko language server.

@kritzcreek 's VS plugin is mostly a wrapper around the mo-ide tool he wrote, which is a Language Server Protocol (LSP) server for Motoko. This means that it should be relatively easy to add that support to other editors. That would make a great community project!

Does anyone have candid syntax highlighting for vscode? I know the highlightjs definition exists.

For Webstorm/Jetbrains users, go for an upvote :point_right: https://youtrack.jetbrains.com/issue/IDEA-274257