How open would you be to adding support for a new "format" key, to allow users define formatters (in the formatprg and formatexpr sense)? I have a working prototype on my local, and if you were not against this in principle, I could mop it up and open a PR for it.
High level, this is what I got so far:
- New "format" key; its value can either a string or a list of strings
- Note: when formatting Python files, you might end up using
black together with isort; I figured it would be easier to support this (i.e., multiple formatters) rather than forcing users to define custom scripts running all the required formatters
- If available, the local
formatexpr will be overwritten with a function that would cycle through and run all the defined formatters for the buffer (e.g., selection -> formatter 1 -> formatter 2 -> formatter 3 ...)
Any thoughts?
How open would you be to adding support for a new "format" key, to allow users define formatters (in the
formatprgandformatexprsense)? I have a working prototype on my local, and if you were not against this in principle, I could mop it up and open a PR for it.High level, this is what I got so far:
blacktogether withisort; I figured it would be easier to support this (i.e., multiple formatters) rather than forcing users to define custom scripts running all the required formattersformatexprwill be overwritten with a function that would cycle through and run all the defined formatters for the buffer (e.g., selection -> formatter 1 -> formatter 2 -> formatter 3 ...)Any thoughts?