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

Add declared types formatter #1185

Merged
merged 2 commits into from
Sep 26, 2023
Merged

Add declared types formatter #1185

merged 2 commits into from
Sep 26, 2023

Conversation

msujew
Copy link
Member

@msujew msujew commented Sep 6, 2023

Closes #1181

Adds formatting for interface and type declarations.

@msujew msujew added grammar Grammar language related issue LSP Language Server Protocol integration labels Sep 6, 2023
@@ -57,6 +59,26 @@ export class LangiumGrammarFormatter extends AbstractFormatter {
formatter.keyword('<').surround(Formatting.noSpace());
formatter.keyword(',').append(Formatting.oneSpace());
formatter.properties('arguments').append(Formatting.noSpace());
} else if (ast.isInterface(node)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some tests would be great. Also to SEE what is happening here. WDYT?

@msujew msujew force-pushed the msujew/add-interface-formatter branch from c9db174 to 049c4b7 Compare September 26, 2023 13:24
@msujew msujew requested a review from Lotes September 26, 2023 13:34
Copy link
Contributor

@Lotes Lotes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, nice test examples :)

@msujew msujew merged commit 2187f83 into main Sep 26, 2023
3 checks passed
@msujew msujew deleted the msujew/add-interface-formatter branch September 26, 2023 17:48
@msujew msujew added this to the v2.1.0 milestone Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grammar Grammar language related issue LSP Language Server Protocol integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

correctly shift comments in interfaces
2 participants