Home Explore Blog CI



zed

1st chunk of `docs/src/languages/elm.md`
f29381bb05f0f079dd4f0bbbfc4b2160a196ea8346019f170000000100000518
# Elm

Elm support is available through the [Elm extension](https://github.com/zed-extensions/elm).

- Tree-sitter: [elm-tooling/tree-sitter-elm](https://github.com/elm-tooling/tree-sitter-elm)
- Language Server: [elm-tooling/elm-language-server](https://github.com/elm-tooling/elm-language-server)

## Setup

Zed support for Elm requires installation of `elm`, `elm-format`, and `elm-review`.

1. [Install Elm](https://guide.elm-lang.org/install/elm.html) (or run `brew install elm` on macOS).
2. Install `elm-review` to support code linting:
   ```sh
   npm install elm-review --save-dev
   ```
3. Install `elm-format` to support automatic formatting
   ```sh
   npm install -g elm-format
   ```

## Configuring `elm-language-server`

Elm language server can be configured in your `settings.json`, e.g.:

```json
{
  "lsp": {
    "elm-language-server": {
      "initialization_options": {
        "disableElmLSDiagnostics": true,
        "onlyUpdateDiagnosticsOnSave": false,
        "elmReviewDiagnostics": "warning"
      }
    }
  }
}
```

`elm-format`, `elm-review` and `elm` need to be installed and made available in the environment or configured in the settings. See the [full list of server settings here](https://github.com/elm-tooling/elm-language-server?tab=readme-ov-file#server-settings).

Title: Elm Support in Zed: Setup and Configuration
Summary
This section describes how to set up and configure Zed to support the Elm programming language. It involves installing the Elm extension, as well as the `elm`, `elm-format`, and `elm-review` tools. The configuration of the Elm language server within Zed's `settings.json` file is also explained, detailing options for disabling diagnostics, updating diagnostics on save, and setting the severity of Elm Review diagnostics.