Add Riverpod and Freezed snippets - #4581
Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @OppositeDragon on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
MrSubidubi
left a comment
There was a problem hiding this comment.
Thanks for this! It seems the snippets in the freezed extension are broken. Please fix this and update the submodule here. You can test these locally, see https://zed.dev/docs/extensions/developing-extensions#developing-an-extension-locally
|
Hello @MrSubidubi, I reviewed the apparent error, and found why it is marking the snippets as broken. For example: So when I do: I tried this as a workaround, but also fails Do you think something can be made to make this possible, or is there a different direction I can take? |
|
You should be able to just escape the dollar sign, I think by just adding a backslash but could be wrong. There is documentation somewhere I believe, if not happy to add that. Dollar signs are definitely supported already though. |
|
Well, you'll need to properly escape within the JSON string (https://stackoverflow.com/a/27516892 for more context I suppose) so that we can parse and then escape the symbol within Zed. So two backslashes should probably do it |
|
Thank you for taking the time and pointing me in the right direction. You were right, I'll update the snippets and retry submitting. I appreciate your help. |
MrSubidubi
left a comment
There was a problem hiding this comment.
Looks good now, thanks!
Last question: Would you be opposed to adding a -dart in the ID of both extensions? I am not strongly enforcing this, just curious. So you'd have riverpod-dart-snippets and freezed-dart-snippets. I'd prefer that for the latter at least to be changed, yet I do not really insist tbh.
That would require you to change that in the repositories, then update the submodules and stuff here. Would that be fine with you?
|
(And sorry for the delay, was unfortunately sick) |
|
Thank you @MrSubidubi. Hope you are feeling much better now. Although they are for Dart, and some of these snippets can be used in pure Dart projects, most are specific to Flutter (specially in |
|
Appreciate the context. Can we go for Also, to be sure, just talking about the ID here, Name can stay as it currently is |
|
What about |
|
Perfectly fine with me! |
MrSubidubi
left a comment
There was a problem hiding this comment.
Thank you and thanks for bearing with me!
|
Thank you!!! |
This reverts commit aa14442.
Co-authored-by: Finn Evers <finn@zed.dev> Co-authored-by: MrSubidubi <dev@bahn.sh>
Co-authored-by: Finn Evers <finn@zed.dev> Co-authored-by: MrSubidubi <dev@bahn.sh>
Co-authored-by: Finn Evers <finn@zed.dev> Co-authored-by: MrSubidubi <dev@bahn.sh>
Co-authored-by: Finn Evers <finn@zed.dev> Co-authored-by: MrSubidubi <dev@bahn.sh>

No description provided.