Skip to content

Commit 5aea0fb

Browse files
committed
Add info about multiple code-gen instructions
1 parent 8943fce commit 5aea0fb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docs/copilot/copilot-customization.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ Custom instructions consist of natural language instructions and should be short
2626

2727
Copilot can help you generate code, for example as part of a refactoring, generating unit tests, or implementing a feature. You might have specific libraries you want to use in your project, or a particular coding style you want to follow for the code that Copilot generates.
2828

29+
> [!NOTE]
30+
> Copilot does not apply code-generation instructions for [code completions](/docs/copilot/ai-powered-suggestions.md).
31+
2932
### Use settings
3033

3134
You can configure custom code-generation instructions by using the `setting(github.copilot.chat.codeGeneration.instructions)` setting. You can define custom instructions at the User or Workspace level, and you can also specify language-specific instructions. Get more information about [language-specific settings](/docs/getstarted/settings.md#language-specific-editor-settings).
@@ -58,8 +61,10 @@ Always add comments.
5861

5962
You can also store custom instructions in your workspace or repository in a `.github/copilot-instructions.md` file and have VS Code automatically picks up this file.
6063

64+
If you define custom instructions in both the `.github/copilot-instructions.md` file and in settings, Copilot tries to combine instructions from both sources.
65+
6166
> [!NOTE]
62-
> GitHub Copilot in Visual Studio also detect the `.github/copilot-instructions.md` file. If you have a workspace that you use in both VS Code and Visual Studio, you can use the same file to define custom instructions for both editors.
67+
> GitHub Copilot in Visual Studio also detects the `.github/copilot-instructions.md` file. If you have a workspace that you use in both VS Code and Visual Studio, you can use the same file to define custom instructions for both editors.
6368
6469
1. Set the `setting(github.copilot.chat.codeGeneration.useInstructionFiles)` setting to `true` to instruct Copilot in VS Code to use the custom instructions file.
6570

0 commit comments

Comments
 (0)