StyraInc / regal

Regal is a linter and language server for Rego, bringing your policy development experience to the next level!
https://docs.styra.com/regal
Apache License 2.0
251 stars 34 forks source link

`setTrace` method support #997

Open nikpivkin opened 3 weeks ago

nikpivkin commented 3 weeks ago

This would help improve the debugging of LSP. This is not currently implemented (or I'm missing something) and VS Code displays the following message:

2024/08/19 20:41:24 jsonrpc2 handler: notification "$/setTrace" handling error: jsonrpc2: code -32601 message: method not supported: $/setTrace
charlieegan3 commented 3 weeks ago

Hey @nikpivkin, thanks for filing this issue. You are correct that this is a feature the Regal language server does not currently support - yet!

It looks like we'd need to support off, messages and verbose options.

If configured, the server should send $/logTrace notifications.

Did you have a particular issue that you were trying to get to the bottom of when considering this? Currently, we just log to standard error when there's a message.

nikpivkin commented 3 weeks ago

Hi @charlieegan3 thanks

No, I haven't encountered a single problem. Just wanted to explore the server.