Skip to content

Indentation loss when nesting S-expressions #66

@toddjonker

Description

@toddjonker

When an S-expression is started inside another, indentation can be lost. This makes it quite laborious to edit Ion-based code.

Repro case:

Start a fresh Ion file; I used an IDEA scratch file.

Type (foo and you'll get an automatic closing paren following the cursor.

Hit return; the cursor is at the left margin. I argue this is incorrect and the standard indentation should be applied.

Type two spaces and then bar; you should have:

(foo
  bar)

Move the cursor up after foo and hit RETURN. Surprisingly, this gets the indentation correct.

Type ( and watch the parens get shifted to the first column.

Manually fix the indentation, and imagine doing that a hundred times a day, with much deeper indentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions