The existing case_clauses requires at least one clause to parse correctly. This matches the gleam grammar, as it is required to be correct Gleam. This means, however, that indentation cannot be determined until at least some clause has been added. This is an annoyance when editing.
This PR address #57 by allowing empty case clauses. I confirmed that the existing indentation query in neovim functions as expected. Also added a test to handle both populated an un-populated case clauses. Not sure if this should just be included in an existing test case, happy to move it.
The existing
case_clauses
requires at least one clause to parse correctly. This matches the gleam grammar, as it is required to be correct Gleam. This means, however, that indentation cannot be determined until at least some clause has been added. This is an annoyance when editing.This PR address #57 by allowing empty case clauses. I confirmed that the existing indentation query in neovim functions as expected. Also added a test to handle both populated an un-populated case clauses. Not sure if this should just be included in an existing test case, happy to move it.