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

Respect editorconfig #28

Open
muuvmuuv opened this issue Dec 19, 2022 · 2 comments
Open

Respect editorconfig #28

muuvmuuv opened this issue Dec 19, 2022 · 2 comments

Comments

@muuvmuuv
Copy link

It would be cool if while formatting it could use editorconfig settings.

@slomkowski
Copy link
Owner

This is good idea! I looked at the EditorConfig specification and properties match the structure of nginx config file. I'll only accept solution which doesn't use 3rd-party libraries, since I want to keep nginxfmt as portable as possible.

@muuvmuuv are you willing to implement this feature?

@muuvmuuv
Copy link
Author

muuvmuuv commented Feb 7, 2023

Not yet, but had a look, there is https://pypi.org/project/EditorConfig/#description which works. But some works needs to be done for it to be ready and I don't know if you want dependencies:

  • tests are file only so no editorconfig in this tpm context
  • format_string should look in process dir
  • format_file recursive look in file dir upwards
  • test global editorconfig
  • test glob group config [*.conf]
  • you can also ask chatgpt to write a simple parser :D

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

No branches or pull requests

2 participants