From 1e001807f3cecb621bf63719ae3ee7841f4b5977 Mon Sep 17 00:00:00 2001 From: Anders Eknert Date: Tue, 4 Jun 2024 13:50:59 +0200 Subject: [PATCH] Add info on Zed extension Signed-off-by: Anders Eknert --- README.md | 3 ++- docs/editor-support.md | 11 +++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 848ef550..29b9d80e 100644 --- a/README.md +++ b/README.md @@ -610,7 +610,8 @@ but also for OPA [strict mode](https://www.openpolicyagent.org/docs/latest/polic In order to support linting directly in editors and IDE's, Regal implements parts of the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/) (LSP). With Regal installed and available on your `$PATH`, editors like VS Code (using the -[OPA extension](https://github.com/open-policy-agent/vscode-opa)) can leverage Regal for diagnostics, i.e. linting, +[OPA extension](https://github.com/open-policy-agent/vscode-opa)) and Zed (using the +[zed-rego](https://github.com/StyraInc/zed-rego) extension) can leverage Regal for diagnostics, i.e. linting, and have the results displayed directly in your editor as you work on your Rego policies. The Regal LSP implementation doesn't stop at linting though — it'll also provide features like tooltips on hover, go to definition, and document symbols helping you easily navigate the Rego code in your workspace. diff --git a/docs/editor-support.md b/docs/editor-support.md index 0b151c0c..ead8f5f4 100644 --- a/docs/editor-support.md +++ b/docs/editor-support.md @@ -8,8 +8,15 @@ the official OPA extension for Visual Studio Code - now supports the Regal langu To see Regal linting as you work, install the extension at version `0.13.3` or later and open a workspace with Rego files. -The plugin will automatically find and use -[Regal config](https://docs.styra.com/regal#configuration). +The plugin will automatically find and use [Regal config](https://docs.styra.com/regal#configuration). + +## Zed + +[Zed](https://zed.dev) is a modern open-source code editor with focus on performance and simplicity. + +Zed supports Rego via Regal and the [zed-rego](https://github.com/StyraInc/zed-rego) extension developed by the Styra +community. The extension provides syntax highlighting, linting, and all the other language server features provided by +Regal. ## Neovim via nvim-lspconfig