From 7fb80a2cc5e3f26b89b0520f508e6323487474d6 Mon Sep 17 00:00:00 2001 From: Charlie Egan Date: Tue, 19 Mar 2024 21:00:01 +0100 Subject: [PATCH 1/2] docs: Add note about nvim-lspconfig This adds a note about the availability of the nvim-lspconfig support added in https://github.com/neovim/nvim-lspconfig/pull/3071 Signed-off-by: Charlie Egan --- docs/editor-support.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/editor-support.md b/docs/editor-support.md index 075dbcd3..6e69a991 100644 --- a/docs/editor-support.md +++ b/docs/editor-support.md @@ -11,6 +11,16 @@ and open a workspace with Rego files. The plugin will automatically find and use [Regal config](https://docs.styra.com/regal#configuration). +## Neovim via nvim-lspconfig + +[nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) has native support for the +Regal language server. Provided that you already have the `regal` binary installed, +use the configuration below to enable LSP features in [Neovim](https://neovim.io). + +```lua +require('lspconfig').regal.setup() +``` + ## Neovim via none-ls [none-ls](https://github.com/nvimtools/none-ls.nvim) - Use Neovim as a language server to inject LSP diagnostics, @@ -38,6 +48,6 @@ package test default allowRbac := true ``` -diagnostics may look like this. +Example of the diagnostics in as shown in the UI: ![regal in none-ls](./assets/editors-neovim.png) From b4a0641fad03375f02da39f1f8b59a09eb184e8d Mon Sep 17 00:00:00 2001 From: Charlie Egan Date: Tue, 19 Mar 2024 21:21:14 +0100 Subject: [PATCH 2/2] Remove trailing space --- docs/editor-support.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/editor-support.md b/docs/editor-support.md index 6e69a991..0b151c0c 100644 --- a/docs/editor-support.md +++ b/docs/editor-support.md @@ -13,7 +13,7 @@ The plugin will automatically find and use ## Neovim via nvim-lspconfig -[nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) has native support for the +[nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) has native support for the Regal language server. Provided that you already have the `regal` binary installed, use the configuration below to enable LSP features in [Neovim](https://neovim.io).