Skip to content

Commit d046df6

Browse files
committed
Update README.md
1 parent 5b40449 commit d046df6

File tree

1 file changed

+7
-18
lines changed

1 file changed

+7
-18
lines changed

README.md

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ Copilot for Xcode is an Xcode Source Editor Extension that provides GitHub Copil
2828
- [Update](#update)
2929
- [Feature](#feature)
3030
- [Key Bindings](#key-bindings)
31-
- [Prevent Suggestions Being Committed](#prevent-suggestions-being-committed)
3231
- [Limitations](#limitations)
3332
- [License](#license)
3433

@@ -148,6 +147,12 @@ If you find that some of the features are no longer working, please first try re
148147

149148
The app can provide real-time code suggestions based on the files you have opened. It's powered by GitHub Copilot and Codeium.
150149

150+
The feature provides two presentation modes:
151+
- Nearby Text Cursor: This mode shows suggestions based on the position of the text cursor.
152+
- Floating Widget: This mode shows suggestions next to the circular widget.
153+
154+
When using the "Nearby Text Cursor" mode, it is recommended to set the real-time suggestion debounce to 0.1.
155+
151156
If you're working on a company project and don't want the suggestion feature to be triggered, you can globally disable it and choose to enable it only for specific projects.
152157

153158
Whenever your code is updated, the app will automatically fetch suggestions for you, you can cancel this by pressing **Escape**.
@@ -189,7 +194,7 @@ You can detach the chat panel by simply dragging it away. Once detached, the cha
189194
| :------: | --------------------------------------------------------------------------------------------------- |
190195
| `⌘W` | Close the chat. |
191196
| `⌘M` | Minimize the chat, you can bring it back with any chat commands or by clicking the circular widget. |
192-
| `⇧↩︎` | Add new line. |
197+
| `⇧↩︎` | Add new line. |
193198

194199
#### Chat Scope
195200

@@ -278,25 +283,9 @@ Essentially using `⌥⇧` as the "access" key combination for all bindings.
278283

279284
Another convenient method to access commands is by using the `⇧⌘/` shortcut to search for a command in the menu bar.
280285

281-
## Prevent Suggestions Being Committed (in comment mode)
282-
283-
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.
284-
285-
```sh
286-
#!/bin/sh
287-
288-
# Check if the commit message contains the string
289-
if git diff --cached --diff-filter=ACMR | grep -q "/*========== Copilot Suggestion"; then
290-
echo "Error: Commit contains Copilot suggestions generated by Copilot for Xcode."
291-
exit 1
292-
fi
293-
```
294-
295286
## Limitations
296287

297-
- The first run of the extension will be slow. Be patient.
298288
- 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.
299-
- 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.
300289

301290
## License
302291

0 commit comments

Comments
 (0)