Move completion handler into Rego router#1699
Merged
anderseknert merged 1 commit intoopen-policy-agent:mainfrom Sep 29, 2025
Merged
Move completion handler into Rego router#1699anderseknert merged 1 commit intoopen-policy-agent:mainfrom
anderseknert merged 1 commit intoopen-policy-agent:mainfrom
Conversation
1df9eac to
0851601
Compare
charlieegan3
approved these changes
Sep 29, 2025
| return inlayhint.FromModule(module, bis), nil | ||
| } | ||
|
|
||
| func (l *LanguageServer) handleTextDocumentCompletion(ctx context.Context, params types.CompletionParams) (any, error) { |
Member
Author
There was a problem hiding this comment.
Up next is the rest of the text document handlers. But first, we feast! 🎉
Although many completion providers have been Rego based since a long time back, these providers used their own input format, and a separate prepared query — not at all integrated with other Rego handlers. No more! All completion providers are now 100% Rego-based, and use the same Rego router entrypoint as all other Rego handlers. Since the input format now mirrors what the LSP client sends, a whole lot of tests had to be updated. Also the usual style fixes here and there.. although I tried to show some restrain :) Signed-off-by: Anders Eknert <anders@eknert.com>
0851601 to
fb31fa8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Although many completion providers have been Rego based since a long time back, these providers used their own input format, and a separate prepared query — not at all integrated with other Rego handlers. No more! All completion providers are now 100% Rego-based, and use the same Rego router entrypoint as all other Rego handlers. Since the input format now mirrors what the LSP client sends, a whole lot of tests had to be updated.
Also the usual style fixes here and there.. although I tried to show some restraint :)