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
50.3k stars 3.1k forks source link

[Snippet] Indent conflict? #13442

Open 0x2CA opened 4 months ago

0x2CA commented 4 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

https://github.com/rafamadriz/friendly-snippets/blob/main/snippets/javascript/typescript.json

   "Define a full property": {
        "prefix": "prop",
        "body": [
            "",
            "private _${1:value} : ${2:string};",
            "public get ${1:value}() : ${2:string} {",
            "\treturn this._${1:value};",
            "}",
            "public set ${1:value}(v : ${2:string}) {",
            "\tthis._${1:value} = v;",
            "}",
            ""
        ],
        "description": "Define a full property"
    }

in zed

https://github.com/zed-industries/zed/assets/19868292/82cf53e9-d6b3-47e9-97d8-37b951c98625

in vscode

https://github.com/zed-industries/zed/assets/19868292/0638302b-590e-45f5-9520-c5703bc50bac

Environment

Zed: v0.141.0 (Zed Preview) OS: macOS 14.5.0 Memory: 32 GiB Architecture: aarch64

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

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

Zed.log


notpeter commented 4 months ago

Hi @0x2CA, if I understand your video, the issue is that you're expecting the aaa to be indented, but after a snippet it's not?

In the future please include a textual description of your issue / expected behavior so someone can potentially understand your issue via text-alone (videos as additional context, not the only context).

0x2CA commented 4 months ago

Hi @0x2CA, if I understand your video, the issue is that you're expecting the aaa to be indented, but after a snippet it's not?

hi, thanks for refining it, that's exactly what I was trying to say!

In the future please include a textual description of your issue / expected behavior so someone can potentially understand your issue via text-alone (videos as additional context, not the only context).

Thanks for the friendly tips, my English is not very good, so I prefer to use video expression, of course I will increase the text description after that, I have a hard time with long sentences in English, so please bear with me if you see strange grammar or words!