treesj icon indicating copy to clipboard operation
treesj copied to clipboard

[golang] "The current node is already splitted" when attempting to split a multiline statement

Open protiumx opened this issue 1 year ago • 1 comments

Split stopped working for multiline statements. e.g.

func New(param1 string, param2 int,
param3 bool) { ... }

var t := Some{ fieldA: "",
fieldB: 0}

This was working before https://github.com/Wansmer/treesj/commit/ecc658432129a23abb5b58e6f59b8bcfb9a961a4 Would it be possible to restore it?

This functionality is extremely helpful when dealing with bad formatted code (multiline).

protiumx avatar Feb 19 '24 11:02 protiumx

This functionality is extremely helpful when dealing with bad formatted code (multiline).

treesj is not a formatter, maybe better to use built-in lsp formatter to format code? :-)

Would it be possible to restore it?

I don't want to restore it, but maybe later I will add an option to manage this behavior.

Wansmer avatar Feb 21 '24 07:02 Wansmer