Skip to content

zaucy/zed-starlark

Repository files navigation

Starlark / Bazel support for Zed

Configure the LSP

By default, the extension only loads the Starpls LSP. If your project uses Buck2 or Tilt, you must manually enable the corresponding LSP in your zed settings

To use buck2:

{
  "languages": {
    "Starlark": {
      "language_servers": ["buck2-lsp", "!starpls", "!tilt"]
    }
  }
}

To use tilt:

{
  "languages": {
    "Starlark": {
      "language_servers": ["tilt", "!starpls", "!buck2-lsp"]
    }
  }
}

You can override the path to the LSP binary and its arguments by adding a binary section to your LSP settings (this works for all of starpls, buck2-lsp, and tilt):

{
  "lsp": {
    "starpls": {
      "binary": {
        "path": "/path/to/starpls",
        "arguments": ["server", "--experimental_enable_label_completions"]
      }
    }
  }
}

About

Zed Starlark Extension

Resources

License

Stars

Watchers

Forks

Contributors