Skip to content

Offline, privacy-first grammar checker. Fast, open-source, Rust-powered

docs(emacs): improve page

Matthew Espinoa33f97d3233e
diff --git a/packages/web/src/routes/docs/integrations/emacs/+page.md b/packages/web/src/routes/docs/integrations/emacs/+page.md
index 94e3f8e73..7d6552cf2 100644
--- a/packages/web/src/routes/docs/integrations/emacs/+page.md
+++ b/packages/web/src/routes/docs/integrations/emacs/+page.md
@@ -4,13 +4,11 @@ title: Emacs
Our Emacs integration is powered by [`harper-ls`](./language-server).
-## Installation
+## Required Setup
-Since version 29, Emacs has had native support for the Language Server Protocol through [Eglot](https://www.gnu.org/software/emacs/manual/html_mono/eglot.html), so all you have to do is [install `harper-ls` in your system](./language-server#Installation).
+Make sure you have [`harper-ls` installed](./language-server#Installation) in your system and available in your `PATH`.
-## Configuration
-
-This the minimum you need to add to your `init.el` to get up and running:
+Since version 29, Emacs has had native support for the Language Server Protocol through [Eglot](https://www.gnu.org/software/emacs/manual/html_mono/eglot.html), so all you have to do is configure it to use `harper-ls` in your `init.el`:
```elisp title=init.el
(with-eval-after-load 'eglot
@@ -18,7 +16,17 @@ This the minimum you need to add to your `init.el` to get up and running:
'(major-mode . ("harper-ls" "--stdio"))))
```
-`major-mode` can be set to any, some, or all major modes that correspond to the [languages that `harper-ls` supports](./language-server#Supported-Languages). Additionally, you can also configure things like which linters to use or how you want code actions to appear. Below is an example config where everything is set to their default values:
+where `major-mode` can be set to any, some, or all major modes that correspond to the [languages `harper-ls` supports](./language-server#Supported-Languages). For example, if you want to use `harper-ls` to edit Markdown files and you have [`markdown-mode`](https://jblevins.org/projects/markdown-mode) installed, you can configure it like this:
+
+```elisp title=init.el
+(with-eval-after-load 'eglot
+ (add-to-list 'eglot-server-programs
+ '(markdown-mode . ("harper-ls" "--stdio"))))
+```
+
+## Optional Configuration
+
+Additionally, you can also configure things like which linters to use or how you want code actions to appear. Below is an example config where everything is set to their default values:
```elisp title=init.el
(setq-default eglot-workspace-configuration