Skip to content

lsp: Expose implemented features in server caps#1867

Merged
charlieegan3 merged 1 commit intoopen-policy-agent:mainfrom
charlieegan3:exp-feature-flags
Feb 16, 2026
Merged

lsp: Expose implemented features in server caps#1867
charlieegan3 merged 1 commit intoopen-policy-agent:mainfrom
charlieegan3:exp-feature-flags

Conversation

@charlieegan3
Copy link
Copy Markdown
Contributor

@charlieegan3 charlieegan3 commented Feb 12, 2026

This will allow clients to determine what UI functionality to load. These caps are sent to the clients as part of the init and so we can use the data to decide what to do.

Copy link
Copy Markdown
Contributor

@srenatus srenatus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish more LSP clients made it possible to act on these. VSCode is best in class, but... helix... kakoune... not really.

@charlieegan3
Copy link
Copy Markdown
Contributor Author

charlieegan3 commented Feb 12, 2026

Yes indeed. This is mostly done with VSCode in mind and future regal / client changes being able to sync up.

Hopefully other editors will follow suit, and make this more generally valuable.

EvalProvider bool `json:"evalProvider"`
// DebugProvider indicates whether the server supports the regal.debug
// command and regal/startDebugging request.
DebugProvider bool `json:"debugProvider"`
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm thinking we'll most likely want to move as much of the init handler into Rego sooner rather than later .. which makes me wonder if we want to user snake_case for serialized names instead? 🤔 There's no way to do have this done in Rego without actually naming rules like debugProvider, etc.. and that'll need inline ignores, not to mention of course that it won't be very Rego'y :)

(aside, it'd be pretty cool if metadata annotations could provide hints about how a Rego object should be serialized!)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps, and we do have control of these for the client and the server.

However, others like hoverProvider will need to remain the same regardless of the Go/Rego implementation as that's the spec.

I think my preference for now is to use the same style as the existing field names.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point!

Copy link
Copy Markdown
Member

@anderseknert anderseknert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just added a comment to consider!

This will allow clients to determine what UI functionality to load.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
@charlieegan3 charlieegan3 enabled auto-merge (squash) February 16, 2026 11:49
@charlieegan3 charlieegan3 merged commit 7d26e9f into open-policy-agent:main Feb 16, 2026
8 checks passed
@charlieegan3 charlieegan3 deleted the exp-feature-flags branch February 16, 2026 11:56
charlieegan3 added a commit to charlieegan3/regal that referenced this pull request Feb 16, 2026
This PR follows
open-policy-agent#1867

To make better support mismatched server and client versions.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
charlieegan3 added a commit to charlieegan3/regal that referenced this pull request Feb 17, 2026
This PR follows
open-policy-agent#1867

To make better support mismatched server and client versions.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
charlieegan3 added a commit to charlieegan3/vscode-opa that referenced this pull request Feb 17, 2026
We are using the 'experimental' feature flagging option
in init options for Regal to signal what it can do.

open-policy-agent/regal#1867 This is the client
side of the same for the client to show what it can do.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
charlieegan3 added a commit to charlieegan3/vscode-opa that referenced this pull request Feb 17, 2026
We are using the 'experimental' feature flagging option
in init options for Regal to signal what it can do.

open-policy-agent/regal#1867 This is the client
side of the same for the client to show what it can do.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
charlieegan3 added a commit to charlieegan3/vscode-opa that referenced this pull request Feb 17, 2026
We are using the 'experimental' feature flagging option
in init options for Regal to signal what it can do.

open-policy-agent/regal#1867 This is the client
side of the same for the client to show what it can do.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
charlieegan3 added a commit to charlieegan3/regal that referenced this pull request Feb 17, 2026
This PR follows
open-policy-agent#1867

To make better support mismatched server and client versions.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
charlieegan3 added a commit to charlieegan3/regal that referenced this pull request Feb 17, 2026
This PR follows
open-policy-agent#1867

To make better support mismatched server and client versions.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
charlieegan3 added a commit to charlieegan3/regal that referenced this pull request Feb 17, 2026
This PR follows
open-policy-agent#1867

To make better support mismatched server and client versions.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
charlieegan3 added a commit to charlieegan3/regal that referenced this pull request Feb 17, 2026
This PR follows
open-policy-agent#1867

To make better support mismatched server and client versions.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
charlieegan3 added a commit to charlieegan3/vscode-opa that referenced this pull request Feb 17, 2026
We are using the 'experimental' feature flagging option
in init options for Regal to signal what it can do.

open-policy-agent/regal#1867 This is the client
side of the same for the client to show what it can do.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
charlieegan3 added a commit to charlieegan3/vscode-opa that referenced this pull request Feb 17, 2026
We are using the 'experimental' feature flagging option
in init options for Regal to signal what it can do.

open-policy-agent/regal#1867 This is the client
side of the same for the client to show what it can do.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
charlieegan3 added a commit to charlieegan3/regal that referenced this pull request Feb 17, 2026
This PR follows
open-policy-agent#1867

To make better support mismatched server and client versions.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
charlieegan3 added a commit to charlieegan3/regal that referenced this pull request Feb 17, 2026
This PR follows
open-policy-agent#1867

To make better support mismatched server and client versions.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
charlieegan3 added a commit to open-policy-agent/vscode-opa that referenced this pull request Feb 17, 2026
We are using the 'experimental' feature flagging option
in init options for Regal to signal what it can do.

open-policy-agent/regal#1867 This is the client
side of the same for the client to show what it can do.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
charlieegan3 added a commit to charlieegan3/regal that referenced this pull request Feb 17, 2026
This PR follows
open-policy-agent#1867

To make better support mismatched server and client versions.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
charlieegan3 added a commit that referenced this pull request Feb 17, 2026
This PR follows
#1867

To make better support mismatched server and client versions.

Signed-off-by: Charlie Egan <charlie_egan@apple.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants