zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
47.27k stars 2.73k forks source link

Latest rewrap not working #18162

Open krstp opened 4 hours ago

krstp commented 4 hours ago

Check for existing issues

Describe the bug / provide steps to reproduce it

See latest comments, at: https://github.com/zed-industries/zed/pull/17909

Recently provided rewrap functionality doesn't work. Any python or json files I tested it on do not work as desired. Literally nothing happens, nothing gets rewrapped. Restart of ZED also did not help.

Neither CMD+SHIFT+P + Rewrap not Option+Q works.

Environment

Zed: v0.154.0 (Zed Preview)
OS: macOS 15.0.0
Memory: 32 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

The functionality should work as described and shown in the change log.

If applicable, attach your Zed.log file to this issue.

Nothing CMD+SHIFT+P + Rewrap related results in any log

maxdeviant commented 4 hours ago

Could you please provide some examples of what you're trying to rewrap?

krstp commented 2 hours ago

Sure.

Here is a sample: ipsum.py

class LoremIpsum(Trainer):
    """
    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
    """

    def __init__(self, use_class_weights=True, class_weights=None, **kwargs):
        """
        Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
        """
        pass

Note both docstrings do not wraped and are single-lined. What I would expect, those should be wrapped at 80 char.