lsp: Expose implemented features in server caps#1867
lsp: Expose implemented features in server caps#1867charlieegan3 merged 1 commit intoopen-policy-agent:mainfrom
Conversation
srenatus
left a comment
There was a problem hiding this comment.
I wish more LSP clients made it possible to act on these. VSCode is best in class, but... helix... kakoune... not really.
|
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"` |
There was a problem hiding this comment.
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!)
There was a problem hiding this comment.
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.
anderseknert
left a comment
There was a problem hiding this comment.
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>
9e3c812 to
7a964b7
Compare
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
This PR follows #1867 To make better support mismatched server and client versions. Signed-off-by: Charlie Egan <charlie_egan@apple.com>
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.