I've always included a space after function with anonymous functions, it's just a habit now.
pcall(function ()
end)
task.spawn(function ()
end)
const empty = function () end
const function runThis()
end
But this isn't supported by StyLua - only all function definitions or none, and I think all definitions just looks odd.
It would be nice to have "Anonymous only" so a space is only added for anonymous functions.
I've looked through the code but I'm not too familiar with Rust and am unsure how you would want to implement this (in create_function_definition_trivia or a new function or something else) so I haven't submitted a PR.
I've always included a space after
functionwith anonymous functions, it's just a habit now.But this isn't supported by StyLua - only all function definitions or none, and I think all definitions just looks odd.
It would be nice to have "Anonymous only" so a space is only added for anonymous functions.
I've looked through the code but I'm not too familiar with Rust and am unsure how you would want to implement this (in
create_function_definition_triviaor a new function or something else) so I haven't submitted a PR.