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

Ctrl+Shift+F does not work correctly #24

Open
friederbluemle opened this issue Aug 28, 2013 · 8 comments
Open

Ctrl+Shift+F does not work correctly #24

friederbluemle opened this issue Aug 28, 2013 · 8 comments
Labels
Issue A defect or bug which renders one or more features unusable under certain circumstances Pending Feedback The submitter or any supporter of the issue must provide additional information

Comments

@friederbluemle
Copy link

friederbluemle commented Aug 28, 2013

When applying the auto-formatter, this plugin does not correctly format Gherkin feature files.

Before:
image

After:
image

Note the incorrect indentation, mix of tabs and spaces, and appended spaces.

Is there a way to customize the formatter or does this require a fix in the plugin iteself?

@rlogiacco
Copy link
Owner

Quick answer: it requires a plugin fix.

Long Answer
This issue is a consequence of the syntax definition. I've tried everything I was aware of with regards of defining the correct parser within Xtext, apparently I wasn't able to find a way to do it properly.

A solution for this and many other issues would be to replace the generated Xtext parser with the official gherkin parser which is used by Cucumber-JVM. To achieve such result though I need some help as there's a lot of information I'm missing.

Someone with good knowledge of Antlr or Xtext would really be helpful on this: do you know anybody willing to contribute?

@github-actions
Copy link

This issue has not been updated for a while: marking it as stale.

@github-actions github-actions bot added the Stale Probably not relevant anymore and to be closed label May 29, 2020
@friederbluemle
Copy link
Author

Thanks @github-actions 😂

@drkstr101
Copy link
Contributor

This is fixable using the new formatting2 API in latest Xtext.

I am flagging this issue for review in next

@rlogiacco rlogiacco added Pending Feedback The submitter or any supporter of the issue must provide additional information and removed Stale Probably not relevant anymore and to be closed labels May 30, 2020
@github-actions
Copy link

This issue has not been updated for a while: marking it as stale.

@github-actions github-actions bot added the Stale Probably not relevant anymore and to be closed label Jul 30, 2020
@github-actions github-actions bot closed this as completed Aug 6, 2020
@friederbluemle
Copy link
Author

Can we please keep this open until the pending work/feedback is resolved?

@drkstr101
Copy link
Contributor

@rlogiacco I agree, this is still an unresolved issue. It has improved somewhat in current master (unreleased as of yet), but won't be fully supported until the 1.0 milestone release.

The current behavior in master is to simply preserve the existing Narrative formatting. Later we can add rules for things like whitespace cleanup or auto-indent.

@rlogiacco rlogiacco reopened this Aug 7, 2020
@github-actions github-actions bot removed the Stale Probably not relevant anymore and to be closed label Aug 12, 2020
@drkstr101
Copy link
Contributor

@rlogiacco This can be closed with #86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue A defect or bug which renders one or more features unusable under certain circumstances Pending Feedback The submitter or any supporter of the issue must provide additional information
Projects
None yet
Development

No branches or pull requests

3 participants