chrisgrieser / nvim-scissors

Automagical editing and creation of snippets.
MIT License
384 stars 4 forks source link

Feature Request: display snippets while browsing the snippets #23

Closed pik4li closed 2 weeks ago

pik4li commented 2 weeks ago

Checklist

Feature Requested

I would love to have the snippets being displayed, while we browse the snippets.

Problem solved

You know exactly what code snippet you would edit.

Alternatives considered

Such a display is in my own plugin which i abandoned becouse i love yours way more!! <3

The code is here. I have to say, that i coded it with chatgpt and claude, but it works fine, maybe you can get some inspiration for it. Also i might open a PR.. But dont quote me on that ;)

Relevant Screenshot

This is the preview I used in my own plugin. Has syntax highlighting and looks great IMO. Hope you can add this function ^^

image

chrisgrieser commented 2 weeks ago

...the plugin already has such previews?

Pasted image 2024-10-28 at 14 23 06

In case those previews do not appear for you, it might be a bug, in which case I would need you to file a bug report, including your Telescope config, to be able to see why they aren't showing for you. nvim-scissors mostly uses your default Telescope config, so it might be that something in your Telescope simply disables previews. The implementation is even simpler than yours, so you can have a look: https://github.com/chrisgrieser/nvim-scissors/blob/27b1b6c64451c8850249e57f8622122d2a06b78a/lua/scissors/picker/telescope.lua#L18-L81