Skip to content
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

Snippet body used as description when none is provided #181115

Closed
dimateos opened this issue Apr 28, 2023 · 5 comments
Closed

Snippet body used as description when none is provided #181115

dimateos opened this issue Apr 28, 2023 · 5 comments
Assignees
Labels
feature-request Request for new features or functionality good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities snippets verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@dimateos
Copy link

For tiny snippets I usually end up writing the same body as the description as it provides the perfect info (plus also the uncut positional args as I mention in #181112).

This is nice because you have a tiny preview in the insert snippet menu, PLUS you also get fuzzy match agains part of the body:
image

With no description is hard to remember sometimes:
image

So it would be nice to have an option to toggle this behavior:

  • Just show a preview of the snippet in the insert snippet window, like is shown in the snippet suggestion documentation popup (see images and more context in Variable substitution in snippet preview #181112)
  • Actually take the body string as description whenever there is no description. Would achieve fuxxy search. Could limit to single string bodies or just concatenate big bodies, but a large body could e a problem.
@jrieken jrieken added help wanted Issues identified as good community contribution opportunities feature-request Request for new features or functionality good first issue Issues identified as good for first-time contributors snippets labels Apr 28, 2023
@vscodenpa vscodenpa added this to the Backlog Candidates milestone Apr 28, 2023
@vscodenpa
Copy link

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@TheSylvester
Copy link
Contributor

Hi everyone! I'm a relatively new dev trying to make my first contrib to a project and this seems to be the only "good first issue" that seems easiest, so I've been trying to investigate how to work on it.

If anyone has any advice on where to start looking, I'm all ears 👂😆

@jrieken
Copy link
Member

jrieken commented May 2, 2023

@TheSylvester this is your code pointer:

@TheSylvester
Copy link
Contributor

Thank you! Coincidentally I was examining this exact piece when you posted the comment. I implemented the functionality requested in my own code. Now I just need to turn it into a toggleable option in prefs 😉

Now that I've finally got past the initial shock of the first large code base I've read into, I'll be looking at other PRs to examine how they added preferences and go from there. Hopefully I will have a PR soon 🤞

@TheSylvester
Copy link
Contributor

I made a PR for this feature (see above). It's my first PR in open source and the first time I've worked in a large code base like this, so kindly point out anything I need to do differently and I'll be happy to make any changes 🙏

jrieken added a commit that referenced this issue May 10, 2023
…fill-empty-description

Added use snippet body as a description when none is provided #181115
@jrieken jrieken modified the milestones: Backlog Candidates, May 2023 May 10, 2023
@jrieken jrieken closed this as completed May 10, 2023
@jrieken jrieken added the verification-needed Verification of issue is requested label May 26, 2023
@roblourens roblourens added the verified Verification succeeded label May 30, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jun 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities snippets verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants