colindean / hejmo

My home directory and package management stuff, inelegant as it may be
17 stars 1 forks source link

Build an editorconfig conformance tool around binary #20

Open colindean opened 3 years ago

colindean commented 3 years ago

EditorConfig has a binary easily installed with Homebrew. This binary takes a path and splits out the config for that file. Build something around this and find or fd that

colindean commented 3 years ago

It'd be invoked something like fd . --absolute-path --exec editorconfig-changes {} or fd . --absolute-path | editorconfig - | editorconfig_check-for-patch.

editorconfig if given just one file spits out key=value pairs but spits out INI (may be TOML?) when given multiple files, in the format

[/home/colin/Source/something/pandoc-crossref.yaml]
end_of_line=lf
insert_final_newline=true
charset="utf-8"
trim_trailing_whitespace="false"
[/home/colin/Source/something/refs.bibtex]
end_of_line=lf
insert_final_newline=true
charset="utf-8"
trim_trailing_whitespace="false"