Skip to content

Gracefully indenting structs and assembly blocks. #72

@hrkrshnn

Description

@hrkrshnn

Currently, the package expects a semicolon after a struct declaration, and also expects semicolons in assembly blocks.

For example

struct s {
    uint x;
}
// emacs expects semicolon here
// so automatically does an extra indent here
function f() {
    assembly {
        sstore(0, 0)
       // emacs expects a semicolon in the line before, so automatically makes an extra indent here again.
    }
}

I assume the struct issue is somehow related to c-mode or cc-mode that solidity-mode derives from.

I had a look at https://www.gnu.org/software/emacs/manual/html_mono/ccmode.html. Unfortunately, I can't find an obvious fix.

Any idea how this can be fixed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions