Skip to content
New issue

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

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

Already on GitHub? # to your account

lsp: Stop server templating files that are no longer Rego #1092

Closed
charlieegan3 opened this issue Sep 10, 2024 · 0 comments · Fixed by #1340
Closed

lsp: Stop server templating files that are no longer Rego #1092

charlieegan3 opened this issue Sep 10, 2024 · 0 comments · Fixed by #1340
Labels
bug Something isn't working language server protocol

Comments

@charlieegan3
Copy link
Member

When a file is renamed from .rego to .foo, the server will continue to template the file until it's opened again as the formatting requests are still sent to it.

Screen.Recording.2024-09-10.at.14.51.33.mov
@charlieegan3 charlieegan3 added the bug Something isn't working label Sep 10, 2024
charlieegan3 added a commit to charlieegan3/regal that referenced this issue Jan 16, 2025
There were two places where a file would be processed after a rename
incorrectly:

- inlay hints were still requests if the file wasn't rego
- new files were still formatting if the file wasn't rego any more

Fixes StyraInc#1092

Signed-off-by: Charlie Egan <charlie@styra.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working language server protocol
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant