In the get_module function (https://github.com/vincens2005/lite-formatters/blob/master/init.lua#L47), an empty module is returned when no formatter can be found.
But whenever the return value of get_module is tested (https://github.com/vincens2005/lite-formatters/blob/master/init.lua#L110, https://github.com/vincens2005/lite-formatters/blob/master/init.lua#L140), the return value is compared with nil. The return statement on L47 should return nil when no formatter is found.
At the moment, this causes an error to be raised every time you attempt to format a file without a formatter configured.
In the
get_modulefunction (https://github.com/vincens2005/lite-formatters/blob/master/init.lua#L47), an empty module is returned when no formatter can be found.But whenever the return value of
get_moduleis tested (https://github.com/vincens2005/lite-formatters/blob/master/init.lua#L110, https://github.com/vincens2005/lite-formatters/blob/master/init.lua#L140), the return value is compared withnil. Thereturnstatement on L47 should returnnilwhen no formatter is found.At the moment, this causes an error to be raised every time you attempt to format a file without a formatter configured.