Closed tsakirist closed 4 months ago
Sure, seems fine to me
nope, it isn't fine @stevearc try to customize formatter)
require("conform").formatters.clang-format = { prepend_args = {"--style", "{ BasedOnStyle: LLVM, IndentWidth: 4 }"}, }
nope, it isn't fine @stevearc try to customize formatter)
require("conform").formatters.clang-format = { prepend_args = {"--style", "{ BasedOnStyle: LLVM, IndentWidth: 4 }"}, }
You can index the formatters table with:
require("conform").formatters["clang-format"] = { prepend_args = {"--style", "{ BasedOnStyle: LLVM, IndentWidth: 4 }"} }
Oh thanks <3 I'm not that good at lua, I think it should be mentioned somewhere for people like me
Scope
This makes the formatter name consistent with the executable and also with other tools like e.g. Mason, for better interoperability.
Why
One use-case is to be able to automatically install formatters that are registered with other tools like Mason.