-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
When the cursor is inside an if/else or switch with foldmethod set to syntax the surrounding function actually gets folded instead of the conditional block itself.
Example:
func main() {
a := "a"
b := "b"
if (true) {
fmt.Println(a)
// ^- cursor being here should fold just the `if` or at least both the `if` and `else`
// due to the `else` being on the same line as the `if`'s closing `}`.
// However it folds the whole function.
} else {
fmt.Println(b)
}
fmt.Println("end")
}With the plugin disabled this folding works correct. I tried to work around that by setting g:go_syntax_fold to 0, hoping that would end up falling back to vim-go's folding, however it just disables syntax folding altogether.
Metadata
Metadata
Assignees
Labels
No labels