Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement textDocument/formatting #641

Merged
merged 1 commit into from
Apr 11, 2024
Merged

Implement textDocument/formatting #641

merged 1 commit into from
Apr 11, 2024

Conversation

anderseknert
Copy link
Member

Although currently disabled in server capabilities while we work out how this should work with VS Code, where there is already a client-side formatter registered.

Although currently disabled in server capabilities while we
work out how this should work with VS Code, where there is
already a client-side formatter registered.

Signed-off-by: Anders Eknert <anders@styra.com>
@charlieegan3 charlieegan3 merged commit 8de5461 into main Apr 11, 2024
3 checks passed
@charlieegan3 charlieegan3 deleted the formatting branch April 11, 2024 09:13
charlieegan3 added a commit that referenced this pull request Apr 11, 2024
In #641 support was added to
handle textDocument/formatting requests from clients. However, the
functionality was disabled for fear that users would see a confusing
message:

#638 (comment)

In open-policy-agent/vscode-opa#148 the regal
formatter will be used if the user has enabled regal and opa fmt will be
used if not. This means that there is only ever one formatter available
for rego and the user will see no message.

Signed-off-by: Charlie Egan <charlie@styra.com>
charlieegan3 added a commit that referenced this pull request Apr 11, 2024
In #641 support was added to
handle textDocument/formatting requests from clients. However, the
functionality was disabled for fear that users would see a confusing
message:

#638 (comment)

In open-policy-agent/vscode-opa#148 the regal
formatter will be used if the user has enabled regal and opa fmt will be
used if not. This means that there is only ever one formatter available
for rego and the user will see no message.

Signed-off-by: Charlie Egan <charlie@styra.com>
anderseknert pushed a commit that referenced this pull request Apr 11, 2024
In #641 support was added to
handle textDocument/formatting requests from clients. However, the
functionality was disabled for fear that users would see a confusing
message:

#638 (comment)

In open-policy-agent/vscode-opa#148 the regal
formatter will be used if the user has enabled regal and opa fmt will be
used if not. This means that there is only ever one formatter available
for rego and the user will see no message.

Signed-off-by: Charlie Egan <charlie@styra.com>
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
Although currently disabled in server capabilities while we
work out how this should work with VS Code, where there is
already a client-side formatter registered.

Signed-off-by: Anders Eknert <anders@styra.com>
srenatus pushed a commit to srenatus/regal that referenced this pull request Oct 1, 2024
In StyraInc#641 support was added to
handle textDocument/formatting requests from clients. However, the
functionality was disabled for fear that users would see a confusing
message:

StyraInc#638 (comment)

In open-policy-agent/vscode-opa#148 the regal
formatter will be used if the user has enabled regal and opa fmt will be
used if not. This means that there is only ever one formatter available
for rego and the user will see no message.

Signed-off-by: Charlie Egan <charlie@styra.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.

2 participants