Skip to content

Commit bcde92c

Browse files
kbujarimeta-codesync[bot]
authored andcommitted
Add eglot to emacs docs
Summary: Adds setup instructions for the built-in eglot LSP client. Reviewed By: alanz Differential Revision: D85780256 fbshipit-source-id: d977f4ed5da14f4cc8ebb4b71abdec327d5a3b2c
1 parent 217fa9a commit bcde92c

File tree

1 file changed

+24
-4
lines changed
  • website/docs/get-started/editors

1 file changed

+24
-4
lines changed

website/docs/get-started/editors/emacs.md

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,35 @@ sidebar_position: 2
44

55
# Emacs
66

7-
The ELP project can be used as a [language server](https://microsoft.github.io/language-server-protocol/overviews/lsp/overview/) in the Emacs text editor via the [lsp-mode](https://emacs-lsp.github.io/lsp-mode/) LSP client.
7+
The ELP project can be used as a [language server](https://microsoft.github.io/language-server-protocol/overviews/lsp/overview/) in the Emacs text editor via the [eglot](https://github.com/joaotavora/eglot) or [lsp-mode](https://emacs-lsp.github.io/lsp-mode/) LSP clients.
88

9-
## Requirements
9+
## Eglot
1010

11-
### `lsp-mode`
11+
Eglot is part of Emacs core since Emacs 29.
12+
For earlier versions it can be installed with the `eglot` package.
13+
14+
### Configuration
15+
16+
```elisp
17+
(use-package eglot
18+
19+
:config
20+
;; Remove default LSP server
21+
(setopt eglot-server-programs
22+
(assq-delete-all 'erlang-mode eglot-server-programs))
23+
24+
;; Enable ELP
25+
(add-to-list 'eglot-server-programs
26+
'(erlang-mode . ("elp" "server"))
27+
```
28+
29+
Refer to the [manual](https://elpa.gnu.org/devel/doc/eglot.html#Customization-Variables) for additional configuration options.
30+
31+
## lsp-mode
1232

1333
Install the `lsp-mode` package, which is a generic Emacs client for LSP servers. You can follow [these instructions](https://emacs-lsp.github.io/lsp-mode/page/installation/) to install it.
1434

15-
## Configure Emacs
35+
### Configuration
1636

1737
Add the following to your emacs `.emacs` file or equivalent.
1838

0 commit comments

Comments
 (0)