Skip to content

Commit

Permalink
Add Regal language server support
Browse files Browse the repository at this point in the history
This is WIP but getting there. There are a few changes here:

* The extension has been extended to support one or more language servers for Rego. Currently only [Regal](https://github.com/StyraInc/regal). These are started based on configuration and can also be installed if the user desires.
* The OPA installation logic and downloader has been made generic to support fetching of regal and other binaries as needed in future.
* Language servers are promoted to users if they are not installed.

Some suggested follow on work:

* make binary dependency checking generic, and use server module for OPA checking
* make finding of binary paths more generic

TODOs still include:

- [ ] testing of this change on a windows machine
- [ ] testing of this change on a linux machine
- [ ] Updating Regal and sharing a patch release with a minor LS change (0.16.1) (StyraInc/regal#539)

Signed-off-by: Charlie Egan <[email protected]>
  • Loading branch information
charlieegan3 committed Feb 6, 2024
1 parent d3ed1f2 commit d4dc2ad
Show file tree
Hide file tree
Showing 16 changed files with 2,315 additions and 1,785 deletions.
8 changes: 1 addition & 7 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"eg2.tslint"
]
}
{}
8 changes: 6 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"version": "0.2.0",
"configurations": [
{
"name": "Extension",
Expand All @@ -16,7 +16,11 @@
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "npm: watch"
"autoAttachChildProcesses": true,
"preLaunchTask": {
"type": "npm",
"script": "watch"
}
},
{
"name": "Extension Tests",
Expand Down
Loading

0 comments on commit d4dc2ad

Please sign in to comment.