Summary
Hi, thank you for the work!
I noticed some potential improvements for the (very) recently implemented code folding (#2588) regarding function decorators:
ty currently only creates one fold including the decorator(s) and the function, which leads to this:
class Foo:
@staticmethod
def bar(arg: int) -> None:
pass
Which i think is not the best possible experience, because it hides the actual function name.
If i disable language services, the native VSCode folding looks like this, with 2 levels of folding for decorators and the function itself:
Which i like more, because i can see function names without unfolding the implementation. I think there could also be an argument for not creating a fold for the decorators at all, or at least not if there is only one decorator, but i am not sure what i would like best there.
Version
No response
Summary
Hi, thank you for the work!
I noticed some potential improvements for the (very) recently implemented code folding (#2588) regarding function decorators:
ty currently only creates one fold including the decorator(s) and the function, which leads to this:
Which i think is not the best possible experience, because it hides the actual function name.
If i disable language services, the native VSCode folding looks like this, with 2 levels of folding for decorators and the function itself:
Which i like more, because i can see function names without unfolding the implementation. I think there could also be an argument for not creating a fold for the decorators at all, or at least not if there is only one decorator, but i am not sure what i would like best there.
Version
No response