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

Consume .editorconfig for configuration #45

Open
tyvsmith opened this issue May 29, 2020 · 3 comments
Open

Consume .editorconfig for configuration #45

tyvsmith opened this issue May 29, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@tyvsmith
Copy link

https://editorconfig.org/ is a simple standard that both KTLint and Intellij can consume from. This would be a nice addition to ktfmt to allow for more configuration when needed without custom APIs/params in the tool.

@cgrushko
Copy link
Contributor

What did you have in mind?
Something like that?

[*.kt]
indent_size = 4 # or 2

(ktfmt only supports one flag: --dropbox-style.)

@tyvsmith
Copy link
Author

tyvsmith commented May 29, 2020

Here's our current one at Uber. Intellij and Ktlint will read from this for indent_size, continuation_indent_size, and max length (I believe)

[*.{kt,kts}]
indent_size=2
continuation_indent_size=4
insert_final_newline=true
max_line_length=120
disabled_rules=package-name

@hick209 hick209 added the enhancement New feature or request label Jul 30, 2020
@knobo
Copy link

knobo commented Mar 30, 2022

If there is any interest I could work some more on #303 until it is usable.

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

4 participants