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

Feature Request: Integrate Code Formatting and Prettification Options #5

Open
blackkspydo opened this issue Mar 16, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@blackkspydo
Copy link
Contributor

Problem Statement

As of now, the "codeverter" website does not provide users with the ability to automatically format or prettify their converted code. Including code formatting and prettification options would enhance the readability and maintainability of the generated code, leading to an improved user experience.

Proposed Solution

I propose implementing a user-friendly interface element, such as a button, that allows users to opt for automatic code formatting and prettification during the code conversion process. The selected formatting preferences should be applied to the converted code before it is displayed to the user.

To achieve this functionality, consider integrating existing, well-established code formatting libraries (e.g., Prettier etc.) that are compatible with various programming languages. This might need user to select the programming language they are converting from.

@TGlide TGlide added the enhancement New feature or request label Mar 16, 2023
@TGlide
Copy link
Owner

TGlide commented Mar 16, 2023

I believe the converted code already has pretty good formatting, but this could further improve that. I don't think however that it should be toggleable, as formatted code will always be preferred IMO.

We can add Prettier to the output, before it is highlighted. I've done something similar in the past that may help: https://github.com/appwrite/pink/blob/main/apps/pink/src/components/CodePreview.svelte

If you want to tackle this, let me know and I'll assign you 😄

@blackkspydo
Copy link
Contributor Author

I actually forgot to mention. I meant formatting on input data. it might me copied from somewhere and user might want to view it one last time before conversion so implementing it actually makes sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants