Fold/unfold don't work with decorated functions
I've noticed that the fold and unfold commands don't seem to work when a function has been decorated, e.g.
# taken from https://talon.wiki/unofficial_talon_docs/#captures
@mod.capture(rule="all | ((north | south) [(east | west)] | east | west)")
def compass_direction(m) -> Direction:
I searched for existing issues and for settings that might affect this but didn't find anything.
Ah yeah that makes sense in retrospect. Thanks for filing. Not entirely sure easiest way to fix this one tbh. Will need to have a think. The way cursorless interacts with VSCode's folding mechanism is a bit less than ideal
I ran into this problem while working on a big class and I wanted to fold every funk in order to get a better overview. All functions with a decorator remain unfolded and the entire class gets folded.
Andreas suggested using fold every function name which seems to be a fine workaround if anyone else also has this problem.
Yeah good call. Should work as a workaround for folding a single function as well, eg just "fold funk name"