ljos / jq-mode

Emacs major mode for editing jq queries.
GNU General Public License v3.0
110 stars 12 forks source link

indent doesn't work with nested if #25

Closed knoguchi closed 4 years ago

knoguchi commented 4 years ago

indentation seems to be lost when there are 3 or more nested ifs

#!/usr/bin/env jq -Mf
if .x == null then
  if .y == null then
  if .z == null then
  .
else
  .
end
else
  .
end
else
  .
end

I'd like to see

#!/usr/bin/env jq -Mf
if .x == null then
  if .y == null then
    if .z == null then
      .
    else
      .
    end
  else
    .
  end
else
  .
end