You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// if there is no trailing comma, it indents properlypubconstSt=struct {
anon_field: enum {
some_field
}
};
// if there is any character other than a comma after the line, it also indents properlypubconstSt=struct {
anon_field: enum {
}, // this comment prevents the indent problem
};
pubconstSt=struct {
anon_field: enum {
},
// (there's a trailing whitespace on the line above)
};
// empty lines do not solve the problempubconstSt=struct {
anon_field: enum {
},
};
// identifiers that are on the same line as the opening bracket do not solve the issue either.pubconstSt=struct {
anon_field: enum { foo, bar
},
};
pubconstSt=struct {
anon_field: enum { foo, bar,
a// it solved with this one here, though
},
};
// it also happens with `struct` and any other type. The problem seems to be on the brackets themselves.pubconstSt=struct {
anon_field: struct {
},
};
pubconstSt=struct {
anon_field: union(enum) {
},
};
pubconstSt=struct {
anon_field: {
},
};
The text was updated successfully, but these errors were encountered:
Before anything, a minimal vimrc:
And my neovim version:
Here we have a struct declaration, with one of the fields being of type
<anonymous enum>
.For some strange reason, this specific example doesn't indent properly.
If indenting the line with the
},
in it (using==
), it becomes:That doesn't happen, though, if there is any non-empty line between the opening and closing brackets of the enum declaration:
Some other situations:
The text was updated successfully, but these errors were encountered: