Skip to content

Commit f0ce177

Browse files
committed
new Copilot page
1 parent f7626f7 commit f0ce177

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

content/en/usage/copilot.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: Copilot
3+
weight: 20
4+
---
5+
6+
Lem supports Copilot completions.
7+
8+
While editing a source file, Lem shows completions in an
9+
overlay. Below it suggests a function body for factorial, and we see
10+
Lem's function signature default help.
11+
12+
<a href="/copilot.png"> <img class="" src="/copilot.png" alt="Lem suggests GitHub Copilot completions in an overlay." style="max-width: 60%"> </a>
13+
14+
You might need to install the Copilot dependencies (see below).
15+
16+
## Login
17+
18+
To login, use `M-x copilot-login`.
19+
20+
After logging in, open a source file and edit it. The completion will be performed.
21+
22+
## Browsing and accepting changes
23+
24+
Use `Tab` to accept a suggestion (`copilot-accept-suggestion`)
25+
26+
See the next suggestion with `M-n` (`copilot-next-suggestion`),
27+
28+
see the previous one with `M-p`.
29+
30+
31+
## Other commands
32+
33+
`M-x copilot-install-server`: install the required npm `copilot-node-server` dependency.
34+
35+
`M-x copilot-restart`: restart the Copilot process.
36+
37+
38+
## Configuration
39+
40+
Lem's Copilot mode uses the `*copilot-completion-keymap*` keymap to
41+
define keys, inside the Lisp package `lem-copilot`.
42+
43+
You can change `copilot-suggestion-attribute` that defaults to "dark gray":
44+
45+
```lisp
46+
(define-attribute copilot-suggestion-attribute
47+
(t :foreground "dark gray"))
48+
```
49+
50+
You can find logs in the `copilot/` directory of your `(lem-home)`.

static/copilot.png

69.9 KB
Loading

0 commit comments

Comments
 (0)