{"id":14982810,"url":"https://github.com/dfinity/vscode-motoko","last_synced_at":"2025-12-05T05:07:59.009Z","repository":{"id":37989968,"uuid":"218583345","full_name":"dfinity/vscode-motoko","owner":"dfinity","description":"Motoko language support for VS Code.","archived":false,"fork":false,"pushed_at":"2025-04-09T15:19:25.000Z","size":8304,"stargazers_count":47,"open_issues_count":14,"forks_count":17,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-04-09T16:33:24.722Z","etag":null,"topics":["autocompletion","blockchain","canister","dfx","extension","formatter","go-to-definition","ide-extension","internet-computer","language-client","motoko-language","smart-contracts","syntax-highlighting","visual-studio-code","vscode","vscode-extension"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dfinity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-30T17:22:14.000Z","updated_at":"2025-04-09T15:19:31.000Z","dependencies_parsed_at":"2023-12-20T19:39:47.040Z","dependency_job_id":"55d1ec5e-7251-45bc-aff4-ca216ddb1fbe","html_url":"https://github.com/dfinity/vscode-motoko","commit_stats":{"total_commits":269,"total_committers":9,"mean_commits":29.88888888888889,"dds":0.2788104089219331,"last_synced_commit":"f988bbaf1d3e8cf3a37772e54636be5f2ce45678"},"previous_names":[],"tags_count":112,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Fvscode-motoko","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Fvscode-motoko/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Fvscode-motoko/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dfinity%2Fvscode-motoko/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dfinity","download_url":"https://codeload.github.com/dfinity/vscode-motoko/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248112924,"owners_count":21049755,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autocompletion","blockchain","canister","dfx","extension","formatter","go-to-definition","ide-extension","internet-computer","language-client","motoko-language","smart-contracts","syntax-highlighting","visual-studio-code","vscode","vscode-extension"],"created_at":"2024-09-24T14:06:07.784Z","updated_at":"2025-12-05T05:07:59.002Z","avatar_url":"https://github.com/dfinity.png","language":"JavaScript","readme":"# Motoko \u0026middot; VS Code Extension\n\n\u003e #### Motoko language support for [Visual Studio Code](https://code.visualstudio.com/).\n\n[![Visual Studio Marketplace](https://img.shields.io/visual-studio-marketplace/v/dfinity-foundation.vscode-motoko?color=brightgreen\u0026logo=visual-studio-code)](https://marketplace.visualstudio.com/items?itemName=dfinity-foundation.vscode-motoko)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/dfinity/prettier-plugin-motoko/issues)\n\n## Overview\n\n[Motoko](https://internetcomputer.org/docs/current/motoko/main/motoko) is a high-level smart contract language for the [Internet Computer](https://internetcomputer.org/).\n\nThis IDE extension provides type checking, formatting, snippets, and more for [Motoko canister development](https://internetcomputer.org/docs/current/developer-docs/build/cdks/motoko-dfinity/motoko/).\n\n[![Showcase](https://github.com/dfinity/vscode-motoko/raw/master/guide/assets/intro.webp)](https://marketplace.visualstudio.com/items?itemName=dfinity-foundation.vscode-motoko)\n\n## Installation\n\nGet this extension through the [VS Marketplace](https://marketplace.visualstudio.com/items?itemName=dfinity-foundation.vscode-motoko), or alternatively the [Extensions panel](https://code.visualstudio.com/docs/editor/extension-marketplace) in your VS Code project.\n\nVSCodium users can download the extension through [Open VSX](https://open-vsx.org/extension/dfinity-foundation/vscode-motoko) or the [GitHub releases](https://github.com/dfinity/vscode-motoko/releases) page.\n\n## Keyboard Shortcuts\n\nBelow are the default key bindings for commonly used features supported in the extension:\n\n- **Code formatter** (`Shift` + `Alt` + `F`): format a Motoko file using [prettier-plugin-motoko](https://github.com/dfinity/prettier-plugin-motoko).\n- **Organize imports** (`Shift` + `Alt` + `O`): group and sort imports at the top of your Motoko file.\n- **Import code action** (`Ctrl/Cmd` + `.` while hovering over an unresolved variable): show quick-fix options.\n- **Go to definition** (`F12`): jump to the definition of a local or imported identifier.\n- **IntelliSense** (`Ctrl` + `Space`): view all available autocompletions and code snippets.\n\n[![Snippets](https://github.com/dfinity/vscode-motoko/raw/master/guide/assets/snippets.png)](https://marketplace.visualstudio.com/items?itemName=dfinity-foundation.vscode-motoko)\n\n## Other Features\n\n- Deploy to the Internet Computer mainnet using a right-click context menu action.\n- [Mops](https://mops.one/) and [Vessel](https://github.com/dfinity/vessel) (the two most popular Motoko package managers) are supported out-of-the-box in this extension.\n- Quickly convert between Motoko types using code snippets such as `array-2-buffer` or `principal-2-text`.\n- In case you're hoping to learn Motoko without installing `dfx`, the Motoko VS Code extension works standalone on all major operating systems (including Windows).\n- This extension also provides schema validation and autocompletion for `dfx.json` config files.\n- View type information and documentation by hovering over function names, imports, and other expressions.\n\n[![Tooltips](https://github.com/dfinity/vscode-motoko/raw/master/guide/assets/tooltips.png)](https://marketplace.visualstudio.com/items?itemName=dfinity-foundation.vscode-motoko)\n\n## Commands\n\n- `Motoko: Restart language server`: Starts (or restarts) the language server\n- `Motoko: Deploy (20 minutes)`: Temporarily deploys the currently open file to the Internet Computer\n- `Motoko: Import Mops Package...`: Search, install and import a package from [Mops](https://mops.one)\n\n[![Temporary deployment](https://github.com/dfinity/vscode-motoko/raw/master/guide/assets/deploy.png)](https://marketplace.visualstudio.com/items?itemName=dfinity-foundation.vscode-motoko)\n\n## Settings\n\n- `motoko.dfx`: The location of the `dfx` binary\n- `motoko.canister`: The default canister name to use in multi-canister projects\n- `motoko.formatter`: The formatter used by the language server\n\n## Advanced Configuration\n\nIf you want VS Code to automatically format Motoko files on save, consider adding the following to your `settings.json` configuration:\n\n```json\n{\n  \"[motoko]\": {\n    \"editor.defaultFormatter\": \"dfinity-foundation.vscode-motoko\",\n    \"editor.formatOnSave\": true,\n    \"editor.codeActionsOnSave\": {\n        \"source.organizeImports\": true\n    }\n  }\n}\n```\n\n## Contributing\n\n### Set up your local development environment:\n\nEnsure that [Node.js \u003e= 20.x](https://nodejs.org/en/) and [Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) are installed on your system.\n\n```bash\ngit clone https://github.com/dfinity/vscode-motoko\ncd vscode-motoko\nnpm install\n```\n\n### Run unit tests:\n\n```bash\nnpm test\n```\n\n### Build the extension:\n\n```bash\nnpm run package\n```\n\nThis generates a file named `vscode-motoko-*.*.*.vsix` in the project root.\n\n### Install in VS Code:\n\n```bash\ncode --install-extension vscode-motoko-*.*.*.vsix\n```\n\nAlternatively, right-click the `.vsix` file and then select the \"Install Extension VSIX\" option.\n\n---\n\nCommunity [PRs](https://github.com/dfinity/vscode-motoko/pulls) are welcome! Be sure to check the list of [open issues](https://github.com/dfinity/vscode-motoko/issues) in case anything catches your eye.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfinity%2Fvscode-motoko","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdfinity%2Fvscode-motoko","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdfinity%2Fvscode-motoko/lists"}