WEBVTT

1
00:00:01.840 --> 00:00:04.320
Now, I showed you before that you can

2
00:00:04.320 --> 00:00:06.620
also configure this inline chat.

3
00:00:07.580 --> 00:00:09.100
And for that, of course, you can go to

4
00:00:09.100 --> 00:00:11.040
your settings, your workspace or user

5
00:00:11.040 --> 00:00:12.580
settings, depending on whether you

6
00:00:12.580 --> 00:00:14.000
want to tweak the settings for this

7
00:00:14.000 --> 00:00:16.520
specific workspace or for all your

8
00:00:16.520 --> 00:00:18.980
projects for this VS Code user.

9
00:00:20.800 --> 00:00:22.500
And then in there, you can also search

10
00:00:22.500 --> 00:00:24.180
for a copilot chat.

11
00:00:25.100 --> 00:00:27.720
You can also simply search for just

12
00:00:27.720 --> 00:00:30.540
copilot without chat to find all the

13
00:00:30.540 --> 00:00:32.520
options you have in general for

14
00:00:32.520 --> 00:00:35.100
configuring copilot, both its chat

15
00:00:35.100 --> 00:00:38.060
functionality and its auto-completion

16
00:00:38.060 --> 00:00:38.940
functionality.

17
00:00:40.120 --> 00:00:42.840
You can, for example, control for which

18
00:00:42.840 --> 00:00:45.940
specific languages you want to enable

19
00:00:45.940 --> 00:00:46.980
GitHub Copilot.

20
00:00:47.680 --> 00:00:49.780
By default here for me, it is enabled for

21
00:00:49.780 --> 00:00:52.500
all languages except for the ones which

22
00:00:52.500 --> 00:00:54.280
are explicitly disabled here.

23
00:00:54.600 --> 00:00:56.720
So that for example, in Markdown files, I

24
00:00:56.720 --> 00:00:58.840
don't get GitHub Copilot suggestions.

25
00:00:59.180 --> 00:01:01.080
But if I wanted them there, I could set

26
00:01:01.080 --> 00:01:03.560
this to true or simply remove this entry.

27
00:01:04.580 --> 00:01:05.980
And on the other hand, if you have

28
00:01:05.980 --> 00:01:08.140
certain languages where you don't want

29
00:01:08.140 --> 00:01:10.620
GitHub Copilot to become active, you

30
00:01:10.620 --> 00:01:12.280
can add them here and set them to

31
00:01:12.280 --> 00:01:12.700
false.

32
00:01:13.180 --> 00:01:14.920
So that's one thing that could be

33
00:01:14.920 --> 00:01:15.440
interesting.

34
00:01:16.100 --> 00:01:18.940
Now, you'll also find more GitHub Copilot

35
00:01:18.940 --> 00:01:21.520
and GitHub Copilot chat related settings

36
00:01:21.520 --> 00:01:21.840
here.

37
00:01:22.320 --> 00:01:24.600
And I will also say that they will change

38
00:01:24.600 --> 00:01:25.340
over time.

39
00:01:25.640 --> 00:01:27.940
New settings will be added, other

40
00:01:27.940 --> 00:01:29.520
settings might be removed.

41
00:01:29.660 --> 00:01:32.160
So it's best to simply have a look at these

42
00:01:32.160 --> 00:01:35.040
settings from time to time to see how

43
00:01:35.040 --> 00:01:37.200
you might want to tweak GitHub Copilot

44
00:01:37.200 --> 00:01:39.360
to make sure that it really works the way

45
00:01:39.360 --> 00:01:40.600
you want it to work.

46
00:01:41.360 --> 00:01:44.400
Now two settings I find particularly

47
00:01:44.400 --> 00:01:49.000
noteworthy are this setting here to

48
00:01:49.000 --> 00:01:52.280
support instruction files, which allows

49
00:01:52.280 --> 00:01:57.300
you to add a copilot-instructions.md file,

50
00:01:57.640 --> 00:01:59.920
so a Markdown file with that specific

51
00:01:59.920 --> 00:02:03.120
name in a .github folder in your project.

52
00:02:03.680 --> 00:02:05.840
And you could put your own

53
00:02:05.840 --> 00:02:08.199
instructions, which should be short and

54
00:02:08.199 --> 00:02:09.759
precise into that file.

55
00:02:10.419 --> 00:02:12.260
And if you then enable this setting,

56
00:02:12.460 --> 00:02:14.540
GitHub Copilot would take these

57
00:02:14.540 --> 00:02:17.240
instructions into account whenever it

58
00:02:17.240 --> 00:02:19.800
generates code through its chat

59
00:02:19.800 --> 00:02:20.740
functionality.

60
00:02:21.960 --> 00:02:24.040
So you could, for example, describe a

61
00:02:24.040 --> 00:02:26.980
certain code style you want to enforce in

62
00:02:26.980 --> 00:02:28.500
such a instructions file.

63
00:02:29.339 --> 00:02:32.160
That is not something I'm using in all my

64
00:02:32.160 --> 00:02:34.420
projects, but it is something that can

65
00:02:34.420 --> 00:02:37.200
definitely be helpful in some projects, as

66
00:02:37.200 --> 00:02:40.260
it can help ensure that the code

67
00:02:40.260 --> 00:02:42.980
suggestions and the code snippets

68
00:02:42.980 --> 00:02:46.060
generated by Copilot are correct

