|
return function(lang) |
|
return { |
|
exe = "uncrustify", |
|
args = { "-q", "-l " .. lang }, |
|
stdin = true, |
|
} |
|
end |
You'd need a -c /some/path argument, but it's impossible to provide to this formatter.
The alternative is to export an environment variable $UNCRUSTIFY_CONFIG, with the path of the configuration.
If the only way to use it is supposed to be the environment variable, it would be fair to document it (if nothing better, at least a comment in the formatter definition).
Allowing for more arguments to be passed in the formatter definition would be the favorite option (then you could decide to use the environment variable anyhow, but it's up to individual choice).
formatter.nvim/lua/formatter/defaults/uncrustify.lua
Lines 1 to 7 in cb4778b
You'd need a
-c /some/pathargument, but it's impossible to provide to this formatter.The alternative is to export an environment variable
$UNCRUSTIFY_CONFIG, with the path of the configuration.If the only way to use it is supposed to be the environment variable, it would be fair to document it (if nothing better, at least a comment in the formatter definition).
Allowing for more arguments to be passed in the formatter definition would be the favorite option (then you could decide to use the environment variable anyhow, but it's up to individual choice).