Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Add note about nvim-lspconfig #604

Merged
merged 2 commits into from
Mar 19, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion docs/editor-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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)
Loading