69
00:02:46.060 --> 00:02:49.620
immediately or at least a bit sooner than

70
00:02:49.620 --> 00:02:50.760
they otherwise might be.

71
00:02:51.200 --> 00:02:53.520
So putting those instructions into this

72
00:02:53.520 --> 00:02:56.320
file might save you some extra iteration

73
00:02:56.320 --> 00:02:59.640
cycles where you tell Copilot to change

74
00:02:59.640 --> 00:03:00.020
the code.

75
00:03:00.380 --> 00:03:01.520
That's the idea here.

76
00:03:01.620 --> 00:03:03.220
By putting these instructions into this

77
00:03:03.220 --> 00:03:05.540
file, you have a higher chance of getting

78
00:03:05.540 --> 00:03:08.180
suggestions that are the way you want

79
00:03:08.180 --> 00:03:09.500
them right from the start.

80
00:03:10.320 --> 00:03:12.480
So that is one setting you should

81
00:03:12.480 --> 00:03:13.380
consider enabling.

82
00:03:13.840 --> 00:03:16.980
Then you have to add this file in this

83
00:03:16.980 --> 00:03:18.980
specific .github folder, put your

84
00:03:18.980 --> 00:03:21.060
instructions into that file, keep them

85
00:03:21.060 --> 00:03:23.860
short and precise, and see how that

86
00:03:23.860 --> 00:03:27.000
affects the code generations created by

87
00:03:27.000 --> 00:03:27.840
GitHub Copilot.

88
00:03:28.720 --> 00:03:30.780
It is worth noting, as mentioned here,

89
00:03:30.900 --> 00:03:33.320
that poor instructions can actually lead

90
00:03:33.320 --> 00:03:35.240
to worse results than having no

91
00:03:35.240 --> 00:03:38.060
instructions at all, which is why, again,

92
00:03:38.160 --> 00:03:40.100
I'm not using this feature all the time,

93
00:03:40.340 --> 00:03:41.980
but it is worth a closer look.

94
00:03:43.540 --> 00:03:46.020
Now another very useful or very

95
00:03:46.020 --> 00:03:49.840
interesting feature, in my opinion, is this

96
00:03:49.840 --> 00:03:52.740
temporal context feature here.

97
00:03:53.579 --> 00:03:57.240
This feature, when enabled, ensures that

98
00:03:57.240 --> 00:03:59.940
GitHub Copilot automatically takes the

99
00:03:59.940 --> 00:04:04.560
last edited files and the code it saw right

100
00:04:04.560 --> 00:04:08.260
before you start asking a question into

101
00:04:08.260 --> 00:04:08.720
account.

102
00:04:09.040 --> 00:04:11.640
So if you just worked in file A and you

103
00:04:11.640 --> 00:04:15.560
then try to use GitHub Copilot chat in file

104
00:04:15.560 --> 00:04:18.940
B, any code you might have in file A

105
00:04:18.940 --> 00:04:21.700
should hopefully be taken into account

106
00:04:21.700 --> 00:04:24.260
for generating the answer for your

107
00:04:24.260 --> 00:04:26.700
question you might have asked in file B,

108
00:04:27.000 --> 00:04:28.080
so in another file.

109
00:04:28.480 --> 00:04:31.620
So for example, if file A exports a certain

110
00:04:31.620 --> 00:04:34.500
function and a good answer for your

111
00:04:34.500 --> 00:04:38.440
question in file B uses this function, if

112
00:04:38.440 --> 00:04:40.680
that's the case, GitHub Copilot hopefully

113
00:04:40.680 --> 00:04:43.220
takes its knowledge of what it saw in file

114
00:04:43.220 --> 00:04:46.800
A and suggests importing that function

115
00:04:46.800 --> 00:04:48.000
and using that function.

116
00:04:48.380 --> 00:04:50.820
So it simply helps with working with

117
00:04:50.820 --> 00:04:54.020
code that's split across multiple files, for

118
00:04:54.020 --> 00:04:54.560
example.

119
00:04:55.060 --> 00:04:57.460
This temporal context feature can be

120
00:04:57.460 --> 00:04:58.660
very useful for that.

121
00:04:59.460 --> 00:05:02.320
Well, and then as mentioned, there are

122
00:05:02.320 --> 00:05:04.860
more settings and as also mentioned,

123
00:05:05.200 --> 00:05:07.540
settings that are likely to change and

124
00:05:07.540 --> 00:05:08.640
evolve over time.

125
00:05:09.460 --> 00:05:11.260
Simply scroll through them.

126
00:05:11.500 --> 00:05:13.960
Be aware of the fact that there are

127
00:05:13.960 --> 00:05:16.260
things you can configure and play

128
00:05:16.260 --> 00:05:16.960
around with them.

129
00:05:17.360 --> 00:05:19.480
Find the settings that provide the best

130
00:05:19.480 --> 00:05:21.680
results to you because of course the

131
00:05:21.680 --> 00:05:24.260
experience will also change over time

132
00:05:24.260 --> 00:05:26.920
because AI models change and so on.

133
00:05:27.480 --> 00:05:29.380
That's why you should definitely take a

134
00:05:29.380 --> 00:05:30.960
look at these settings and find the

135
00:05:30.960 --> 00:05:32.480
settings that best work for you.

136
00:05:32.980 --> 00:05:34.860
The specific hints I gave you here

137
00:05:34.860 --> 00:05:36.960
hopefully are a good starting point.

