← All extensions

ast-grep LSP

v0.1.1 · by Mathieu Letendre-Jauniaux · added 3 November 2026

ast-grep LSP support in Zed. Get warnings and errors directly in your editor.

Language servers

How to install

With Forge Super installed, the button above opens the app on this extension, where you press Install. Nothing is installed until you do.

You can also open the Extensions panel in the app and search for ast-grep LSP. The extension's id is ast-grep.

Don't have Forge Super yet? Download it here.

README

From the extension's repository, written by its authors and not by Mentenaz. See the source.

Language server protocol (LSP) support for Zed

Setup

Assumes ast-grep is available globally. You must install it yourself and either make it available on the $PATH or manually override the binary path (see below).

Using a non default installation of ast-grep

If you cannot or do not want to have ast-grep globally installed on your system, you must manually specify the path to the ast-grep executable. Note that an absolute path is necessary and placeholders (ex. ~, $HOME) are not expanded.

Example:

{
  "lsp": {
    "ast-grep": {
      "binary": {
        "path": "/Users/user-name/.nix-profile/bin/ast-grep"
      }
    }
  }
}

Passing the sgconfig.yml path to ast-grep

If your sgconfig.yml is not at the project root, you must manually specify it's location in Zed's project specific settings (normally in .zed/settings.json). You can do so by overriding the command line arguments sent to ast-grep but don't forget the lsp argument. Note that an absolute path is necessary and placeholders (ex. ~, $HOME) are not expanded.

{
  "lsp": {
    "ast-grep": {
      "binary": {
        "arguments": [
          "lsp",
          "-c",
          "/Users/user-name/project-name/some-subfolder/sgconfig.yml"
        ]
      }
    }
  }
}

Language Support

Toml

Ast-grep doesn't support toml by default, but it's easy to add it following the instruction for custom languages. Tested with tree-sitter-grammars/tree-sitter-toml.