Skip to content

Commit

Permalink
new Copilot page
Browse files Browse the repository at this point in the history
  • Loading branch information
vindarel committed Oct 18, 2024
1 parent f7626f7 commit f0ce177
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions content/en/usage/copilot.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: Copilot
weight: 20
---

Lem supports Copilot completions.

While editing a source file, Lem shows completions in an
overlay. Below it suggests a function body for factorial, and we see
Lem's function signature default help.

<a href="/copilot.png"> <img class="" src="/copilot.png" alt="Lem suggests GitHub Copilot completions in an overlay." style="max-width: 60%"> </a>

You might need to install the Copilot dependencies (see below).

## Login

To login, use `M-x copilot-login`.

After logging in, open a source file and edit it. The completion will be performed.

## Browsing and accepting changes

Use `Tab` to accept a suggestion (`copilot-accept-suggestion`)

See the next suggestion with `M-n` (`copilot-next-suggestion`),

see the previous one with `M-p`.


## Other commands

`M-x copilot-install-server`: install the required npm `copilot-node-server` dependency.

`M-x copilot-restart`: restart the Copilot process.


## Configuration

Lem's Copilot mode uses the `*copilot-completion-keymap*` keymap to
define keys, inside the Lisp package `lem-copilot`.

You can change `copilot-suggestion-attribute` that defaults to "dark gray":

```lisp
(define-attribute copilot-suggestion-attribute
(t :foreground "dark gray"))
```

You can find logs in the `copilot/` directory of your `(lem-home)`.
Binary file added static/copilot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f0ce177

Please sign in to comment.