This PR also includes some small fixes to SyntaxEditor, in particular a fix to the problem with affected_rangeoutlined here.
I also updated unwrap_return_type to use placeholders when unwrapping None. I had tried to do this with the mutable tree API before and it was kind of a pain so it's nice to see improvements like this :)
Forgot to mention that the final tabstop snippet for unwrap_return_type should be after the last placeholder node instead of the last placeholder being considered the end of the snippet mode.
Part of #15710 and #18285
This PR also includes some small fixes to
SyntaxEditor
, in particular a fix to the problem withaffected_range
outlined here.I also updated
unwrap_return_type
to use placeholders when unwrappingNone
. I had tried to do this with the mutable tree API before and it was kind of a pain so it's nice to see improvements like this :)