Skip to content

Commit 275184a

Browse files
Merge pull request #49472 from ShawnKupfer/WB1703
User Feedback 405005 - Add supported language per UUF feedback
2 parents 1fcfa65 + 2870205 commit 275184a

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

learn-pr/github/github-copilot-across-environments/includes/2-code-completion-with-git-hub-copilot.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,19 @@ GitHub Copilot code completion features live directly within your IDE, where you
22

33
In this unit, we cover:
44

5-
- GitHub Copilot supported languages
5+
- GitHub Copilot supported languages
66
- Auto suggestions
77
- Multiple suggestions pane
88
- Support for different coding styles in suggestions
99
- How GitHub Copilot incorporates coding comments for suggestions
1010

11-
1211
## GitHub Copilot supported languages
12+
1313
GitHub Copilot provides robust support for a wide range of programming languages and frameworks, with strong capabilities in:
1414

1515
- Python
1616
- JavaScript
17+
- Java
1718
- TypeScript
1819
- Ruby
1920
- Go
@@ -22,21 +23,22 @@ GitHub Copilot provides robust support for a wide range of programming languages
2223

2324
While these languages receive exceptional support, GitHub Copilot can assist with many other languages and frameworks as well.
2425

25-
2626
## Auto suggestions
27+
2728
Copilot offers code suggestions as you type: sometimes completing the current line, sometimes suggesting a whole new block of code. You can accept all, part, or ignore the suggestion. This ability to provide real-time, context-aware suggestions saves valuable development time by reducing the need to search for syntax, troubleshoot logic, or repeatedly write common patterns.
2829

2930
:::image type="content" source="../media/auto-completion-ghost-text.png" alt-text="Screenshot of auto completion ghost text.":::
3031

31-
3232
## Multiple suggestions pane
33+
3334
When you're working on a code block and GitHub Copilot offers a suggestion, you see a grayed-out code snippet. To explore more options, hover over the suggestion to reveal the GitHub Copilot control panel.
3435

3536
:::image type="content" source="../media/multiple-suggestion-auto-completion-ghost-text.png" alt-text="Screenshot of multiple suggestion auto completion ghost text.":::
3637

3738
Click the forward or backward arrow buttons in the control panel to see the next or previous suggestions. You can also use keyboard shortcuts:
38-
- macOS: Option (⌥) or Alt+] (next), Option (⌥) or Alt+[ (previous)
39-
- Windows or Linux: Alt+] (next), Alt+[ (previous)
39+
40+
- macOS: Option (⌥) or Alt+] (next), Option (⌥) or Alt+[ (previous)
41+
- Windows or Linux: Alt+] (next), Alt+[ (previous)
4042

4143
:::image type="content" source="../media/suggestions-pane.gif" alt-text="Screenrecord of suggestions pane.":::
4244

@@ -48,28 +50,31 @@ While GitHub Copilot is superb at suggesting code for you, it also demonstrates
4850
- **Comment Style**: It can mimic your comment style, whether you prefer inline comments, block comments, or doc strings.
4951
- **Design Patterns**: When your project consistently uses certain design patterns, Copilot suggests code that aligns with these patterns.
5052

51-
5253
## Using coding comments for suggestions
54+
5355
A key aspect of this capability is how it incorporates coding comments to enhance its suggestions. This section explores the various ways GitHub Copilot utilizes comments to improve its code completion and generation capabilities.
5456

5557
### Understanding comment context
58+
5659
When integrated into your existing codebase, GitHub Copilot uses various aspects of your code to provide more relevant suggestions, including code comments. Developers often use comments to clarify code intent and enhance collaboration, and Copilot, as your AI coding assistant, makes use of these comments in much the same way. By understanding the intent behind the comments, Copilot can provide more accurate and context-aware code suggestions through two key processes:
5760

5861
- **Natural Language Processing**: Copilot uses advanced natural language processing (NLP) techniques to interpret the meaning and intent behind comments in the code.
5962
- **Contextual Analysis**: It analyzes comments in relation to the surrounding code, understanding their relevance and purpose within the broader context of the file or project.
6063

61-
6264
## Types of comments utilized
65+
6366
Copilot can work with various types of comments to inform its suggestions:
67+
6468
- **Inline comments**: Short explanations next to specific lines of code.
6569
- **Block comments**: Longer explanations that might describe a function or class.
6670
- **Docstrings**: Formal documentation strings in languages like Python.
6771
- **TODO comments**: Notes about future implementations or improvements.
6872
- **API Documentation**: Comments that describe the usage and parameters of functions or methods.
6973

70-
7174
## Comment-driven code generation
75+
7276
Copilot uses comments in several ways to generate and suggest code:
77+
7378
- **Function implementation**: When a function is described in comments, Copilot can suggest an entire implementation based on that description.
7479

7580
:::image type="content" source="../media/multiple-line-code-completion-ghost-text.png" alt-text="Screenshot of multiple line code completion ghost text.":::

0 commit comments

Comments
 (0)