You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11-7Lines changed: 11 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3

4
4
5
-
Copilot for Xcode is an Xcode Source Editor Extension that provides Github Copilot support for Xcode. It uses the LSP provided through [Copilot.vim](https://github.com/github/copilot.vim/tree/release/copilot/dist) to generate suggestions and displays them as comments.
5
+
Copilot for Xcode is an Xcode Source Editor Extension that provides Github Copilot support for Xcode. It uses the LSP provided through [Copilot.vim](https://github.com/github/copilot.vim/tree/release/copilot/dist) to generate suggestions and displays them as comments or in a separate window.
6
6
7
7
Thanks to [LSP-copilot](https://github.com/TerminalFi/LSP-copilot) for showing the way to interact with Copilot. And thanks to [LanguageClient](https://github.com/ChimeHQ/LanguageClient) for the Language Server Protocol support in Swift.
8
8
@@ -69,6 +69,8 @@ Then set it up with the following steps:
69
69
70
70
The first time the commands are run, the extension will ask for the necessary permissions. (except Input Monitoring, you have to enable it manually)
71
71
72
+
If you encounter an alert requesting permission that you have previously granted, please remove the permission from the list and add it again to re-grant the necessary permissions.
73
+
72
74
Or you can grant them manually by going to the `Privacy & Security` tab in `System Settings.app`, and
73
75
- Accessibility API: Click `Accessibility`, and drag `CopilotForXcodeExtensionService.app` to the list.
74
76
- Input Monitoring (If you need real-time suggestions): Click `Input Monitoring` and drag `CopilotForXcodeExtensionService.app` to the list.
Alternatively, You can download the latest version manually from the latest [release](https://github.com/intitni/CopilotForXcode/releases).
91
93
92
-
If you are upgrading from a version lower than 0.7.0, please run `Copilot for Xcode.app` at least once to let it set up the new launch agent for you.
94
+
If you are upgrading from a version lower than 0.8.0, please run `Copilot for Xcode.app` at least once to let it set up the new launch agent for you.
93
95
94
96
If you want to keep track of the new releases, you can watch the releases of this repo to get notifications about updates.
95
97
@@ -108,14 +110,16 @@ If you find that some of the features are no longer working, please first try re
108
110
109
111
**About real-time suggestions**
110
112
111
-
The on/off state is persisted, so be sure to turn it off manually when you no longer want it. When real-time suggestion is turned on, a breathing dot will show up next to the mouse pointer or the editing cursor.
113
+
The on/off state is persisted, so be sure to turn it off manually when you no longer want it. When real-time suggestion is turned on, a dot will show up next to the text cursor.
112
114
113
-
Whenever you stop typing for a few seconds, the app will automatically fetch suggestions for you, you can cancel this by clicking the mouse, or pressing **Escape** or the **arrow keys**.
115
+
Whenever you stop typing for a few milliseconds, the app will automatically fetch suggestions for you, you can cancel this by clicking the mouse, or pressing **Escape** or the **arrow keys**.
114
116
115
-
When a fetch occurs, the dot will have a slightly different animation. If you don't see it, your permissions may not be set correctly.
117
+
When a fetch occurs, the dot will play an animation. If you don't see it, your permissions may not be set correctly.
116
118
117
119
The implementation won't feel as smooth as that of VSCode. The magic behind it is that it will keep calling the command from the menu when you are not typing or clicking the mouse. So it will have to listen to those events, I am not sure if people like it. Hope that next year, Apple can spend some time on Xcode Extensions.
118
120
121
+
It will be a better experience if you use the "Floating Widget" mode with real-time suggestions turned on.
122
+
119
123
## Key Bindings
120
124
121
125
It looks like there is no way to add default key bindings to commands, but you can set them up in `Xcode settings > Key Bindings`.
@@ -132,7 +136,7 @@ A [recommended setup](https://github.com/intitni/CopilotForXcode/issues/14) that
132
136
133
137
Essentially using `⌥⇧` as the "access" key combination for all bindings.
134
138
135
-
## Prevent Suggestions Being Committed
139
+
## Prevent Suggestions Being Committed (in comment mode)
136
140
137
141
Since the suggestions are presented as comments, they are in your code. If you are not careful enough, they can be committed to your git repo. To avoid that, I would recommend adding a pre-commit git hook to prevent this from happening.
138
142
@@ -150,7 +154,7 @@ fi
150
154
151
155
- The first run of the extension will be slow. Be patient.
152
156
- The extension uses some dirty tricks to get the file and project/workspace paths. It may fail, it may be incorrect, especially when you have multiple Xcode windows running, and maybe even worse when they are in different displays. I am not sure about that though.
153
-
- The suggestions are presented as C-style comments, they may break your code if you are editing a JSON file or something.
157
+
- The suggestions are presented as C-style comments in comment mode, they may break your code if you are editing a JSON file or something.
0 commit comments