-
Notifications
You must be signed in to change notification settings - Fork 12
Add snippets #53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add snippets #53
Conversation
One thing to note, long descriptions are truncated: ![]() Here's how it shows up in VS Code: ![]() I've opened an issue: Snippet selection should use key as label |
Also opened an issue for the snippets being listed twice: |
I think I fixed it: |
@redforks thank you! I'll try on the next release. Edit: Verfied working in 0.182.11 |
FYI @vitallium |
I love the idea of having a nice set of default Ruby snippets, except the indentation is messed up and some of the shortcuts seem confusing to me. For example |
5f9b72c
to
19715ac
Compare
In Shopify/vscode-ruby-lsp#150 there were snippets for both I think the indentation is the same issue as reported in zed-industries/zed#15846 |
Looks like it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally, we would complete the work to move these to the Ruby LSP server to make it available for any editor without needing to copy the snippets around (in addition to making them smarter).
That said, if Zed wants a short term solution, this should do the trick.
Thanks for adding the snippets! Before merging this, I'd like to check with the Zed team first to make sure they’re okay with modifying the license file. @osiewicz Hi, sorry for pinging you directly, but could you please check if modifying the license file to include copyrights for other components is OK from the Zed team's perspective? Thanks! |
@vitallium can I also suggest we wait on zed-industries/zed#15846 before merging this? The snippets look great, but I tried using them in a dev build locally and found I wanted to disable them almost immediately due to indentation issues. |
Yes, I played around with this PR a bit, and I also noticed some oddities with spacing and indentation. |
@vitallium Yep, these license changes look good to me (not a lawyer though). |
This PR adds a set of snippets to the add-on (see https://zed.dev/docs/snippets)
They were added to Ruby LSP in Shopify/vscode-ruby-lsp#150. I believe they were derived from Textmate's Ruby bundle.(incorrect)The
vscode-ruby-lsp
repo was later combined into theruby-lsp
repo, so they now live at https://github.com/Shopify/ruby-lsp/blob/main/vscode/snippets.json. The file I'm adding here is an exact copy that file.I think there's a opportunity to improve the snippets, so consider this as a starting point.
I'm currently investigating why snippets are appearing twice:solved by zed-industries/zed#28940Note: It's possible that snippet completion may be later moved into the LSP: Shopify/ruby-lsp#1874
TODO:
LICENSE
needs updated to mention that these were sourced from Ruby LSP.