1# Completions
2
3Zed supports supports two sources for completions:
4
51. "Code Completions" provided by Language Servers (LSPs) automatically installed by Zed or via [Zed Language Extensions](languages.md).
62. "Inline Completions" provided by external APIs like [GitHub Copilot](#github-copilot) or [Supermaven](#supermaven).
7
8## Code Completions
9
10When there is an appropriate language server available, Zed will by-default provide completions of variable names, functions, and other symbols in the current file. You can disable these by adding the following to your zed settings.json file:
11
12```json
13"show_completions_on_input": false
14```
15
16You can manually trigger completions with `ctrl-space` or by triggering the `editor::ShowCompletions` action from the command palette.
17
18For more information, see:
19
20- [Configuring Supported Languages](./configuring-languages.md)
21- [List of Zed Supported Languages](./languages.md).
22
23## Configuring Inline Completions
24
25### GitHub Copilot
26
27To use GitHub Copilot (enabled by default), add the following to your `settings.json`:
28
29```json
30{
31 "features": {
32 "inline_completion_provider": "copilot"
33 }
34}
35```
36
37You should be able to sign-in to GitHub Copilot by clicking on the Copilot icon in the status bar and following the setup instructions.
38
39### Supermaven
40
41To use Supermaven, add the following to your `settings.json`:
42
43```json
44{
45 "features": {
46 "inline_completion_provider": "supermaven"
47 }
48}
49```
50
51You should be able to sign-in to Supermaven by clicking on the Supermaven icon in the status bar and following the setup instructions.
52
53## Using Inline completions
54
55Once you have configured an Inline Completions provider, you can start using inline completions in your code. Inline completions will appear as you type, and you can accept them by pressing `tab` or `enter` or hide them by pressing `esc`.
56
57There a number of actions/shortcuts available to interact with inline completions:
58
59- `editor: accept inline completion` (`tab`): To accept the current inline completion
60- `editor: accept partial inline completion` (`cmd-right`): To accept the current inline completion up to the next word boundary
61- `editor: show inline completion` (`alt-\`): Trigger a inline completion request manually
62- `editor: next inline completion` (`alt-]`): To cycle to the next inline completion
63- `editor: previous inline completion` (`alt-[`): To cycle to the previous inline completion
64
65### Disabling Inline-Completions
66
67To disable completions that appear automatically as you type, add the following to your `settings.json`:
68
69```json
70{
71 "show_inline_completions": false
72}
73```
74
75You can trigger inline completions manually by executing `editor: show inline completion` (`alt-\\`).
76
77You can also add this as a language-specific setting in your `settings.json` to disable inline completions for a specific language:
78
79```json
80{
81 "language": {
82 "python": {
83 "show_inline_completions": false
84 }
85 }
86}
87```
88
89## See also
90
91You may also use the Assistant Panel or the Inline Assistant to interact with language models, see the [assistant](assistant/assistant.md) documentation for more information.