Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>motokoNew to Visual Studio Code? Get it now.
motoko

motoko

Motoko LSP Client

|
6,344 installs
| (1) | Free
Reports Motoko compiler errors and provides code completion and refactoring tools.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

I hacked this little extension together to get code completion and compiler warnings with the dfx _language-service command.

This has been only tested on 0.5.2 & 0.5.3.

It also only works for projects with only one canister specified in dfx.json (but this shouldn't be to hard to fix). If you want realtime feedback from the server, not only when you manually save your file, go to

  • vscode settings
  • Files:AutoSave
  • set to afterDelay
  • Tweak the Files: Auto Save Delay to your preferences.

The code is open source, feel free to jump in! It is very heavily inspired from this.

Note: the dfx _language-service is not (afaik) officially supported yet. There will very likely be a way better client provided by dfinity itself which will render this obsolete. This is for people that don't want to wait!

It would be great if anyone wants to collaborate on the two issues mentioned above! Enjoy

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft