|
1 |
| -# VS Code |
| 1 | +# Source Academy & VS Code |
2 | 2 |
|
3 |
| -Experimental project for running Source Academy within Visual Studio Code. |
| 3 | +<p align="center"> |
| 4 | + <img src="./assets/icon.png" width="150"> |
| 5 | +</p> |
4 | 6 |
|
5 |
| -## How to use |
| 7 | +A Visual Studio Code extension for integration with [Source Academy](https://about.sourceacademy.org), an online experiential environment for computational thinking. |
6 | 8 |
|
7 |
| -TODO: Add instructions |
| 9 | +It is available in the VS Code [Extension Marketplace](https://marketplace.visualstudio.com/items?itemName=source-academy.source-academy). |
8 | 10 |
|
9 |
| -## Notes to developers |
| 11 | +## Features |
10 | 12 |
|
11 |
| -### Running the extension in dev mode |
| 13 | +- View, edit, and submit assessments |
| 14 | +- Syntax highlighting for Source |
| 15 | +- Integration with our [language server for Source](https://github.com/source-academy/source-lsp), which provides smart features such as: |
| 16 | + - Error checking |
| 17 | + - Code completion |
| 18 | + - Hover documentation |
12 | 19 |
|
13 |
| -1. Setup the project |
14 |
| - ``` |
15 |
| - yarn |
16 |
| - ``` |
17 |
| -1. Compile |
18 |
| - ``` |
19 |
| - yarn compile |
20 |
| - ``` |
21 |
| -1. Run the extension in debug mode by opening the root folder a VSCode window, then "Start Debugging" (or press F5). |
| 20 | +## Installing |
22 | 21 |
|
23 |
| -### Publishing the extension |
| 22 | +If you don't have VS Code installed yet, download it from [here](https://code.visualstudio.com/docs/setup/setup-overview) first. |
24 | 23 |
|
25 |
| -For a new release, update the version in `package.json` and tag the commit. Push the commit and the tag to the repo, |
26 |
| -which will trigger GitHub Actions to build and publish the extension to Releases tab and the Marketplace. |
| 24 | +From within VS Code, |
| 25 | + |
| 26 | +1. Click on the Extensions icon on the left sidebar or the `View: Show Extensions` command (`Ctrl+Shift+X`). |
| 27 | +2. Search for "Source Academy" and install it. |
| 28 | + |
| 29 | +We'd recommend also installing the [Error Lens](https://marketplace.visualstudio.com/items?itemName=usernamehw.errorlens) extension |
| 30 | +to show diagnostic messages more prominently. |
| 31 | + |
| 32 | +## Getting started |
| 33 | + |
| 34 | +_If you don't have an existing Source Academy account, you can try out our public frontend. See section [Changing the frontend](#changing-the-frontend)._ |
| 35 | + |
| 36 | +After installing the extension, |
| 37 | + |
| 38 | +1. Click on the newly-added Source Academy icon on the left sidebar. |
| 39 | +2. Launch the Source Academy panel. |
| 40 | + |
| 41 | +<img src="./docs/images/launch-panel-from-sidebar.png" width="600"> |
| 42 | + |
| 43 | +Alternatively, use the `Source Academy: Show the Source Academy Panel` command. |
| 44 | + |
| 45 | +Once the panel loads, you'll be prompted to log in. Afterwards, begin coding by opening any assessment. |
| 46 | + |
| 47 | +### Changing the frontend |
| 48 | + |
| 49 | +To use a different Source Academy frontend, modify the Frontend Base URL setting: |
| 50 | + |
| 51 | +1. Press `Ctrl + ,` to open VS Code's settings page, then search for `frontendBaseUrl`. |
| 52 | +2. Enter a valid URL. |
| 53 | + |
| 54 | +Example value (public frontend): |
27 | 55 |
|
28 | 56 | ```
|
29 |
| -npm version (major|minor|patch) |
30 |
| -git push origin main --tags |
| 57 | +https://sourceacademy.org |
31 | 58 | ```
|
| 59 | + |
| 60 | +## For developers |
| 61 | + |
| 62 | +Check out our [developer guide](./docs/developer-guide.md) for instructions to setup and run the extension from source. |
0 commit comments