Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leytoncasta/skills-copilot-codespaces-vscode
My clone repository
https://github.com/leytoncasta/skills-copilot-codespaces-vscode
Last synced: about 1 month ago
JSON representation
My clone repository
- Host: GitHub
- URL: https://github.com/leytoncasta/skills-copilot-codespaces-vscode
- Owner: leytoncasta
- License: mit
- Created: 2024-07-10T00:39:52.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-07-10T00:44:46.000Z (8 months ago)
- Last Synced: 2024-11-14T14:30:01.583Z (3 months ago)
- Size: 10.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Code with GitHub Copilot
_GitHub Copilot can help you code by offering autocomplete-style suggestions right in VS Code and Codespaces._
## Step 2: Seeing AI code suggestions in a Javascript file!
_Nice work! :tada: You created a Codespace using a devcontainer file that installed Copilot!_
GitHub Copilot provides suggestions for numerous languages and a wide variety of frameworks, but works especially well for Python, JavaScript, TypeScript, Ruby, Go, C# and C++. The following samples are in JavaScript, but other languages will work similarly.
Let's try this out utilizing Javascript for Copilot.
### :keyboard: Activity: Add a Javascript file and start writing code
1. From inside the codespace in the VS Code explorer window, create a new file.
> **Note**:
> If you closed the Codespace from above, please open it back up or create a new Codespace.2. Name the file `skills.js`
3. Verify your new file looks like:

4. In the `skills.js` file, type the following function header.```
function calculateNumbers(var1, var2)
```GitHub Copilot will automatically suggest an entire function body in grayed text. Below is an example of what you'll most likely see, but the exact suggestion may vary.
5. Press `Tab` to accept the suggestion.
### :keyboard: Activity: Push code to your repository from the codespace
1. Use the VS Code terminal to add the `skills.js` file to the repository:
```
git add skills.js
```2. Next from the VS Code terminal stage and commit the changes to the repository:
```
git commit -m "Copilot first commit"
```3. Finally from the VS Code terminal push to code to the repository:
```
git push
```**Wait about 60 seconds then refresh your repository landing page for the next step.**
---
Get help: [Post in our discussion board](https://github.com/orgs/skills/discussions/categories/code-with-copilot) • [Review the GitHub status page](https://www.githubstatus.com/)
© 2023 GitHub • [Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/code_of_conduct.md) • [MIT License](https://gh.io/mit)